summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen7_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-05-31 20:16:01 -0700
committerJason Ekstrand <[email protected]>2016-06-03 19:29:28 -0700
commit9fa958e95b9ffd61283d20d5d14a0ac007c1def7 (patch)
tree24dfd691b7933940c65147c22030b61b43f2ea45 /src/intel/vulkan/gen7_pipeline.c
parent66bd2e1133baae35c38272bc8728cee631bcbefa (diff)
anv/pipeline: Add support for early depth stencil
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/gen7_pipeline.c')
-rw-r--r--src/intel/vulkan/gen7_pipeline.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/intel/vulkan/gen7_pipeline.c b/src/intel/vulkan/gen7_pipeline.c
index a53bdc4314b..f069db99477 100644
--- a/src/intel/vulkan/gen7_pipeline.c
+++ b/src/intel/vulkan/gen7_pipeline.c
@@ -365,12 +365,20 @@ genX(graphics_pipeline_create)(
wm.ThreadDispatchEnable = true;
wm.LineEndCapAntialiasingRegionWidth = 0; /* 0.5 pixels */
wm.LineAntialiasingRegionWidth = 1; /* 1.0 pixels */
- wm.EarlyDepthStencilControl = EDSC_NORMAL;
wm.PointRasterizationRule = RASTRULE_UPPER_RIGHT;
wm.PixelShaderComputedDepthMode = wm_prog_data->computed_depth_mode;
wm.PixelShaderUsesSourceDepth = wm_prog_data->uses_src_depth;
wm.PixelShaderUsesSourceW = wm_prog_data->uses_src_w;
wm.PixelShaderUsesInputCoverageMask = wm_prog_data->uses_sample_mask;
+
+ if (wm_prog_data->early_fragment_tests) {
+ wm.EarlyDepthStencilControl = EDSC_PREPS;
+ } else if (wm_prog_data->has_side_effects) {
+ wm.EarlyDepthStencilControl = EDSC_PSEXEC;
+ } else {
+ wm.EarlyDepthStencilControl = EDSC_NORMAL;
+ }
+
wm.BarycentricInterpolationMode = wm_prog_data->barycentric_interp_modes;
}
}