diff options
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_tex.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c index 19b270955e..0cbecd4146 100644 --- a/src/mesa/drivers/dri/unichrome/via_tex.c +++ b/src/mesa/drivers/dri/unichrome/via_tex.c @@ -691,6 +691,14 @@ static void viaTexImage(GLcontext *ctx, } texelBytes = texImage->TexFormat->TexelBytes; + if (texelBytes == 0) { + /* compressed format */ + texImage->IsCompressed = GL_TRUE; + texImage->CompressedSize = + ctx->Driver.CompressedTextureSize(ctx, texImage->Width, + texImage->Height, texImage->Depth, + texImage->TexFormat->MesaFormat); + } /* Minimum pitch of 32 bytes */ if (postConvWidth * texelBytes < 32) { @@ -782,7 +790,7 @@ static void viaTexImage(GLcontext *ctx, GLint dstRowStride, dstImageStride = 0; GLboolean success; if (texImage->IsCompressed) { - dstRowStride = _mesa_compressed_row_stride(texImage->InternalFormat,width); + dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat->MesaFormat, width); } else { dstRowStride = postConvWidth * texImage->TexFormat->TexelBytes; |