summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_shader.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-12-23 14:16:52 -0700
committerBrian Paul <[email protected]>2017-12-26 21:43:37 -0700
commit1e0b64ced978a952bc6061cda3db2bdcfa0879d7 (patch)
tree9970a199014f0cc728e7d45e76adf20231d258ad /src/gallium/drivers/svga/svga_shader.h
parentac78ab951a0826732b4f0dd7d4c4a11d6b4bd30f (diff)
svga: fix shadow comparison failures
In some cases, We do shadow comparison cases in the fragment shader instead of with texture sampler state. But when we do so, we must disable the shadow comparison test in the sampler state. As it was, we were doing the comparison twice, which resulted in nonsense. Also, we had the texcoord and texel value swapped in the comparison instruction. Fixes about 38 Piglit tex-miplevel-selection tests. Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_shader.h')
-rw-r--r--src/gallium/drivers/svga/svga_shader.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_shader.h b/src/gallium/drivers/svga/svga_shader.h
index dc462c94af6..70d12469827 100644
--- a/src/gallium/drivers/svga/svga_shader.h
+++ b/src/gallium/drivers/svga/svga_shader.h
@@ -158,6 +158,11 @@ struct svga_shader_variant
/** Is the color output just a constant value? (fragment shader only) */
boolean constant_color_output;
+ /** Bitmask indicating which texture units are doing the shadow
+ * comparison test in the shader rather than the sampler state.
+ */
+ unsigned fs_shadow_compare_units;
+
/** For FS-based polygon stipple */
unsigned pstipple_sampler_unit;