From dd0830228b5b4d7d730068a607c68e8bf85c2906 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 23:16:18 +0000 Subject: [PATCH] Fix GL_EXT_packed_depth_stencil crash, but shadowtex still broken --- src/mesa/drivers/dri/i915tex/intel_buffers.c | 2 +- src/mesa/drivers/dri/i915tex/intel_tex_format.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c index eb3422fb443..a6b32986233 100644 --- a/src/mesa/drivers/dri/i915tex/intel_buffers.c +++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c @@ -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; } diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_format.c b/src/mesa/drivers/dri/i915tex/intel_tex_format.c index d7612dcbaab..33281295dc2 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_format.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_format.c @@ -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__); -- 2.30.2