diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2022-04-20 12:10:33 -0400 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-04-20 21:44:50 -0700 |
commit | b7e08dbc067c7aea83b719e3aa3b9bfafb8b4ee1 (patch) | |
tree | f009eab419d84db60c0ddbb96a80c7a0867db432 | |
parent | f00600e1a368df3d0b786850fd175ff6cdf873eb (diff) |
zink: remove xfb_barrier flag
this was an attempt to minimize the number of xfb barriers being emitted,
but really xfb barriers need to always be emitted in order for xfb to work
cc: mesa-stable
fixes (nv):
KHR-GL46.texture_view.reference_counting
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
(cherry picked from commit e509598470c000498c3e1328e012142d9047e292)
Conflicts:
src/gallium/drivers/zink/ci/zink-nv-fails.txt
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/zink/ci/zink-nv-fails.txt | 3 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_context.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_context.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_draw.cpp | 4 |
5 files changed, 3 insertions, 18 deletions
diff --git a/.pick_status.json b/.pick_status.json index f3e99aff20d..6204dfa2765 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4,7 +4,7 @@ "description": "zink: remove xfb_barrier flag", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/zink/ci/zink-nv-fails.txt b/src/gallium/drivers/zink/ci/zink-nv-fails.txt index 8893e4bc8c0..e02b1bd964e 100644 --- a/src/gallium/drivers/zink/ci/zink-nv-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-nv-fails.txt @@ -143,7 +143,6 @@ KHR-GL46.tessellation_shader.tessellation_shader_triangles_tessellation.inner_te KHR-GL46.tessellation_shader.vertex.vertex_ordering,Fail KHR-GL46.tessellation_shader.vertex.vertex_spacing,Fail KHR-GL46.texture_swizzle.smoke,Timeout -KHR-GL46.texture_view.reference_counting,Fail KHR-GL46.texture_view.view_classes,Fail KHR-GL46.texture_view.view_sampling,Fail KHR-GL46.transform_feedback.capture_geometry_interleaved_test,Fail @@ -157,8 +156,6 @@ KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-interleave KHR-GL46.transform_feedback_overflow_query_ARB.advanced-single-stream-separate-attribs,Fail KHR-GL46.transform_feedback_overflow_query_ARB.basic-single-stream-interleaved-attribs,Fail KHR-GL46.transform_feedback_overflow_query_ARB.basic-single-stream-separate-attribs,Fail -KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream,Fail -KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream,Fail dEQP-GLES31.functional.blend_equation_advanced.barrier.colorburn,Fail dEQP-GLES31.functional.blend_equation_advanced.barrier.colordodge,Fail diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 79d2ded9645..2eb93722823 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -3891,17 +3891,8 @@ zink_set_stream_output_targets(struct pipe_context *pctx, pipe_so_target_reference(&ctx->so_targets[i], targets[i]); if (!t) continue; - struct zink_resource *res = zink_resource(t->counter_buffer); - if (offsets[0] == (unsigned)-1) { - ctx->xfb_barrier |= zink_resource_buffer_needs_barrier(res, - VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, - VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT); - } else { - ctx->xfb_barrier |= zink_resource_buffer_needs_barrier(res, - VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, - VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT); + if (offsets[0] != (unsigned)-1) t->counter_buffer_valid = false; - } struct zink_resource *so = zink_resource(ctx->so_targets[i]->buffer); if (so) { so->so_bind_count++; diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h index 18b6f688354..7965f3ef389 100644 --- a/src/gallium/drivers/zink/zink_context.h +++ b/src/gallium/drivers/zink/zink_context.h @@ -363,7 +363,6 @@ struct zink_context { uint32_t num_so_targets; struct pipe_stream_output_target *so_targets[PIPE_MAX_SO_OUTPUTS]; bool dirty_so_targets; - bool xfb_barrier; bool first_frame_done; bool have_timelines; diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp index 1144ee5c790..fc264b2f362 100644 --- a/src/gallium/drivers/zink/zink_draw.cpp +++ b/src/gallium/drivers/zink/zink_draw.cpp @@ -41,7 +41,6 @@ zink_emit_xfb_counter_barrier(struct zink_context *ctx) } zink_resource_buffer_barrier(ctx, res, access, stage); } - ctx->xfb_barrier = false; } static void @@ -516,8 +515,7 @@ zink_draw(struct pipe_context *pctx, bool have_streamout = !!ctx->num_so_targets; if (have_streamout) { - if (ctx->xfb_barrier) - zink_emit_xfb_counter_barrier(ctx); + zink_emit_xfb_counter_barrier(ctx); if (ctx->dirty_so_targets) { /* have to loop here and below because barriers must be emitted out of renderpass, * but xfb buffers can't be bound before the renderpass is active to avoid |