[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 3/4] wined3d: Use PBO for read-only staging textures.
From: Andrew Wesie <awesie () gmail ! com>
Date: 2018-09-30 17:01:59
Message-ID: 1538326920-5825-3-git-send-email-awesie () gmail ! com
[Download RAW message or body]
Signed-off-by: Andrew Wesie <awesie@gmail.com>
---
dlls/wined3d/texture.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 60d1e5b..78e9364 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -46,11 +46,15 @@ struct wined3d_rect_f
static BOOL wined3d_texture_use_pbo(const struct wined3d_texture *texture, const \
struct wined3d_gl_info *gl_info) {
- return !(texture->resource.access & WINED3D_RESOURCE_ACCESS_CPU)
- && texture->resource.usage & WINED3DUSAGE_DYNAMIC
- && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT]
- && !texture->resource.format->conv_byte_count
- && !(texture->flags & (WINED3D_TEXTURE_PIN_SYSMEM | \
WINED3D_TEXTURE_COND_NP2_EMULATED)); + if \
(!gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] + || \
texture->resource.format->conv_byte_count + || (texture->flags & \
(WINED3D_TEXTURE_PIN_SYSMEM | WINED3D_TEXTURE_COND_NP2_EMULATED))) + return \
FALSE; +
+ /* Use a PBO for dynamic textures and read-only staging textures. */
+ return (!(texture->resource.access & WINED3D_RESOURCE_ACCESS_CPU)
+ && texture->resource.usage & WINED3DUSAGE_DYNAMIC)
+ || texture->resource.access == (WINED3D_RESOURCE_ACCESS_CPU | \
WINED3D_RESOURCE_ACCESS_MAP_R); }
static BOOL wined3d_texture_use_immutable_storage(const struct wined3d_texture \
*texture,
--
2.7.4
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic