mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
turnip: Implement VK_EXT_host_query_reset
Signed-off-by: Hyunjun Ko <zzoon@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6299>
This commit is contained in:
parent
b92be738d5
commit
075e40ea98
3 changed files with 27 additions and 1 deletions
|
|
@ -482,7 +482,7 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
features->uniformBufferStandardLayout = false;
|
||||
features->shaderSubgroupExtendedTypes = false;
|
||||
features->separateDepthStencilLayouts = false;
|
||||
features->hostQueryReset = false;
|
||||
features->hostQueryReset = true;
|
||||
features->timelineSemaphore = false;
|
||||
features->bufferDeviceAddress = false;
|
||||
features->bufferDeviceAddressCaptureReplay = false;
|
||||
|
|
@ -612,6 +612,12 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
features->customBorderColorWithoutFormat = true;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT: {
|
||||
VkPhysicalDeviceHostQueryResetFeaturesEXT *features =
|
||||
(VkPhysicalDeviceHostQueryResetFeaturesEXT *)ext;
|
||||
features->hostQueryReset = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ EXTENSIONS = [
|
|||
Extension('VK_EXT_conditional_rendering', 1, True),
|
||||
Extension('VK_EXT_custom_border_color', 12, True),
|
||||
Extension('VK_KHR_multiview', 1, True),
|
||||
Extension('VK_EXT_host_query_reset', 1, True),
|
||||
]
|
||||
|
||||
MAX_API_VERSION = VkVersion(MAX_API_VERSION)
|
||||
|
|
|
|||
|
|
@ -599,6 +599,25 @@ tu_CmdResetQueryPool(VkCommandBuffer commandBuffer,
|
|||
tu_bo_list_add(&cmdbuf->bo_list, &pool->bo, MSM_SUBMIT_BO_WRITE);
|
||||
}
|
||||
|
||||
void
|
||||
tu_ResetQueryPool(VkDevice device,
|
||||
VkQueryPool queryPool,
|
||||
uint32_t firstQuery,
|
||||
uint32_t queryCount)
|
||||
{
|
||||
TU_FROM_HANDLE(tu_query_pool, pool, queryPool);
|
||||
|
||||
for (uint32_t i = 0; i < queryCount; i++) {
|
||||
struct query_slot *slot = slot_address(pool, i + firstQuery);
|
||||
slot->available = 0;
|
||||
|
||||
for (uint32_t k = 0; k < get_result_count(pool); k++) {
|
||||
uint64_t *res = query_result_addr(pool, i + firstQuery, k);
|
||||
*res = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
emit_begin_occlusion_query(struct tu_cmd_buffer *cmdbuf,
|
||||
struct tu_query_pool *pool,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue