Fix GL_EXT_packed_depth_stencil crash, but shadowtex still broken

This commit is contained in:
Brian Paul
2006-11-02 23:16:18 +00:00
parent 05267501af
commit dd0830228b
2 changed files with 5 additions and 1 deletions
+1 -1
View 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;
}
@@ -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__);