anv: Implement VK_KHR_shader_clock
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 19 Apr 2019 19:18:02 +0000 (12:18 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 7 Oct 2019 16:12:12 +0000 (09:12 -0700)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_extensions.py
src/intel/vulkan/anv_pipeline.c

index 323bb61ce39edf2ca1070f1b87a0b40d10c700cc..37dabd76278da1e01198e3c4075de6aa3ca0d669 100644 (file)
@@ -1201,6 +1201,14 @@ void anv_GetPhysicalDeviceFeatures2(
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: {
+         VkPhysicalDeviceShaderClockFeaturesKHR *features =
+            (VkPhysicalDeviceShaderClockFeaturesKHR *)ext;
+         features->shaderSubgroupClock = true;
+         features->shaderDeviceClock = false;
+         break;
+      }
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: {
          VkPhysicalDeviceShaderDrawParametersFeatures *features = (void *)ext;
          features->shaderDrawParameters = true;
index dad49a1e564220b6a74e6420c6b012e940ad9660..1ef699c7d0e31fce2e5f00be6cf6376ab3e7a8e5 100644 (file)
@@ -108,6 +108,7 @@ EXTENSIONS = [
     Extension('VK_KHR_sampler_ycbcr_conversion',          1, True),
     Extension('VK_KHR_shader_atomic_int64',               1,
               'device->info.gen >= 9 && device->use_softpin'),
+    Extension('VK_KHR_shader_clock',                      1, True),
     Extension('VK_KHR_shader_draw_parameters',            1, True),
     Extension('VK_KHR_shader_float16_int8',               1, 'device->info.gen >= 8'),
     Extension('VK_KHR_shader_float_controls',             1, 'device->info.gen >= 8'),
index 64e60525d7786d2140005ed32a2c8bb1890adfb5..14343260882d0e60137bf0f7023c220746d7c93a 100644 (file)
@@ -192,6 +192,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
          .post_depth_coverage = pdevice->info.gen >= 9,
          .runtime_descriptor_array = true,
          .float_controls = pdevice->info.gen >= 8,
+         .shader_clock = true,
          .shader_viewport_index_layer = true,
          .stencil_export = pdevice->info.gen >= 9,
          .storage_8bit = pdevice->info.gen >= 8,