mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
pvr: skip emitting query program when copy result / reset with 0 queries
When calling vkResetQueryPool() or vkCmdCopyQueryPoolResults() with a queryCount of 0, currently a query compute program with workgroup size 0*1*1 will be emited, which is ridiculous and will be rejected by some assertion in pvr_compute_generate_control_stream() . As the operation should be noop when queryCount is 0, the functions can and should just return in such cases. Fixes:0aa9f32b95("pvr: Implement vkCmdResetQueryPool API.") Fixes:b6e8e1cf37("pvr: Implement vkCmdCopyQueryPoolResults API.") Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Nick Hamilton <nick.hamilton@imgtec.com> (cherry picked from commit01ba4867fa) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41269>
This commit is contained in:
parent
fb55d222fc
commit
14a4a478c4
2 changed files with 7 additions and 1 deletions
|
|
@ -124,7 +124,7 @@
|
|||
"description": "pvr: skip emitting query program when copy result / reset with 0 queries",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "0aa9f32b95e6d05a7b9ccd737dba14df785159c7",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ void PVR_PER_ARCH(CmdResetQueryPool)(VkCommandBuffer commandBuffer,
|
|||
|
||||
PVR_CHECK_COMMAND_BUFFER_BUILDING_STATE(cmd_buffer);
|
||||
|
||||
if (queryCount == 0)
|
||||
return;
|
||||
|
||||
query_info.type = PVR_QUERY_TYPE_RESET_QUERY_POOL;
|
||||
|
||||
query_info.reset_query_pool.query_pool = queryPool;
|
||||
|
|
@ -81,6 +84,9 @@ void PVR_PER_ARCH(CmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer,
|
|||
|
||||
PVR_CHECK_COMMAND_BUFFER_BUILDING_STATE(cmd_buffer);
|
||||
|
||||
if (queryCount == 0)
|
||||
return;
|
||||
|
||||
query_info.type = PVR_QUERY_TYPE_COPY_QUERY_RESULTS;
|
||||
|
||||
query_info.copy_query_results.query_pool = queryPool;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue