mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 17:10:26 +01:00
mesa: Don't round-trip integer texture data through a floating point temp.
This was losing bits of precision. Fixes (with the previous commits):
piglit EXT_texture_integer/getteximage-clamping
piglit EXT_texture_integer/getteximage-clamping GL_ARB_texture_rg
oglc advanced.mipmap.upload
Regresses oglc negative.typeFormatMismatch.teximage from fail to
abort, because it's been hitting texstore for a format/type combo that
shouldn't happen.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 5f65598cc7)
This commit is contained in:
parent
05ff4d209d
commit
203ef2a12b
1 changed files with 24 additions and 21 deletions
|
|
@ -3465,13 +3465,14 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
|
|||
}
|
||||
else {
|
||||
/* general path */
|
||||
const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
|
||||
baseInternalFormat,
|
||||
baseFormat,
|
||||
srcWidth, srcHeight, srcDepth,
|
||||
srcFormat, srcType, srcAddr,
|
||||
srcPacking, 0x0);
|
||||
const GLfloat *src = tempImage;
|
||||
const GLuint *tempImage = make_temp_uint_image(ctx, dims,
|
||||
baseInternalFormat,
|
||||
baseFormat,
|
||||
srcWidth, srcHeight, srcDepth,
|
||||
srcFormat, srcType,
|
||||
srcAddr,
|
||||
srcPacking);
|
||||
const GLuint *src = tempImage;
|
||||
GLint img, row;
|
||||
if (!tempImage)
|
||||
return GL_FALSE;
|
||||
|
|
@ -3534,13 +3535,14 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
|
|||
}
|
||||
else {
|
||||
/* general path */
|
||||
const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
|
||||
baseInternalFormat,
|
||||
baseFormat,
|
||||
srcWidth, srcHeight, srcDepth,
|
||||
srcFormat, srcType, srcAddr,
|
||||
srcPacking, 0x0);
|
||||
const GLfloat *src = tempImage;
|
||||
const GLuint *tempImage = make_temp_uint_image(ctx, dims,
|
||||
baseInternalFormat,
|
||||
baseFormat,
|
||||
srcWidth, srcHeight, srcDepth,
|
||||
srcFormat, srcType,
|
||||
srcAddr,
|
||||
srcPacking);
|
||||
const GLuint *src = tempImage;
|
||||
GLint img, row;
|
||||
if (!tempImage)
|
||||
return GL_FALSE;
|
||||
|
|
@ -3603,13 +3605,14 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
|
|||
}
|
||||
else {
|
||||
/* general path */
|
||||
const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
|
||||
baseInternalFormat,
|
||||
baseFormat,
|
||||
srcWidth, srcHeight, srcDepth,
|
||||
srcFormat, srcType, srcAddr,
|
||||
srcPacking, 0x0);
|
||||
const GLfloat *src = tempImage;
|
||||
const GLuint *tempImage = make_temp_uint_image(ctx, dims,
|
||||
baseInternalFormat,
|
||||
baseFormat,
|
||||
srcWidth, srcHeight, srcDepth,
|
||||
srcFormat, srcType,
|
||||
srcAddr,
|
||||
srcPacking);
|
||||
const GLuint *src = tempImage;
|
||||
GLint img, row;
|
||||
if (!tempImage)
|
||||
return GL_FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue