zink: also check for host-visible on staging uploads
this has strange mechanics on lavapipe
Fixes: e63acdd2b7 ("zink: force cached mem for streaming uploads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35239>
This commit is contained in:
@@ -128,7 +128,3 @@ spec@ext_transform_feedback@tessellation quad_strip wireframe,Crash
|
||||
spec@!opengl 1.0@gl-1.0-dlist-beginend,Crash
|
||||
|
||||
spec@arb_viewport_array@display-list,Fail
|
||||
|
||||
# uprev Piglit in Mesa
|
||||
spec@arb_sparse_buffer@buffer-data,Crash
|
||||
spec@arb_sparse_buffer@commit,Crash
|
||||
|
||||
@@ -2347,7 +2347,9 @@ zink_buffer_map(struct pipe_context *pctx,
|
||||
/* ideally never ever read or write to non-cached mem */
|
||||
bool is_cached_mem = (screen->info.mem_props.memoryTypes[res->obj->bo->base.base.placement].propertyFlags & VK_STAGING_RAM) == VK_STAGING_RAM;
|
||||
/* but this is only viable with a certain amount of vram since it may fully duplicate lots of large buffers */
|
||||
bool host_mem_type_check = screen->always_cached_upload ? is_cached_mem : res->obj->host_visible;
|
||||
bool host_mem_type_check = res->obj->host_visible;
|
||||
if (screen->always_cached_upload)
|
||||
host_mem_type_check &= is_cached_mem;
|
||||
if (usage & PIPE_MAP_DISCARD_RANGE && !(usage & PIPE_MAP_PERSISTENT) &&
|
||||
(!host_mem_type_check || !(usage & (PIPE_MAP_UNSYNCHRONIZED)))) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user