mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
radv: Implement VK_EXT_host_query_reset.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Eric Engestrom <eric@engestrom.ch>
This commit is contained in:
parent
887041c763
commit
d1aa37dfff
3 changed files with 29 additions and 0 deletions
|
|
@ -887,6 +887,12 @@ void radv_GetPhysicalDeviceFeatures2(
|
|||
features->depthClipEnable = true;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT: {
|
||||
VkPhysicalDeviceHostQueryResetFeaturesEXT *features =
|
||||
(VkPhysicalDeviceHostQueryResetFeaturesEXT *)ext;
|
||||
features->hostQueryReset = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ EXTENSIONS = [
|
|||
Extension('VK_EXT_external_memory_dma_buf', 1, True),
|
||||
Extension('VK_EXT_external_memory_host', 1, 'device->rad_info.has_userptr'),
|
||||
Extension('VK_EXT_global_priority', 1, 'device->rad_info.has_ctx_priority'),
|
||||
Extension('VK_EXT_host_query_reset', 1, True),
|
||||
Extension('VK_EXT_memory_budget', 1, True),
|
||||
Extension('VK_EXT_memory_priority', 1, True),
|
||||
Extension('VK_EXT_pci_bus_info', 2, True),
|
||||
|
|
|
|||
|
|
@ -1436,6 +1436,28 @@ void radv_CmdResetQueryPool(
|
|||
}
|
||||
}
|
||||
|
||||
void radv_ResetQueryPoolEXT(
|
||||
VkDevice _device,
|
||||
VkQueryPool queryPool,
|
||||
uint32_t firstQuery,
|
||||
uint32_t queryCount)
|
||||
{
|
||||
RADV_FROM_HANDLE(radv_query_pool, pool, queryPool);
|
||||
|
||||
uint32_t value = pool->type == VK_QUERY_TYPE_TIMESTAMP
|
||||
? TIMESTAMP_NOT_READY : 0;
|
||||
uint32_t *data = (uint32_t*)(pool->ptr + firstQuery * pool->stride);
|
||||
uint32_t *data_end = (uint32_t*)(pool->ptr + (firstQuery + queryCount) * pool->stride);
|
||||
|
||||
for(uint32_t *p = data; p != data_end; ++p)
|
||||
*p = value;
|
||||
|
||||
if (pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS) {
|
||||
memset(pool->ptr + pool->availability_offset + firstQuery * 4,
|
||||
0, queryCount * 4);
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned event_type_for_stream(unsigned stream)
|
||||
{
|
||||
switch (stream) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue