summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/syncobj.c
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2016-10-07 08:41:15 +0300
committerTapani Pälli <tapani.palli@intel.com>2016-10-10 07:29:31 +0300
commit2d7e0f35c54f49c3280eea308a652253cb3bde46 (patch)
tree19410d37ace5de1a96bd642a212e9c82c9b10786 /src/mesa/main/syncobj.c
parentd997d5c0c9e9c70a95f0c84255feec8e2963ef20 (diff)
downloadexternal_mesa3d-2d7e0f35c54f49c3280eea308a652253cb3bde46.zip
external_mesa3d-2d7e0f35c54f49c3280eea308a652253cb3bde46.tar.gz
external_mesa3d-2d7e0f35c54f49c3280eea308a652253cb3bde46.tar.bz2
mesa: throw error if bufSize negative in GetSynciv on OpenGL ES
Fixes following dEQP tests: dEQP-GLES31.functional.debug.negative_coverage.callbacks.state.get_synciv dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_synciv dEQP-GLES31.functional.debug.negative_coverage.log.state.get_synciv v2: drop _mesa_is_gles check (Kenneth) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98133 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/main/syncobj.c')
-rw-r--r--src/mesa/main/syncobj.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index be758dd..a3124e4 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -425,6 +425,14 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length,
return;
}
+ /* Section 4.1.3 (Sync Object Queries) of the OpenGL ES 3.10 spec says:
+ *
+ * "An INVALID_VALUE error is generated if bufSize is negative."
+ */
+ if (bufSize < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetSynciv(pname=0x%x)\n", pname);
+ }
+
if (size > 0 && bufSize > 0) {
const GLsizei copy_count = MIN2(size, bufSize);