mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
panvk: Advertise timestamp support
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34932>
This commit is contained in:
parent
369b3826fd
commit
7bf7d8c884
4 changed files with 21 additions and 3 deletions
|
|
@ -59,3 +59,4 @@ VK_KHR_shader_float8 on RADV (RDNA4+)
|
|||
GL_EXT_window_rectangles on r600
|
||||
GL_EXT_shader_image_load_store on r600/evergreen+
|
||||
CL_UNORM_INT_101010_2 and cl_ext_image_unorm_int_2_101010
|
||||
timestamps on panvk/v10+
|
||||
|
|
|
|||
|
|
@ -220,6 +220,17 @@ get_device_sync_types(struct panvk_physical_device *device,
|
|||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
float
|
||||
panvk_get_gpu_system_timestamp_period(const struct panvk_physical_device *device)
|
||||
{
|
||||
if (!device->kmod.props.gpu_can_query_timestamp ||
|
||||
!device->kmod.props.timestamp_frequency)
|
||||
return 0;
|
||||
|
||||
const float ns_per_s = 1000000000.0;
|
||||
return ns_per_s / (float)device->kmod.props.timestamp_frequency;
|
||||
}
|
||||
|
||||
void
|
||||
panvk_physical_device_finish(struct panvk_physical_device *device)
|
||||
{
|
||||
|
|
@ -396,7 +407,10 @@ panvk_GetPhysicalDeviceQueueFamilyProperties2(
|
|||
/* On v10+ we can support up to 127 queues but this causes timeout on
|
||||
some CTS tests */
|
||||
.queueCount = arch >= 10 ? 2 : 1,
|
||||
.timestampValidBits = 0,
|
||||
.timestampValidBits =
|
||||
arch >= 10 && physical_device->kmod.props.gpu_can_query_timestamp
|
||||
? 64
|
||||
: 0,
|
||||
.minImageTransferGranularity = (VkExtent3D){1, 1, 1},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ to_panvk_physical_device(struct vk_physical_device *phys_dev)
|
|||
return container_of(phys_dev, struct panvk_physical_device, vk);
|
||||
}
|
||||
|
||||
float panvk_get_gpu_system_timestamp_period(
|
||||
const struct panvk_physical_device *device);
|
||||
|
||||
VkResult panvk_physical_device_init(struct panvk_physical_device *device,
|
||||
struct panvk_instance *instance,
|
||||
drmDevicePtr drm_device);
|
||||
|
|
|
|||
|
|
@ -712,8 +712,8 @@ panvk_per_arch(get_physical_device_properties)(
|
|||
.sampledImageStencilSampleCounts = sample_counts,
|
||||
.storageImageSampleCounts = VK_SAMPLE_COUNT_1_BIT,
|
||||
.maxSampleMaskWords = 1,
|
||||
.timestampComputeAndGraphics = false,
|
||||
.timestampPeriod = 0,
|
||||
.timestampComputeAndGraphics = PAN_ARCH >= 10 && device->kmod.props.gpu_can_query_timestamp,
|
||||
.timestampPeriod = PAN_ARCH >= 10 ? panvk_get_gpu_system_timestamp_period(device) : 0,
|
||||
.maxClipDistances = 0,
|
||||
.maxCullDistances = 0,
|
||||
.maxCombinedClipAndCullDistances = 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue