summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-12-14 10:38:15 -0700
committerBrian Paul <brianp@vmware.com>2010-12-14 12:17:10 -0700
commitdfbc20593ec89ef5ddcb0dba3b05ea95e296861e (patch)
tree99518bdd2cf2f2959d21ba95bee8b1c33d63bbd0 /src/gallium/auxiliary/gallivm
parent68c41a25b4adf77886cc915d47af5e01723142f8 (diff)
gallivm: do texture swizzle after shadow compare
We need to swizzle after the shadow comparison so that the GL_DEPTH_MODE functionality is handled properly. This fixes all the piglit glsl-fs-shadow2d*.shader_test cases, except for glsl-fs-shadow2dproj-bias.shader_test which fails because of a bug in the GLSL compiler (fd.o 32395).
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c2
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
index 991f6fa5ef..e61cf9541e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
@@ -1098,6 +1098,4 @@ lp_build_sample_aos(struct lp_build_sample_context *bld,
texel_out[2] = unswizzled[2];
texel_out[3] = unswizzled[3];
}
-
- apply_sampler_swizzle(bld, texel_out);
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index cf46e2be83..e685f4b73f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -187,8 +187,6 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
border_chan_vec, texel_out[chan]);
}
}
-
- apply_sampler_swizzle(bld, texel_out);
}
@@ -1268,4 +1266,6 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
}
lp_build_sample_compare(&bld, r, texel_out);
+
+ apply_sampler_swizzle(&bld, texel_out);
}