mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 13:50:25 +01:00
i965: fix incorrect renderbuffer DataType assignment
This commit is contained in:
parent
5912cdff3e
commit
c7f43543af
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue