aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/varray.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-08-30 13:41:12 +0200
committermarha <marha@users.sourceforge.net>2014-08-30 13:43:25 +0200
commite21655632e3fd40b7f6a5cc3c7f3c379d54557c4 (patch)
tree46054f4b20f70afd1c7743e54aa48471e2ded483 /mesalib/src/mesa/main/varray.c
parent6c0c95d6045d2d2b4e6a3a2f11457850031c57bc (diff)
downloadvcxsrv-e21655632e3fd40b7f6a5cc3c7f3c379d54557c4.tar.gz
vcxsrv-e21655632e3fd40b7f6a5cc3c7f3c379d54557c4.tar.bz2
vcxsrv-e21655632e3fd40b7f6a5cc3c7f3c379d54557c4.zip
xserver libxtrans libxcb xcb-proto libX11 mesa git update 30 Aug 2014
xserver commit 3a51418b2db353519a1779cf3cebbcc9afba2520 libxcb commit b0e6c2de09c7474868dd7185674fa113a5c2e0aa libxcb/xcb-proto commit dc0c544fe044ddeb4917bba0c2fed66c70e6db43 libX11 commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68 libxtrans commit 17491de45c352c833442cccf17a9bd65909889db mesa commit 932b0ef1ceecf873213447a8778e5cbe1b3b6be7
Diffstat (limited to 'mesalib/src/mesa/main/varray.c')
-rw-r--r--mesalib/src/mesa/main/varray.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index 5d3cc2a70..7d169f9d4 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -424,6 +424,13 @@ update_array(struct gl_context *ctx,
return;
}
+ if (ctx->API == API_OPENGL_CORE && ctx->Version >= 44 &&
+ stride > ctx->Const.MaxVertexAttribStride) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(stride=%d > "
+ "GL_MAX_VERTEX_ATTRIB_STRIDE)", func, stride);
+ return;
+ }
+
/* Page 29 (page 44 of the PDF) of the OpenGL 3.3 spec says:
*
* "An INVALID_OPERATION error is generated under any of the following
@@ -1437,6 +1444,13 @@ _mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset,
return;
}
+ if (ctx->API == API_OPENGL_CORE && ctx->Version >= 44 &&
+ stride > ctx->Const.MaxVertexAttribStride) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glBindVertexBuffer(stride=%d > "
+ "GL_MAX_VERTEX_ATTRIB_STRIDE)", stride);
+ return;
+ }
+
if (buffer == vao->VertexBinding[VERT_ATTRIB_GENERIC(bindingIndex)].BufferObj->Name) {
vbo = vao->VertexBinding[VERT_ATTRIB_GENERIC(bindingIndex)].BufferObj;
} else if (buffer != 0) {
@@ -1565,6 +1579,14 @@ _mesa_BindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers,
continue;
}
+ if (ctx->API == API_OPENGL_CORE && ctx->Version >= 44 &&
+ strides[i] > ctx->Const.MaxVertexAttribStride) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glBindVertexBuffers(strides[%u]=%d > "
+ "GL_MAX_VERTEX_ATTRIB_STRIDE)", i, strides[i]);
+ continue;
+ }
+
if (buffers[i]) {
struct gl_vertex_buffer_binding *binding =
&vao->VertexBinding[VERT_ATTRIB_GENERIC(first + i)];