anv: move timestamp vfunc initialization to genX code
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 19 May 2023 12:36:40 +0000 (15:36 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 24 May 2023 06:09:01 +0000 (09:09 +0300)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23131>

src/intel/vulkan/anv_measure.c
src/intel/vulkan/genX_state.c

index 235c5f4..088306a 100644 (file)
@@ -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);
index e025557..1fa0fc2 100644 (file)
@@ -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