aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-02-12 14:39:40 -0800
committerEric Anholt <[email protected]>2019-02-18 18:09:06 -0800
commitcd5e0b272919a654079620adecd2abe24ff51233 (patch)
tree774d6a0786a0e4af9967e509740644101419340c /src/gallium/drivers/v3d
parent332b969c4ed7fdfc6d65770c07fb573c50174eb0 (diff)
v3d: Use the early_fragment_tests flag for the shader's disable-EZ field.
Apparently we need disable-EZ flagged, not just "does Z writes". Fixes dEQP-GLES31.functional.image_load_store.early_fragment_tests.no_early_fragment_tests_depth_fbo on 7278, even though it passed in simulation. Signed-off-by: Eric Anholt <[email protected]> Fixes: 051a41d3d56e ("v3d: Add support for the early_fragment_tests flag.")
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r--src/gallium/drivers/v3d/v3dx_draw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c
index 9ca6aaa8f95..60fe745fbd3 100644
--- a/src/gallium/drivers/v3d/v3dx_draw.c
+++ b/src/gallium/drivers/v3d/v3dx_draw.c
@@ -203,8 +203,13 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
* shader needs to write the Z value (even just discards).
*/
shader.fragment_shader_does_z_writes =
- (v3d->prog.fs->prog_data.fs->writes_z ||
- v3d->prog.fs->prog_data.fs->discard);
+ v3d->prog.fs->prog_data.fs->writes_z;
+ /* Set if the EZ test must be disabled (due to shader side
+ * effects and the early_z flag not being present in the
+ * shader).
+ */
+ shader.turn_off_early_z_test =
+ v3d->prog.fs->prog_data.fs->disable_ez;
shader.fragment_shader_uses_real_pixel_centre_w_in_addition_to_centroid_w2 =
v3d->prog.fs->prog_data.fs->uses_center_w;