Fix GL_EXT_packed_depth_stencil crash, but shadowtex still broken
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Nov 2006 23:16:18 +0000 (23:16 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Nov 2006 23:16:18 +0000 (23:16 +0000)
src/mesa/drivers/dri/i915tex/intel_buffers.c
src/mesa/drivers/dri/i915tex/intel_tex_format.c

index eb3422fb44379c96e1c77567e8ff9572b43d972b..a6b32986233109187803718ca287f98602d42423 100644 (file)
@@ -827,7 +827,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
     ***/
    if (fb->_DepthBuffer && fb->_DepthBuffer->Wrapped) {
       irbDepth = intel_renderbuffer(fb->_DepthBuffer->Wrapped);
-      if (irbDepth->region) {
+      if (irbDepth && irbDepth->region) {
          FALLBACK(intel, INTEL_FALLBACK_DEPTH_BUFFER, GL_FALSE);
          depthRegion = irbDepth->region;
       }
index d7612dcbaab64cd31d4e2a68875aaa2af150ed16..33281295dc26083b2af485692274a12534fe055b 100644 (file)
@@ -136,6 +136,10 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
    case GL_DEPTH_COMPONENT32:
       return &_mesa_texformat_z16;
 
+   case GL_DEPTH_STENCIL_EXT:
+   case GL_DEPTH24_STENCIL8_EXT:
+      return &_mesa_texformat_z24_s8;
+
    default:
       fprintf(stderr, "unexpected texture format %s in %s\n",
               _mesa_lookup_enum_by_nr(internalFormat), __FUNCTION__);