diff options
author | marha <marha@users.sourceforge.net> | 2014-08-30 13:41:12 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-08-30 13:43:25 +0200 |
commit | e21655632e3fd40b7f6a5cc3c7f3c379d54557c4 (patch) | |
tree | 46054f4b20f70afd1c7743e54aa48471e2ded483 /mesalib/src/mesa/main | |
parent | 6c0c95d6045d2d2b4e6a3a2f11457850031c57bc (diff) | |
download | vcxsrv-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')
-rw-r--r-- | mesalib/src/mesa/main/context.c | 3 | ||||
-rw-r--r-- | mesalib/src/mesa/main/get_hash_params.py | 3 | ||||
-rw-r--r-- | mesalib/src/mesa/main/mtypes.h | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/main/texobj.c | 16 | ||||
-rw-r--r-- | mesalib/src/mesa/main/varray.c | 22 |
5 files changed, 41 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 232084267..fbdbd680a 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -670,6 +670,9 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api) ? GL_CONTEXT_CORE_PROFILE_BIT : GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; + /* GL 4.4 */ + consts->MaxVertexAttribStride = 2048; + /** GL_EXT_gpu_shader4 */ consts->MinProgramTexelOffset = -8; consts->MaxProgramTexelOffset = 7; diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py index ff858207b..aace8a5b5 100644 --- a/mesalib/src/mesa/main/get_hash_params.py +++ b/mesalib/src/mesa/main/get_hash_params.py @@ -712,6 +712,9 @@ descriptor=[ [ "MAX_GEOMETRY_INPUT_COMPONENTS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents), extra_version_32" ], [ "MAX_GEOMETRY_OUTPUT_COMPONENTS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents), extra_version_32" ], +# GL 4.4 + [ "MAX_VERTEX_ATTRIB_STRIDE", "CONTEXT_ENUM(Const.MaxVertexAttribStride), NO_EXTRA" ], + # GL_ARB_robustness [ "RESET_NOTIFICATION_STRATEGY_ARB", "CONTEXT_ENUM(Const.ResetStrategy), NO_EXTRA" ], diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index cb2a4df4f..dc25ea467 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -2317,9 +2317,6 @@ struct gl_geometry_program_state struct gl_geometry_program *_Current; GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ - - /** Cache of fixed-function programs */ - struct gl_program_cache *Cache; }; /** @@ -3414,6 +3411,9 @@ struct gl_constants /** OpenGL version 3.2 */ GLbitfield ProfileMask; /**< Mask of CONTEXT_x_PROFILE_BIT */ + /** OpenGL version 4.4 */ + GLuint MaxVertexAttribStride; + /** GL_EXT_transform_feedback */ GLuint MaxTransformFeedbackBuffers; GLuint MaxTransformFeedbackSeparateComponents; diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c index 2a82c2d4e..923cf60d7 100644 --- a/mesalib/src/mesa/main/texobj.c +++ b/mesalib/src/mesa/main/texobj.c @@ -772,18 +772,21 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex) { if (!ctx->Shared->FallbackTex[tex]) { /* create fallback texture now */ - const GLsizei width = 1, height = 1, depth = 1; - GLubyte texel[4]; + const GLsizei width = 1, height = 1; + GLsizei depth = 1; + GLubyte texel[24]; struct gl_texture_object *texObj; struct gl_texture_image *texImage; mesa_format texFormat; GLuint dims, face, numFaces = 1; GLenum target; - texel[0] = - texel[1] = - texel[2] = 0x0; - texel[3] = 0xff; + for (face = 0; face < 6; face++) { + texel[4*face + 0] = + texel[4*face + 1] = + texel[4*face + 2] = 0x0; + texel[4*face + 3] = 0xff; + } switch (tex) { case TEXTURE_2D_ARRAY_INDEX: @@ -822,6 +825,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex) case TEXTURE_CUBE_ARRAY_INDEX: dims = 3; target = GL_TEXTURE_CUBE_MAP_ARRAY; + depth = 6; break; case TEXTURE_EXTERNAL_INDEX: dims = 2; 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)]; |