GL_EXT_packed_depth_stencil changes
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 1 Oct 2005 16:06:25 +0000 (16:06 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 1 Oct 2005 16:06:25 +0000 (16:06 +0000)
src/mesa/swrast/s_texcombine.c
src/mesa/swrast/s_texfilter.c

index 2bdd4efaa20512c1e2aba0d71624aec1915b02d9..0f662c3d2bee4ed1daa42901d3bfcc05c22ed3ff 100644 (file)
@@ -748,7 +748,7 @@ texture_apply( const GLcontext *ctx,
    if (format == GL_COLOR_INDEX || format == GL_YCBCR_MESA) {
       format = GL_RGBA;  /* a bit of a hack */
    }
-   else if (format == GL_DEPTH_COMPONENT) {
+   else if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) {
       format = texUnit->_Current->DepthMode;
    }
 
index f5085c3f1bd5cb4f718c94465ab9abdbd33f74b6..05618a1f802e1b4cd49231205e2f97efe5e113b2 100644 (file)
@@ -2248,7 +2248,9 @@ sample_depth_texture( GLcontext *ctx,
 
    (void) lambda;
 
-   ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT);
+   ASSERT(tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_COMPONENT ||
+          tObj->Image[0][tObj->BaseLevel]->Format == GL_DEPTH_STENCIL_EXT);
+
    ASSERT(tObj->Target == GL_TEXTURE_1D ||
           tObj->Target == GL_TEXTURE_2D ||
           tObj->Target == GL_TEXTURE_RECTANGLE_NV);
@@ -2649,7 +2651,7 @@ _swrast_choose_texture_sample_func( GLcontext *ctx,
 
       switch (t->Target) {
       case GL_TEXTURE_1D:
-         if (format == GL_DEPTH_COMPONENT) {
+         if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) {
             return &sample_depth_texture;
          }
          else if (needLambda) {
@@ -2663,7 +2665,7 @@ _swrast_choose_texture_sample_func( GLcontext *ctx,
             return &sample_nearest_1d;
          }
       case GL_TEXTURE_2D:
-         if (format == GL_DEPTH_COMPONENT) {
+         if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) {
             return &sample_depth_texture;
          }
          else if (needLambda) {