diff options
author | Ian Romanick <[email protected]> | 2013-12-18 14:43:19 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-01-21 15:39:54 -0800 |
commit | 178c1bf1adef9e3871b1ec35da839fc04fe481cf (patch) | |
tree | 2f2b5f2eb23c3799a971e2c999ed34883a4bbc79 /src/mesa/main | |
parent | 17594dccfd625556f866dcac322fc65ad81e37f3 (diff) |
mesa: Generate GL_INVALID_OPERATION for unsupported DSA TexStorage functions
We have to make the functions available to work around a GLEW bug (see
comments already in the code), but if an application calls one of these
functions we should still generate GL_INVALID_OPERATION.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/texstorage.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 97bb43cfda4..22208572f51 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -464,12 +464,16 @@ _mesa_TextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { + GET_CURRENT_CONTEXT(ctx); + (void) texture; (void) target; (void) levels; (void) internalformat; (void) width; - /* no-op */ + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage1DEXT not supported"); } @@ -478,13 +482,17 @@ _mesa_TextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { + GET_CURRENT_CONTEXT(ctx); + (void) texture; (void) target; (void) levels; (void) internalformat; (void) width; (void) height; - /* no-op */ + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage2DEXT not supported"); } @@ -494,6 +502,8 @@ _mesa_TextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { + GET_CURRENT_CONTEXT(ctx); + (void) texture; (void) target; (void) levels; @@ -501,5 +511,7 @@ _mesa_TextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, (void) width; (void) height; (void) depth; - /* no-op */ + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage3DEXT not supported"); } |