summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_texfilter.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-06-07 13:38:06 -0700
committerIan Romanick <idr@us.ibm.com>2007-06-07 13:38:06 -0700
commit84d1b24647c0719551e8bcd5fa4601fbd3b1d555 (patch)
treeecb5388e9ca2d9f60604136e824992d3796324b7 /src/mesa/swrast/s_texfilter.c
parent359c6eada7172d61ed52091dcc8f406ad0598b8a (diff)
Fix ARB_fp spec conformance bug WRT shadow sampling.
The ARB_fp (and other assembly-level fragment program specs) say that the depth comparison function is always GL_NONE in fragment program mode.
Diffstat (limited to 'src/mesa/swrast/s_texfilter.c')
-rw-r--r--src/mesa/swrast/s_texfilter.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 2c8e443daf..d4516f6faa 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -2893,25 +2893,7 @@ sample_depth_texture( GLcontext *ctx,
/* XXXX if tObj->MinFilter != tObj->MagFilter, we're ignoring lambda */
- /* XXX this could be precomputed and saved in the texture object */
- if (tObj->CompareFlag) {
- /* GL_SGIX_shadow */
- if (tObj->CompareOperator == GL_TEXTURE_LEQUAL_R_SGIX) {
- function = GL_LEQUAL;
- }
- else {
- ASSERT(tObj->CompareOperator == GL_TEXTURE_GEQUAL_R_SGIX);
- function = GL_GEQUAL;
- }
- }
- else if (tObj->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB) {
- /* GL_ARB_shadow */
- function = tObj->CompareFunc;
- }
- else {
- function = GL_NONE; /* pass depth through as grayscale */
- }
-
+ function = tObj->_Function;
if (tObj->MagFilter == GL_NEAREST) {
GLuint i;
for (i = 0; i < n; i++) {