anv: Set timestampValidBits to 64bits

On Xe2+, timestamp register can hold value upto 64-bit.

This change also fixes the timestamp related tests on Xe2 platform.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27713>
This commit is contained in:
Sagar Ghuge 2024-02-20 18:56:47 -08:00 committed by Marge Bot
parent 3004923ae3
commit c3244135fa

View file

@ -2607,17 +2607,34 @@ void anv_GetPhysicalDeviceProperties2(
}
static const VkQueueFamilyProperties
anv_queue_family_properties_template = {
.timestampValidBits = 36, /* XXX: Real value here */
.minImageTransferGranularity = { 1, 1, 1 },
};
get_anv_queue_family_properties_template(const struct anv_physical_device *device)
{
/*
* For Xe2+:
* Bspec 60411: Timestamp register can hold 64-bit value
*
* Platforms < Xe2:
* Bpsec 46111: Timestamp register can hold only 36-bit
* value
*/
const VkQueueFamilyProperties anv_queue_family_properties_template =
{
.timestampValidBits = device->info.ver >= 20 ? 64 : 36,
.minImageTransferGranularity = { 1, 1, 1 },
};
return anv_queue_family_properties_template;
}
static VkQueueFamilyProperties
anv_device_physical_get_queue_properties(const struct anv_physical_device *device,
uint32_t family_index)
{
const struct anv_queue_family *family = &device->queue.families[family_index];
VkQueueFamilyProperties properties = anv_queue_family_properties_template;
VkQueueFamilyProperties properties =
get_anv_queue_family_properties_template(device);
properties.queueFlags = family->queueFlags;
properties.queueCount = family->queueCount;
/* TODO: enable protected content on video queue */