diff options
author | Dave Airlie <[email protected]> | 2016-06-01 16:35:59 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-06-01 17:01:19 +1000 |
commit | 6400144041da541e81d88679f5535f04ccabbbc4 (patch) | |
tree | fbe3c848fd50848bcda04de7b277d1ee3c3fb44f /src/mesa/main | |
parent | 0ebf4257a385972be0b6e851383ee6b728515aad (diff) |
mesa/sampler: fix error codes for sampler parameters.
The initial ARB_sampler_objects spec had GL_INVALID_VALUE in it,
however version 8 of it fixed this, and the GL specs also have
the fixed value in them.
Fixes:
GL45-CTS.texture_border_clamp.samplerparameteri_non_gen_sampler_error
Reviewed-by: Ilia Mirkin <[email protected]>
Cc: "12.0 11.2" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/samplerobj.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 14f2b45fe1d..2118f0ecb87 100644 --- a/src/mesa/main/samplerobj.c +++ b/src/mesa/main/samplerobj.c @@ -811,10 +811,8 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param) * "An INVALID_OPERATION error is generated if sampler is not the name * of a sampler object previously returned from a call to GenSamplers." * - * In desktop GL, an GL_INVALID_VALUE is returned instead. */ - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glSamplerParameteri(sampler %u)", sampler); return; } @@ -904,10 +902,8 @@ _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) * "An INVALID_OPERATION error is generated if sampler is not the name * of a sampler object previously returned from a call to GenSamplers." * - * In desktop GL, an GL_INVALID_VALUE is returned instead. */ - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glSamplerParameterf(sampler %u)", sampler); return; } @@ -995,11 +991,8 @@ _mesa_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params) * * "An INVALID_OPERATION error is generated if sampler is not the name * of a sampler object previously returned from a call to GenSamplers." - * - * In desktop GL, an GL_INVALID_VALUE is returned instead. */ - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glSamplerParameteriv(sampler %u)", sampler); return; } @@ -1096,10 +1089,8 @@ _mesa_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params) * "An INVALID_OPERATION error is generated if sampler is not the name * of a sampler object previously returned from a call to GenSamplers." * - * In desktop GL, an GL_INVALID_VALUE is returned instead. */ - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glSamplerParameterfv(sampler %u)", sampler); return; } @@ -1184,8 +1175,7 @@ _mesa_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params) sampObj = _mesa_lookup_samplerobj(ctx, sampler); if (!sampObj) { - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glSamplerParameterIiv(sampler %u)", sampler); return; } @@ -1271,8 +1261,7 @@ _mesa_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params) sampObj = _mesa_lookup_samplerobj(ctx, sampler); if (!sampObj) { - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glSamplerParameterIuiv(sampler %u)", sampler); return; } @@ -1362,10 +1351,8 @@ _mesa_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params) * "An INVALID_OPERATION error is generated if sampler is not the name * of a sampler object previously returned from a call to GenSamplers." * - * In desktop GL, an GL_INVALID_VALUE is returned instead. */ - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSamplerParameteriv(sampler %u)", sampler); return; } @@ -1456,10 +1443,8 @@ _mesa_GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params) * "An INVALID_OPERATION error is generated if sampler is not the name * of a sampler object previously returned from a call to GenSamplers." * - * In desktop GL, an GL_INVALID_VALUE is returned instead. */ - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSamplerParameterfv(sampler %u)", sampler); return; } @@ -1533,8 +1518,7 @@ _mesa_GetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params) sampObj = _mesa_lookup_samplerobj(ctx, sampler); if (!sampObj) { - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSamplerParameterIiv(sampler %u)", sampler); return; @@ -1609,8 +1593,7 @@ _mesa_GetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params) sampObj = _mesa_lookup_samplerobj(ctx, sampler); if (!sampObj) { - _mesa_error(ctx, (_mesa_is_gles(ctx) ? - GL_INVALID_OPERATION : GL_INVALID_VALUE), + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetSamplerParameterIuiv(sampler %u)", sampler); return; |