mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
pvr: fix the code copying query_indices to sub_query_indices
There's a dynarray field inside gfx sub_cmd called sub_query_indices,
which will contain pending query indices for gfx sub_cmds inside a
secondary command buffer. It's expected that when finishing such gfx
sub_cmds, the content of query_indices is going to be moved there.
However the `util_dynarray_append_dynarray()` call is called with wrong
parameter order, thus it's copying sub_query_indices to query_indices
and then immediately wiping query_indices, forgetting all query indices
in such case.
Fix the `util_dynarray_append_dynarray()` call to fix occlusion queries
in secondary command buffers.
Fixes: 8c506c4b03 ("pvr: Use util_dynarray_append_dynarray()")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40854>
This commit is contained in:
parent
36f34a72c1
commit
87f4122e11
1 changed files with 2 additions and 2 deletions
|
|
@ -2414,8 +2414,8 @@ VkResult pvr_arch_cmd_buffer_end_sub_cmd(struct pvr_cmd_buffer *cmd_buffer)
|
|||
assert(gfx_sub_cmd->query_pool);
|
||||
|
||||
if (secondary_cont) {
|
||||
util_dynarray_append_dynarray(&state->query_indices,
|
||||
&gfx_sub_cmd->sec_query_indices);
|
||||
util_dynarray_append_dynarray(&gfx_sub_cmd->sec_query_indices,
|
||||
&state->query_indices);
|
||||
} else {
|
||||
const void *data = util_dynarray_begin(&state->query_indices);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue