diff options
Diffstat (limited to 'src/mesa/swrast/s_texture.c')
-rw-r--r-- | src/mesa/swrast/s_texture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index b0990a8cc30..1783d9c477f 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -104,7 +104,8 @@ _swrast_alloc_texture_image_buffer(struct gl_context *ctx, return GL_FALSE; /* RowStride and ImageSlices[] describe how to address texels in 'Data' */ - swImg->RowStride = texImage->Width; + swImg->RowStride = _mesa_format_row_stride(texImage->TexFormat, + texImage->Width); for (i = 0; i < slices; i++) { swImg->ImageSlices[i] = swImg->Buffer + bytesPerSlice * i; |