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>
This commit is contained in:
Mike Blumenkrantz 2022-04-20 12:10:33 -04:00 committed by Marge Bot
parent fc5edf9b68
commit e509598470
4 changed files with 2 additions and 17 deletions

View file

@ -15,9 +15,6 @@ KHR-GL46.sparse_texture_tests.SparseTextureAllocation,Fail
KHR-GL46.sparse_texture_tests.SparseTextureCommitment,Fail
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through,Fail
KHR-GL46.tessellation_shader.tessellation_shader_tc_barriers.barrier_guarded_write_calls,Fail
KHR-GL46.texture_view.reference_counting,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

View file

@ -3796,17 +3796,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++;

View file

@ -360,7 +360,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 gfx_dirty;

View file

@ -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