summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2014-03-21 13:07:13 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2014-05-01 10:58:40 -0700
commit1a8f9ba9b3aa8bed2047ff7c0b5816edb9c9cb62 (patch)
treee0ca49a8f0bb2e0c19c4692c0237738c2d89a8bf
parentaeb9d4495dc32bcb457045b4ea8f4e5f0d4fc8c8 (diff)
mesa: Allow srcFormat=GL_DEPTH_STENCIL in _mesa_texstore_xx_xx() functions
_mesa_texstore_z24_s8() and _mesa_texstore_z32f_x24s8() are capable of handling GL_DEPTH_STENCIL format. So, allow it in both the functions. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r--src/mesa/main/texstore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 8b369fc5c26..f6268600ceb 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2483,7 +2483,8 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS)
srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV);
if (srcFormat == GL_DEPTH_COMPONENT ||
- srcFormat == GL_STENCIL_INDEX) {
+ srcFormat == GL_STENCIL_INDEX ||
+ srcFormat == GL_DEPTH_STENCIL) {
GLuint *depth = malloc(srcWidth * sizeof(GLuint));
GLubyte *stencil = malloc(srcWidth * sizeof(GLubyte));
@@ -3429,7 +3430,8 @@ _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS)
srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV);
if (srcFormat == GL_DEPTH_COMPONENT ||
- srcFormat == GL_STENCIL_INDEX) {
+ srcFormat == GL_STENCIL_INDEX ||
+ srcFormat == GL_DEPTH_STENCIL) {
GLint img, row;
const GLint srcRowStride
= _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType)