mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
mesa: use simplified _BaseFormat value in render-to-texture code
Fixes fd.o bug 26762.
This commit is contained in:
parent
31ff9b0a13
commit
c9e8ff1976
1 changed files with 4 additions and 1 deletions
|
|
@ -496,21 +496,24 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
|
|||
if (trb->TexImage->TexFormat == MESA_FORMAT_Z24_S8) {
|
||||
trb->Base.Format = MESA_FORMAT_Z24_S8;
|
||||
trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
|
||||
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
|
||||
}
|
||||
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z16) {
|
||||
trb->Base.Format = MESA_FORMAT_Z16;
|
||||
trb->Base.DataType = GL_UNSIGNED_SHORT;
|
||||
trb->Base._BaseFormat = GL_DEPTH_STENCIL;
|
||||
}
|
||||
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z32) {
|
||||
trb->Base.Format = MESA_FORMAT_Z32;
|
||||
trb->Base.DataType = GL_UNSIGNED_INT;
|
||||
trb->Base._BaseFormat = GL_DEPTH_COMPONENT;
|
||||
}
|
||||
else {
|
||||
trb->Base.Format = trb->TexImage->TexFormat;
|
||||
trb->Base.DataType = CHAN_TYPE;
|
||||
trb->Base._BaseFormat = GL_RGBA;
|
||||
}
|
||||
trb->Base.Data = trb->TexImage->Data;
|
||||
trb->Base._BaseFormat = _mesa_base_fbo_format(ctx, trb->Base.InternalFormat);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue