mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 04:04:23 +08:00
anv: Properly handle cases for different query types in copy_query_results_with_shader
Like it describes in the comment section of VK_QUERY_TYPE_OCCLUSION, only occlusion and timestamps queries needs ANV_COPY_QUERY_FLAG_PARTIAL. VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT is captured by MI commands. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29493>
This commit is contained in:
parent
71d455b96f
commit
3349963645
@ -1787,9 +1787,8 @@ copy_query_results_with_shader(struct anv_cmd_buffer *cmd_buffer,
|
||||
uint32_t data_offset = 8 /* behind availability */;
|
||||
switch (pool->vk.query_type) {
|
||||
case VK_QUERY_TYPE_OCCLUSION:
|
||||
case VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT:
|
||||
copy_flags |= ANV_COPY_QUERY_FLAG_DELTA;
|
||||
/* These 2 queries are the only ones where we would have partial data
|
||||
/* Occlusion and timestamps queries are the only ones where we would have partial data
|
||||
* because they are capture with a PIPE_CONTROL post sync operation. The
|
||||
* other ones are captured with MI_STORE_REGISTER_DATA so we're always
|
||||
* available by the time we reach the copy command.
|
||||
@ -1797,6 +1796,14 @@ copy_query_results_with_shader(struct anv_cmd_buffer *cmd_buffer,
|
||||
copy_flags |= (flags & VK_QUERY_RESULT_PARTIAL_BIT) ? ANV_COPY_QUERY_FLAG_PARTIAL : 0;
|
||||
break;
|
||||
|
||||
case VK_QUERY_TYPE_TIMESTAMP:
|
||||
copy_flags |= (flags & VK_QUERY_RESULT_PARTIAL_BIT) ? ANV_COPY_QUERY_FLAG_PARTIAL : 0;
|
||||
break;
|
||||
|
||||
case VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT:
|
||||
copy_flags |= ANV_COPY_QUERY_FLAG_DELTA;
|
||||
break;
|
||||
|
||||
case VK_QUERY_TYPE_PIPELINE_STATISTICS:
|
||||
num_items = util_bitcount(pool->vk.pipeline_statistics);
|
||||
copy_flags |= ANV_COPY_QUERY_FLAG_DELTA;
|
||||
@ -1807,7 +1814,6 @@ copy_query_results_with_shader(struct anv_cmd_buffer *cmd_buffer,
|
||||
copy_flags |= ANV_COPY_QUERY_FLAG_DELTA;
|
||||
break;
|
||||
|
||||
case VK_QUERY_TYPE_TIMESTAMP:
|
||||
case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR:
|
||||
case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR:
|
||||
case VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR:
|
||||
|
Loading…
Reference in New Issue
Block a user