mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 20:10:23 +01:00
Don't use _mesa_swizzle_ubyte_image if all three texture formats
involved in _mesa_textore_argb/rgba8888 (source, base-internal, destination) differ. _mesa_swizzle_ubyte_image knows only about two of the formats and can't handle the case that all three are different correctly. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=3111.
This commit is contained in:
parent
a33f0d3024
commit
ffd97d20aa
1 changed files with 12 additions and 0 deletions
|
|
@ -1079,6 +1079,12 @@ _mesa_texstore_rgba8888(STORE_PARAMS)
|
|||
srcType == GL_UNSIGNED_BYTE &&
|
||||
dstFormat == &_mesa_texformat_rgba8888 &&
|
||||
littleEndian &&
|
||||
/* Three texture formats involved: srcFormat,
|
||||
* baseInternalFormat and destFormat (GL_RGBA). Only two
|
||||
* may differ. _mesa_swizzle_ubyte_image can't handle two
|
||||
* propagations at once correctly. */
|
||||
(srcFormat == baseInternalFormat ||
|
||||
baseInternalFormat == GL_RGBA) &&
|
||||
can_swizzle(srcFormat)) {
|
||||
GLubyte dstmap[4];
|
||||
|
||||
|
|
@ -1252,6 +1258,12 @@ _mesa_texstore_argb8888(STORE_PARAMS)
|
|||
dstFormat == &_mesa_texformat_argb8888 &&
|
||||
srcType == GL_UNSIGNED_BYTE &&
|
||||
littleEndian &&
|
||||
/* Three texture formats involved: srcFormat,
|
||||
* baseInternalFormat and destFormat (GL_RGBA). Only two
|
||||
* may differ. _mesa_swizzle_ubyte_image can't handle two
|
||||
* propagations at once correctly. */
|
||||
(srcFormat == baseInternalFormat ||
|
||||
baseInternalFormat == GL_RGBA) &&
|
||||
can_swizzle(srcFormat)) {
|
||||
|
||||
GLubyte dstmap[4];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue