summaryrefslogtreecommitdiff
path: root/src/mgatexmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mgatexmem.c')
-rw-r--r--src/mgatexmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mgatexmem.c b/src/mgatexmem.c
index 9a2d62b..47be6f3 100644
--- a/src/mgatexmem.c
+++ b/src/mgatexmem.c
@@ -137,7 +137,7 @@ static void mgaUploadSubImage( mgaContextPtr mmesa,
* directly used by the hardware for texturing.
*/
- texelBytes = texImage->TexFormat->TexelBytes;
+ texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
length = texImage->Width * texImage->Height * texelBytes;
if ( t->base.heap->heapId == MGA_CARD_HEAP ) {
unsigned tex_offset = 0;