tu: Implement VK_KHR_shader_clock

There is a special address defined in kernel from which ALWAYSON
counter could be read.

Blob uses this sequence to read it:
  getone #l15
  mov.s32s32 r2.y, -4096
  mov.s32s32 r2.z, 131071
  (rpt5)nop
  ldg.u32 r2.w, g[r2.y], 1
  ldg.u32 r2.y, g[r2.y+4], 1
  (sy)(ss)mov.s32s32 r48.x, (last)r2.w
  mov.s32s32 r48.y, (last)r2.y
  l15:

Passes:
 dEQP-VK.glsl.shader_clock.*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29860>
This commit is contained in:
Danylo Piliaiev
2024-06-21 19:34:44 +02:00
committed by Marge Bot
parent 4b1b4ee10c
commit 0e9854a894
3 changed files with 51 additions and 1 deletions
+1 -1
View File
@@ -559,7 +559,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_ray_tracing_maintenance1 DONE (anv/gfx12.5+, radv/gfx10.3+, tu/a740+, vn)
VK_KHR_ray_tracing_pipeline DONE (anv/gfx12.5+, lvp, radv/gfx10.3+, vn)
VK_KHR_ray_tracing_position_fetch DONE (anv, radv/gfx10.3+, vn)
VK_KHR_shader_clock DONE (anv, hasvk, lvp, nvk, radv, vn)
VK_KHR_shader_clock DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_KHR_shader_maximal_reconvergence DONE (anv, lvp, nvk, panvk/v10+, radv, vn)
VK_KHR_shader_relaxed_extended_instruction DONE (anv, hasvk, nvk, panvk, radv, tu, v3dv, vn)
VK_KHR_shader_subgroup_uniform_control_flow DONE (anv, hasvk, nvk, panvk/v10+, radv, tu, vn)