diff options
author | Brian Paul <brianp@vmware.com> | 2009-01-14 16:28:55 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-01-14 16:49:24 -0700 |
commit | c7f43543af8a0bf95750eb6d332fdede07d104ea (patch) | |
tree | fdf0caee781358e9e348bf1570982a0c583acc4a | |
parent | 5912cdff3e1f2296b1f5753a008b225bdac4559a (diff) |
i965: fix incorrect renderbuffer DataType assignment
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 7453b96dc5..93fc84503e 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -529,20 +529,25 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb, if (texImage->TexFormat == &_mesa_texformat_argb8888) { irb->Base._ActualFormat = GL_RGBA8; irb->Base._BaseFormat = GL_RGBA; + irb->Base.DataType = GL_UNSIGNED_BYTE; DBG("Render to RGBA8 texture OK\n"); } else if (texImage->TexFormat == &_mesa_texformat_rgb565) { irb->Base._ActualFormat = GL_RGB5; irb->Base._BaseFormat = GL_RGB; + irb->Base.DataType = GL_UNSIGNED_SHORT; DBG("Render to RGB5 texture OK\n"); } else if (texImage->TexFormat == &_mesa_texformat_z16) { irb->Base._ActualFormat = GL_DEPTH_COMPONENT16; irb->Base._BaseFormat = GL_DEPTH_COMPONENT; + irb->Base.DataType = GL_UNSIGNED_SHORT; DBG("Render to DEPTH16 texture OK\n"); - } else if (texImage->TexFormat == &_mesa_texformat_s8_z24) { + } + else if (texImage->TexFormat == &_mesa_texformat_s8_z24) { irb->Base._ActualFormat = GL_DEPTH24_STENCIL8_EXT; irb->Base._BaseFormat = GL_DEPTH_STENCIL_EXT; + irb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT; DBG("Render to DEPTH_STENCIL texture OK\n"); } else { @@ -554,7 +559,6 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb, irb->Base.InternalFormat = irb->Base._ActualFormat; irb->Base.Width = texImage->Width; irb->Base.Height = texImage->Height; - irb->Base.DataType = GL_UNSIGNED_BYTE; /* FBO XXX fix */ irb->Base.RedBits = texImage->TexFormat->RedBits; irb->Base.GreenBits = texImage->TexFormat->GreenBits; irb->Base.BlueBits = texImage->TexFormat->BlueBits; |