summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-27 21:14:12 -0600
committerBrian Paul <brianp@vmware.com>2009-09-27 21:14:12 -0600
commitef089604a9cdcb4efa0850de393e04aa8d002fae (patch)
tree5235c7396822d3097c51b2dcbdf31341fae6ab42
parent4fc344790d0fefa3c38c63cadc4ee6a52633b006 (diff)
mesa: use texture format functions
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c2
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 50ce82811c..6611956ae8 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -209,7 +209,7 @@ update_samplers(struct st_context *st)
}
xlate_border_color(texobj->BorderColor,
- teximg ? teximg->TexFormat->BaseFormat : GL_RGBA,
+ teximg ? teximg->_BaseFormat : GL_RGBA,
sampler->border_color);
sampler->max_anisotropy = texobj->MaxAnisotropy;
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 62ebdd8056..8bbffc3ff6 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -563,7 +563,7 @@ st_TexImage(GLcontext * ctx,
_mesa_set_fetch_functions(texImage, dims);
- if (texImage->TexFormat->TexelBytes == 0) {
+ if (_mesa_is_format_compressed(texImage->TexFormat->MesaFormat)) {
/* must be a compressed format */
texelBytes = 0;
texImage->IsCompressed = GL_TRUE;
@@ -573,7 +573,7 @@ st_TexImage(GLcontext * ctx,
texImage->TexFormat->MesaFormat);
}
else {
- texelBytes = texImage->TexFormat->TexelBytes;
+ texelBytes = _mesa_get_format_bytes(texImage->TexFormat->MesaFormat);
/* Minimum pitch of 32 bytes */
if (postConvWidth * texelBytes < 32) {
@@ -1838,7 +1838,7 @@ st_finalize_texture(GLcontext *ctx,
cpp = compressed_num_bytes(firstImage->base.TexFormat->MesaFormat);
}
else {
- cpp = firstImage->base.TexFormat->TexelBytes;
+ cpp = _mesa_get_format_bytes(firstImage->base.TexFormat->MesaFormat);
}
/* If we already have a gallium texture, check that it matches the texture