diff options
author | Ilia Mirkin <[email protected]> | 2018-07-20 15:50:02 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-07-22 14:56:44 -0700 |
commit | 257128079cdd83d6badcab34d647ff6a6fc87d3e (patch) | |
tree | 88eff895b2243b0f41da6b966f621524d67e6e7a /src/intel/vulkan | |
parent | 768f1436677177712caaea49f7519f0c3da3b9f4 (diff) |
anv/gen9: expose VK_EXT_post_depth_coverage
Note that the use of ICMS_INNER_CONSERVATIVE disagrees with the GL driver.
Perhaps it's more performant than ICMS_NORMAL and is otherwise permitted?
Not sure, so I left it as-is.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_extensions.py | 1 | ||||
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 1 | ||||
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 10 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py index adc1d758982..ea837744b43 100644 --- a/src/intel/vulkan/anv_extensions.py +++ b/src/intel/vulkan/anv_extensions.py @@ -124,6 +124,7 @@ EXTENSIONS = [ Extension('VK_EXT_shader_viewport_index_layer', 1, True), Extension('VK_EXT_shader_stencil_export', 1, 'device->info.gen >= 9'), Extension('VK_EXT_vertex_attribute_divisor', 2, True), + Extension('VK_EXT_post_depth_coverage', 1, 'device->info.gen >= 9'), ] class VkVersion: diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 95a686f7833..e91c146aad2 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -155,6 +155,7 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline, .subgroup_vote = true, .stencil_export = device->instance->physicalDevice.info.gen >= 9, .storage_8bit = device->instance->physicalDevice.info.gen >= 8, + .post_depth_coverage = device->instance->physicalDevice.info.gen >= 9, }, }; diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 0821d71c9f8..6f6793e1221 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1617,8 +1617,14 @@ emit_3dstate_ps_extra(struct anv_pipeline *pipeline, #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; + + ps.InputCoverageMaskState = ICMS_NONE; + if (wm_prog_data->uses_sample_mask) { + if (wm_prog_data->post_depth_coverage) + ps.InputCoverageMaskState = ICMS_DEPTH_COVERAGE; + else + ps.InputCoverageMaskState = ICMS_INNER_CONSERVATIVE; + } #else ps.PixelShaderUsesInputCoverageMask = wm_prog_data->uses_sample_mask; #endif |