anv: enable VK_EXT_shader_stencil_export
authorGustavo Lima Chaves <gustavo.lima.chaves@intel.com>
Tue, 20 Mar 2018 06:06:45 +0000 (23:06 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 8 Jun 2018 18:16:01 +0000 (11:16 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_extensions.py
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/genX_pipeline.c

index b5bee0881ce2d813816fb2f1391dae3b90575328..8160864685f8e897793db5b29ee1d51f3611f46c 100644 (file)
@@ -112,6 +112,7 @@ EXTENSIONS = [
     Extension('VK_EXT_global_priority',                   1,
               'device->has_context_priority'),
     Extension('VK_EXT_shader_viewport_index_layer',       1, True),
+    Extension('VK_EXT_shader_stencil_export',             1, 'device->info.gen >= 9'),
 ]
 
 class VkVersion:
index 8f30136b100a3800663d75cf001d8bff41487323..240bde036d6dfaabd158f050bf53a3c47914486b 100644 (file)
@@ -152,6 +152,7 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
          .subgroup_quad = true,
          .subgroup_shuffle = true,
          .subgroup_vote = true,
+         .stencil_export = device->instance->physicalDevice.info.gen >= 9,
       },
    };
 
index 6016d2575845fb47df76118d728f25a0234c064c..462c59451ccb6a421df49574a736ca670660fb2a 100644 (file)
@@ -1600,6 +1600,7 @@ emit_3dstate_ps_extra(struct anv_pipeline *pipeline,
          ps.PixelShaderHasUAV = true;
 
 #if GEN_GEN >= 9
+      ps.PixelShaderComputesStencil = wm_prog_data->computed_stencil;
       ps.PixelShaderPullsBary    = wm_prog_data->pulls_bary;
       ps.InputCoverageMaskState  = wm_prog_data->uses_sample_mask ?
                                    ICMS_INNER_CONSERVATIVE : ICMS_NONE;