diff options
author | Dave Airlie <airlied@redhat.com> | 2016-03-22 07:52:26 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-03-31 09:13:54 +1000 |
commit | 493eab76792307d066489bc1d88798f14a5df31d (patch) | |
tree | 6952c1f76854e7eaefd474cd33233e77a666adad /src/gallium/drivers/softpipe/sp_quad_depth_test.c | |
parent | 827393b76fffa352e0ff3cae077c7817d6cfbf8a (diff) |
softpipe: add support for explicit early depth testing
ARB_shader_image_load_store adds support for explicit early
depth testing. However we need to make sure we don't overwrite
values using the shader written values in this case.
This fixes early depth testing in softpipe to conform with
those requirements.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_quad_depth_test.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad_depth_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c index 4cce9e9bc12..847a616f491 100644 --- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c +++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c @@ -782,7 +782,7 @@ depth_test_quads_fallback(struct quad_stage *qs, { unsigned i, pass = 0; const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info; - boolean interp_depth = !fsInfo->writes_z; + boolean interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth; boolean shader_stencil_ref = fsInfo->writes_stencil; struct depth_data data; unsigned vp_idx = quads[0]->input.viewport_index; @@ -902,7 +902,7 @@ choose_depth_test(struct quad_stage *qs, { const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info; - boolean interp_depth = !fsInfo->writes_z; + boolean interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth; boolean alpha = qs->softpipe->depth_stencil->alpha.enabled; |