summaryrefslogtreecommitdiff
path: root/src/mesa/main/texrender.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-10-08 20:27:27 -0600
committerBrian Paul <brianp@vmware.com>2009-10-08 20:27:27 -0600
commit45e76d2665b38ba3787548310efc59e969124c01 (patch)
tree7a1ab9b61bbd0eb03e7154f6f000db58b8eab4f4 /src/mesa/main/texrender.c
parent74d61d03b54d72217d463c248468cdcd09320efc (diff)
mesa: remove a bunch of gl_renderbuffer fields
_ActualFormat is replaced by Format (MESA_FORMAT_x). ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are all replaced by MESA_FORMAT_x queries.
Diffstat (limited to 'src/mesa/main/texrender.c')
-rw-r--r--src/mesa/main/texrender.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index c8b532acbbf..e2432be6ca4 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -497,30 +497,23 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->Base.InternalFormat = trb->TexImage->InternalFormat;
/* XXX may need more special cases here */
if (trb->TexImage->TexFormat == MESA_FORMAT_Z24_S8) {
- trb->Base._ActualFormat = GL_DEPTH24_STENCIL8_EXT;
+ trb->Base.Format = MESA_FORMAT_Z24_S8;
trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT;
}
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z16) {
- trb->Base._ActualFormat = GL_DEPTH_COMPONENT;
+ trb->Base.Format = MESA_FORMAT_Z16;
trb->Base.DataType = GL_UNSIGNED_SHORT;
}
else if (trb->TexImage->TexFormat == MESA_FORMAT_Z32) {
- trb->Base._ActualFormat = GL_DEPTH_COMPONENT;
+ trb->Base.Format = MESA_FORMAT_Z32;
trb->Base.DataType = GL_UNSIGNED_INT;
}
else {
- trb->Base._ActualFormat = trb->TexImage->InternalFormat;
+ trb->Base.Format = trb->TexImage->TexFormat;
trb->Base.DataType = CHAN_TYPE;
}
- trb->Base._BaseFormat = trb->TexImage->_BaseFormat;
trb->Base.Data = trb->TexImage->Data;
-
- trb->Base.RedBits = _mesa_get_format_bits(texFormat, GL_TEXTURE_RED_SIZE);
- trb->Base.GreenBits = _mesa_get_format_bits(texFormat, GL_TEXTURE_GREEN_SIZE);
- trb->Base.BlueBits = _mesa_get_format_bits(texFormat, GL_TEXTURE_BLUE_SIZE);
- trb->Base.AlphaBits = _mesa_get_format_bits(texFormat, GL_TEXTURE_ALPHA_SIZE);
- trb->Base.DepthBits = _mesa_get_format_bits(texFormat, GL_TEXTURE_DEPTH_SIZE_ARB);
- trb->Base.StencilBits = _mesa_get_format_bits(texFormat, GL_TEXTURE_STENCIL_SIZE_EXT);
+ trb->Base._BaseFormat = _mesa_base_fbo_format(ctx, trb->Base.InternalFormat);
}