mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
radv: fix a sync issue with primitives generated query and NGG/legacy
On RDNA1&2, the driver needs to support both NGG and legacy for
primitives generated query because we can't know that before starting
queries.
To get the query pool results, we check the availability bit wrote by
the SAMPLE_STREAMOUTSTATS packet but the GDS copy was emitted after,
which means the availability bit might be TRUE before the GDS copy is
actually done.
Fix this by emitting the GDS copy before to ensure the availability is
TRUE for both results.
This fixes recent updates in
dEQP-VK.transform_feedback.primitives_generated_query.* because the
tests no longer wait for the fence.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23080>
(cherry picked from commit 9ba41ed70a)
This commit is contained in:
parent
eef0f7f1ea
commit
d5541307fd
2 changed files with 5 additions and 5 deletions
|
|
@ -1363,7 +1363,7 @@
|
|||
"description": "radv: fix a sync issue with primitives generated query and NGG/legacy",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1913,8 +1913,6 @@ emit_begin_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *poo
|
|||
cmd_buffer->state.active_prims_gen_queries++;
|
||||
}
|
||||
|
||||
emit_sample_streamout(cmd_buffer, va, index);
|
||||
|
||||
if (pool->uses_gds) {
|
||||
/* generated prim counter */
|
||||
gfx10_copy_gds_query(cmd_buffer, RADV_NGG_QUERY_PRIM_GEN_OFFSET(index), va + 32);
|
||||
|
|
@ -1927,6 +1925,8 @@ emit_begin_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *poo
|
|||
|
||||
cmd_buffer->state.active_prims_gen_gds_queries++;
|
||||
}
|
||||
|
||||
emit_sample_streamout(cmd_buffer, va, index);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -2049,8 +2049,6 @@ emit_end_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *pool,
|
|||
cmd_buffer->state.active_prims_gen_queries--;
|
||||
}
|
||||
|
||||
emit_sample_streamout(cmd_buffer, va + 16, index);
|
||||
|
||||
if (pool->uses_gds) {
|
||||
/* generated prim counter */
|
||||
gfx10_copy_gds_query(cmd_buffer, RADV_NGG_QUERY_PRIM_GEN_OFFSET(index), va + 36);
|
||||
|
|
@ -2060,6 +2058,8 @@ emit_end_query(struct radv_cmd_buffer *cmd_buffer, struct radv_query_pool *pool,
|
|||
if (!cmd_buffer->state.active_prims_gen_gds_queries)
|
||||
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_NGG_QUERY;
|
||||
}
|
||||
|
||||
emit_sample_streamout(cmd_buffer, va + 16, index);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue