summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-01-18 15:43:38 -0800
committerIan Romanick <[email protected]>2013-01-20 20:56:20 -0500
commit1c29d8f4ffd562bc6abc2b3c37895d8db43feb95 (patch)
tree6c248d672324a35fd5d71e3c81affd1e6b8299e0 /src/mesa
parentb3eed73c3b19759b0922a7a57b6068bb69cbd710 (diff)
mesa/es3: Allow unsized depth and depth-stencil formats in ES3
They're part of GL_OES_depth_texture_cube_map, and we'll always enable that extension in ES3 contexts. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/glformats.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 3004c08e283..e4f784179c2 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -2069,12 +2069,14 @@ _mesa_es3_error_check_format_and_type(GLenum format, GLenum type,
case GL_DEPTH_COMPONENT:
switch (type) {
case GL_UNSIGNED_SHORT:
- if (internalFormat != GL_DEPTH_COMPONENT16)
+ if (internalFormat != GL_DEPTH_COMPONENT
+ && internalFormat != GL_DEPTH_COMPONENT16)
return GL_INVALID_OPERATION;
break;
case GL_UNSIGNED_INT:
switch (internalFormat) {
+ case GL_DEPTH_COMPONENT:
case GL_DEPTH_COMPONENT16:
case GL_DEPTH_COMPONENT24:
break;
@@ -2096,7 +2098,8 @@ _mesa_es3_error_check_format_and_type(GLenum format, GLenum type,
case GL_DEPTH_STENCIL:
switch (type) {
case GL_UNSIGNED_INT_24_8:
- if (internalFormat != GL_DEPTH24_STENCIL8)
+ if (internalFormat != GL_DEPTH_STENCIL
+ && internalFormat != GL_DEPTH24_STENCIL8)
return GL_INVALID_OPERATION;
break;