summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texgetimage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-30 20:28:45 -0600
committerBrian Paul <[email protected]>2009-09-30 20:28:45 -0600
commit1f7c914ad0beea8a29c1a171c7cd1a12f2efe0fa (patch)
tree1126fbf352c0f86b86afda83a7a0ca58e6243723 /src/mesa/main/texgetimage.c
parente2e7bd6c1f979179e6840cf0e8db72fc72751650 (diff)
mesa: replace gl_texture_format with gl_format
Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum. ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x. gl_texture_format will go away next.
Diffstat (limited to 'src/mesa/main/texgetimage.c')
-rw-r--r--src/mesa/main/texgetimage.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 2575d0d868e..e9e408d8c55 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -49,7 +49,7 @@
static GLboolean
is_srgb_teximage(const struct gl_texture_image *texImage)
{
- switch (texImage->TexFormat->MesaFormat) {
+ switch (texImage->TexFormat) {
case MESA_FORMAT_SRGB8:
case MESA_FORMAT_SRGBA8:
case MESA_FORMAT_SARGB8:
@@ -160,7 +160,7 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
if (format == GL_COLOR_INDEX) {
GLuint indexRow[MAX_WIDTH];
GLint col;
- GLuint indexBits = _mesa_get_format_bits(texImage->TexFormat->MesaFormat, GL_TEXTURE_INDEX_SIZE_EXT);
+ GLuint indexBits = _mesa_get_format_bits(texImage->TexFormat, GL_TEXTURE_INDEX_SIZE_EXT);
/* Can't use FetchTexel here because that returns RGBA */
if (indexBits == 8) {
const GLubyte *src = (const GLubyte *) texImage->Data;
@@ -210,9 +210,9 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
(const GLushort *) texImage->Data + row * rowstride,
width * sizeof(GLushort));
/* check for byte swapping */
- if ((texImage->TexFormat->MesaFormat == MESA_FORMAT_YCBCR
+ if ((texImage->TexFormat == MESA_FORMAT_YCBCR
&& type == GL_UNSIGNED_SHORT_8_8_REV_MESA) ||
- (texImage->TexFormat->MesaFormat == MESA_FORMAT_YCBCR_REV
+ (texImage->TexFormat == MESA_FORMAT_YCBCR_REV
&& type == GL_UNSIGNED_SHORT_8_8_MESA)) {
if (!ctx->Pack.SwapBytes)
_mesa_swap2((GLushort *) dest, width);
@@ -259,7 +259,7 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
GLint col;
GLbitfield transferOps = 0x0;
GLenum dataType =
- _mesa_get_format_datatype(texImage->TexFormat->MesaFormat);
+ _mesa_get_format_datatype(texImage->TexFormat);
/* clamp does not apply to GetTexImage (final conversion)?
* Looks like we need clamp though when going from format
@@ -350,7 +350,7 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
/* don't use texImage->CompressedSize since that may be padded out */
size = _mesa_compressed_texture_size(ctx, texImage->Width, texImage->Height,
texImage->Depth,
- texImage->TexFormat->MesaFormat);
+ texImage->TexFormat);
/* just memcpy, no pixelstore or pixel transfer */
_mesa_memcpy(img, texImage->Data, size);
@@ -439,7 +439,7 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
return GL_TRUE;
}
- baseFormat = _mesa_get_format_base_format(texImage->TexFormat->MesaFormat);
+ baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
/* Make sure the requested image format is compatible with the
* texture's format. Note that a color index texture can be converted