Module: Mesa
Branch: main
Commit: ddc37cf430b6ed7c1bdee387f14e36d6d017ebe7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ddc37cf430b6ed7c1bdee387f14e36d6d017ebe7

Author: Lionel Landwerlin <[email protected]>
Date:   Fri May 19 15:36:40 2023 +0300

anv: move timestamp vfunc initialization to genX code

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Felix DeGrood <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23131>

---

 src/intel/vulkan/anv_measure.c | 17 -----------------
 src/intel/vulkan/genX_state.c  |  2 ++
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/intel/vulkan/anv_measure.c b/src/intel/vulkan/anv_measure.c
index 235c5f4290d..088306a61d2 100644
--- a/src/intel/vulkan/anv_measure.c
+++ b/src/intel/vulkan/anv_measure.c
@@ -38,23 +38,6 @@ struct anv_measure_batch {
 void
 anv_measure_device_init(struct anv_physical_device *device)
 {
-   switch (device->info.verx10) {
-   case 125:
-      device->cmd_emit_timestamp = &gfx125_cmd_emit_timestamp;
-      break;
-   case 120:
-      device->cmd_emit_timestamp = &gfx12_cmd_emit_timestamp;
-      break;
-   case 110:
-      device->cmd_emit_timestamp = &gfx11_cmd_emit_timestamp;
-      break;
-   case 90:
-      device->cmd_emit_timestamp = &gfx9_cmd_emit_timestamp;
-      break;
-   default:
-      assert(false);
-   }
-
    /* initialise list of measure structures that await rendering */
    struct intel_measure_device *measure_device = &device->measure_device;
    intel_measure_init(measure_device);
diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c
index e025557b41a..1fa0fc2f3ed 100644
--- a/src/intel/vulkan/genX_state.c
+++ b/src/intel/vulkan/genX_state.c
@@ -554,6 +554,8 @@ genX(init_physical_device_state)(ASSERTED struct 
anv_physical_device *pdevice)
    genX(grl_load_rt_uuid)(pdevice->rt_uuid);
    pdevice->max_grl_scratch_size = genX(grl_max_scratch_size)();
 #endif
+
+   pdevice->cmd_emit_timestamp = genX(cmd_emit_timestamp);
 }
 
 VkResult

Reply via email to