[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    [PATCH 1/5] wined3d: Use the resource access flags in ffp_blitter_use_cpu_clear().
From:       Henri Verbeet <hverbeet () codeweavers ! com>
Date:       2018-01-31 23:49:32
Message-ID: 1517441856-14120-1-git-send-email-hverbeet () codeweavers ! com
[Download RAW message or body]

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
---
 dlls/wined3d/surface.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5f91c21..5f34ad0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2744,14 +2744,16 @@ static BOOL ffp_blitter_use_cpu_clear(struct \
wined3d_rendertarget_view *view)  
     resource = view->resource;
     if (resource->type == WINED3D_RTYPE_BUFFER)
-        return resource->pool == WINED3D_POOL_SYSTEM_MEM;
+        return !(resource->access & WINED3D_RESOURCE_ACCESS_GPU);
 
     texture = texture_from_resource(resource);
     locations = texture->sub_resources[view->sub_resource_idx].locations;
     if (locations & (resource->map_binding | WINED3D_LOCATION_DISCARDED))
-        return resource->pool == WINED3D_POOL_SYSTEM_MEM || (texture->flags & \
WINED3D_TEXTURE_PIN_SYSMEM); +        return !(resource->access & \
WINED3D_RESOURCE_ACCESS_GPU) +                || (texture->flags & \
WINED3D_TEXTURE_PIN_SYSMEM);  
-    return resource->pool == WINED3D_POOL_SYSTEM_MEM && !(texture->flags & \
WINED3D_TEXTURE_CONVERTED); +    return !(resource->access & \
WINED3D_RESOURCE_ACCESS_GPU) +            && !(texture->flags & \
WINED3D_TEXTURE_CONVERTED);  }
 
 static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_device \
                *device,
-- 
2.1.4


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic