set the _BaseFormat for window-framebuffers, could hit some assertion otherwise
authorRoland Scheidegger <sroland@tungstengraphics.com>
Sat, 21 Jul 2007 14:51:15 +0000 (16:51 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Sat, 21 Jul 2007 14:51:15 +0000 (16:51 +0200)
src/mesa/drivers/dri/i915tex/intel_fbo.c

index 399a280c47ca8bed2e2c257ec904187b08bd2848..04ca5ae8ba0da25c5725e82d94964f31035065f2 100644 (file)
@@ -350,6 +350,21 @@ intel_new_renderbuffer_fb(GLuint intFormat)
    irb->Base.ClassID = INTEL_RB_CLASS;
    irb->Base.InternalFormat = intFormat;
 
+   switch (intFormat) {
+   case GL_RGB5:
+   case GL_RGBA8:
+      irb->Base._BaseFormat = GL_RGBA;
+      break;
+   case GL_DEPTH_COMPONENT16:
+      irb->Base._BaseFormat = GL_DEPTH_COMPONENT;
+      break;
+   case GL_DEPTH24_STENCIL8_EXT:
+      irb->Base._BaseFormat = GL_DEPTH_STENCIL_EXT;
+      break;
+   default:
+      assert(0);
+   }
+
    /* intel-specific methods */
    irb->Base.Delete = intel_delete_renderbuffer;
    irb->Base.AllocStorage = intel_alloc_renderbuffer_storage;