anv: Advertise VK_EXT_shader_demote_to_helper_invocation
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sat, 8 Jun 2019 00:37:38 +0000 (17:37 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Mon, 8 Jul 2019 15:57:25 +0000 (08:57 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
docs/relnotes/19.2.0.html
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_extensions.py
src/intel/vulkan/anv_pipeline.c

index 907edf447f038c08f8bdd83c271a42683cb937a5..971958517a17421be3778a933c9df0901ff6139c 100644 (file)
@@ -41,6 +41,7 @@ TBD.
 <ul>
 <li>EGL_EXT_platform_device</li>
 <li>VK_EXT_queue_family_foreign for radv</li>
+<li>VK_EXT_shader_demote_to_helper_invocation on Intel.</li>
 </ul>
 
 <h2>Bug fixes</h2>
index 16fa430149862f81d6b4d508ad698a4edd78cfaf..e059c94cdc0ac6c0b8d5941d2e1e826e987ad902 100644 (file)
@@ -1136,6 +1136,12 @@ void anv_GetPhysicalDeviceFeatures2(
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT: {
+         VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT *features = (void *)ext;
+         features->shaderDemoteToHelperInvocation = true;
+         break;
+      }
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: {
          VkPhysicalDeviceShaderDrawParametersFeatures *features = (void *)ext;
          features->shaderDrawParameters = true;
index f868985aeb9fd874742a17836a009846f37c29a9..33b6afba679a1db044d73bc2908144c0d3c7edc6 100644 (file)
@@ -143,6 +143,7 @@ EXTENSIONS = [
     Extension('VK_EXT_sampler_filter_minmax',             1, 'device->info.gen >= 9'),
     Extension('VK_EXT_scalar_block_layout',               1, True),
     Extension('VK_EXT_separate_stencil_usage',            1, True),
+    Extension('VK_EXT_shader_demote_to_helper_invocation', 1, True),
     Extension('VK_EXT_shader_stencil_export',             1, 'device->info.gen >= 9'),
     Extension('VK_EXT_shader_viewport_index_layer',       1, True),
     Extension('VK_EXT_texel_buffer_alignment',            1, True),
index 051c3334aa88de301245fc5415a2311baecd7ab9..f82ed677859f1b9072f07c2b98b3b7c41b2b2e39 100644 (file)
@@ -168,6 +168,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
    struct spirv_to_nir_options spirv_options = {
       .lower_workgroup_access_to_offsets = true,
       .caps = {
+         .demote_to_helper_invocation = true,
          .derivative_group = true,
          .descriptor_array_dynamic_indexing = true,
          .descriptor_array_non_uniform_indexing = true,