mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
texcompress_s3tc/fxt1: fix stride checks (v1.1)
The fastpath currently checks the RowLength != width, but if you have a RowLength of 7, and Alignment of 4, then that shouldn't match. align the rowlength to the pack alignment before comparing. This fixes compressed cases in CTS packed_pixels_pixelstore test when SKIP_PIXELS is enabled, which causes row length to get set. v1.1: add fxt1 fix (Iago) Cc: "11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
6a3e1fb958
commit
b4a70401f5
2 changed files with 5 additions and 5 deletions
|
|
@ -65,7 +65,7 @@ _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS)
|
|||
if (srcFormat != GL_RGB ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGB/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
|
|||
if (srcFormat != GL_RGB ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGB/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
|
|
@ -187,7 +187,7 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
|
|||
if (srcFormat != GL_RGBA ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGBA/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
|
|
@ -244,7 +244,7 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
|
|||
if (srcFormat != GL_RGBA ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGBA/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
|
|
@ -300,7 +300,7 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
|
|||
if (srcFormat != GL_RGBA ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGBA/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue