Module: Mesa
Branch: master
Commit: 9c7adaeb5fac46f437c7b2106b977e2f97df7452
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c7adaeb5fac46f437c7b2106b977e2f97df7452

Author: Caio Marcelo de Oliveira Filho <[email protected]>
Date:   Fri Jun  7 17:37:38 2019 -0700

anv: Advertise VK_EXT_shader_demote_to_helper_invocation

Reviewed-by: Jason Ekstrand <[email protected]>

---

 docs/relnotes/19.2.0.html          | 1 +
 src/intel/vulkan/anv_device.c      | 6 ++++++
 src/intel/vulkan/anv_extensions.py | 1 +
 src/intel/vulkan/anv_pipeline.c    | 1 +
 4 files changed, 9 insertions(+)

diff --git a/docs/relnotes/19.2.0.html b/docs/relnotes/19.2.0.html
index 907edf447f0..971958517a1 100644
--- a/docs/relnotes/19.2.0.html
+++ b/docs/relnotes/19.2.0.html
@@ -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>
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 16fa4301498..e059c94cdc0 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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;
diff --git a/src/intel/vulkan/anv_extensions.py 
b/src/intel/vulkan/anv_extensions.py
index f868985aeb9..33b6afba679 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -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),
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 051c3334aa8..f82ed677859 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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,

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to