diff --git a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt index e2c3b768816..3731898edaf 100644 --- a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt @@ -206,13 +206,6 @@ spec@arb_gpu_shader_fp64@uniform_buffers@fs-ubo-load.indirect.3,Fail spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex,Fail spec@arb_program_interface_query@arb_program_interface_query-getprogramresourceindex@'vs_input2[1][0]' on GL_PROGRAM_INPUT,Fail -# failing since at least e82369d0 (2023-02-03) -spec@arb_query_buffer_object@qbo,Fail -spec@arb_query_buffer_object@qbo@query-GL_CLIPPING_INPUT_PRIMITIVES-ASYNC_CPU_READ_BEFORE-GL_UNSIGNED_INT64_ARB,Fail -spec@arb_query_buffer_object@qbo@query-GL_PRIMITIVES_SUBMITTED-ASYNC_CPU_READ_BEFORE-GL_UNSIGNED_INT64_ARB,Fail -spec@arb_query_buffer_object@qbo@query-GL_GEOMETRY_SHADER_INVOCATIONS-ASYNC_CPU_READ_BEFORE-GL_UNSIGNED_INT64_ARB,Fail -spec@arb_query_buffer_object@qbo@query-GL_SAMPLES_PASSED-ASYNC_CPU_READ_BEFORE-GL_UNSIGNED_INT64_ARB,Fail - spec@arb_sample_locations@test,Fail spec@arb_sample_locations@test@MSAA: 1- X: 0- Y: 0- Grid: false,Fail spec@arb_sample_locations@test@MSAA: 1- X: 0- Y: 0- Grid: true,Fail diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 7dfcc168374..f265a52b9a8 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -1946,8 +1946,10 @@ zink_buffer_map(struct pipe_context *pctx, (((usage & PIPE_MAP_READ) && !(usage & PIPE_MAP_PERSISTENT) && ((res->obj->bo->base.placement & VK_STAGING_RAM) != VK_STAGING_RAM)) || !res->obj->host_visible)) { + /* the above conditional catches uncached reads and non-HV writes */ assert(!(usage & (TC_TRANSFER_MAP_THREADED_UNSYNC))); - if (!res->obj->host_visible || res->base.b.flags & PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY) { + /* any read, non-HV write, or unmappable that reaches this point needs staging */ + if ((usage & PIPE_MAP_READ) || !res->obj->host_visible || res->base.b.flags & PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY) { overwrite: trans->offset = box->x % screen->info.props.limits.minMemoryMapAlignment; trans->staging_res = pipe_buffer_create(&screen->base, PIPE_BIND_LINEAR, PIPE_USAGE_STAGING, box->width + trans->offset);