diff options
author | Anuj Phogat <anuj.phogat@gmail.com> | 2014-03-21 12:55:19 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2014-05-05 11:23:20 -0700 |
commit | 2b5ad9baa149917c076dab75657163b25718b83d (patch) | |
tree | 5f5979070858b668bece482886dc0a6171970536 /src | |
parent | 87173023b285c45c27deac70aae7792e3c75b895 (diff) | |
download | mesa-2b5ad9baa149917c076dab75657163b25718b83d.tar.gz |
mesa: Add missing types in _mesa_texstore_xx_xx() functions
Depth-stencil teture targets are allowed to use source data of type
GL_UNSIGNED_INT_24_8_EXT and GL_FLOAT_32_UNSIGNED_INT_24_8_REV.
Fixes few crashes in Khronos OpenGL CTS packed_pixels tests.
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit aeb9d4495dc32bcb457045b4ea8f4e5f0d4fc8c8)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texstore.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 3e22a0b46f..416bf76a04 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -2478,7 +2478,9 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS) ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT || srcFormat == GL_STENCIL_INDEX); - ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT); + ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || + srcType == GL_UNSIGNED_INT_24_8_EXT || + srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); if (srcFormat == GL_DEPTH_COMPONENT || srcFormat == GL_STENCIL_INDEX) { @@ -2563,7 +2565,8 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS) srcFormat == GL_DEPTH_COMPONENT || srcFormat == GL_STENCIL_INDEX); ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || - srcType == GL_UNSIGNED_INT_24_8_EXT); + srcType == GL_UNSIGNED_INT_24_8_EXT || + srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); depth = malloc(srcWidth * sizeof(GLuint)); stencil = malloc(srcWidth * sizeof(GLubyte)); @@ -3431,6 +3434,7 @@ _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS) srcFormat == GL_DEPTH_COMPONENT || srcFormat == GL_STENCIL_INDEX); ASSERT(srcFormat != GL_DEPTH_STENCIL || + srcType == GL_UNSIGNED_INT_24_8 || srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); if (srcFormat == GL_DEPTH_COMPONENT || |