mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
zink: always invalidate streamout counter buffer if not resuming
this otherwise treates begin/end/begin the same as begin/pause/resume
cc: mesa-stable
fixes:
KHR-GL46.texture_view.view_classes
KHR-GL46.transform_feedback.capture_geometry_separate_test
KHR-GL46.transform_feedback.capture_vertex_separate_test
KHR-GL46.transform_feedback.query_geometry_separate_test
KHR-GL46.transform_feedback.query_vertex_separate_test
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15020>
(cherry picked from commit e8ba9cee27)
This commit is contained in:
parent
dcb32ae3a5
commit
29822cf29a
2 changed files with 10 additions and 3 deletions
|
|
@ -4747,7 +4747,7 @@
|
|||
"description": "zink: always invalidate streamout counter buffer if not resuming",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3613,6 +3613,11 @@ zink_set_stream_output_targets(struct pipe_context *pctx,
|
|||
{
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
|
||||
/* always set counter_buffer_valid=false on unbind:
|
||||
* - on resume (indicated by offset==-1), set counter_buffer_valid=true
|
||||
* - otherwise the counter buffer is invalidated
|
||||
*/
|
||||
|
||||
if (num_targets == 0) {
|
||||
for (unsigned i = 0; i < ctx->num_so_targets; i++) {
|
||||
if (ctx->so_targets[i]) {
|
||||
|
|
@ -3632,14 +3637,16 @@ zink_set_stream_output_targets(struct pipe_context *pctx,
|
|||
if (!t)
|
||||
continue;
|
||||
struct zink_resource *res = zink_resource(t->counter_buffer);
|
||||
if (offsets[0] == (unsigned)-1)
|
||||
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
|
||||
} 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);
|
||||
t->counter_buffer_valid = false;
|
||||
}
|
||||
struct zink_resource *so = zink_resource(ctx->so_targets[i]->buffer);
|
||||
if (so) {
|
||||
so->so_bind_count++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue