mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +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> (cherry picked from commit87f4122e11) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41269>
This commit is contained in:
parent
01445cca55
commit
38692b3ebf
2 changed files with 3 additions and 3 deletions
|
|
@ -5694,7 +5694,7 @@
|
|||
"description": "pvr: fix the code copying query_indices to sub_query_indices",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "8c506c4b03aa17ba1c71ed4ce80464d489c29de7",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2407,8 +2407,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