diff options
author | marha <marha@users.sourceforge.net> | 2014-10-25 19:53:22 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-25 19:53:22 +0200 |
commit | d6d5581d5fba846c8476ad4d593da662306765d7 (patch) | |
tree | 7a864e15d2c5007b7c3298487a59f11f15c55c75 /mesalib/src/mesa/main/uniforms.c | |
parent | a14858a22f164b5accc4bd192a5d3de21d88e3d1 (diff) | |
download | vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.tar.gz vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.tar.bz2 vcxsrv-d6d5581d5fba846c8476ad4d593da662306765d7.zip |
libXft mesa xserver pixman xkeyboard-config git update 25 Oct 2014
xserver commit 16a32c53f6e9ad1f3284d4596edfa33e9efb740e
xkeyboard-config commit 0d4c3d9d891536aa1ec4f1fff5e3df51cfd2718d
pixman commit 594e6a6c93e92fcfb495e987aec5617f6c37f467
libXft commit e8a83226bc10afb587f6f34daac44d2ef809c85e
mesa commit 13862812dc910a4ef57cb72cb9fe777ce3c14515
Diffstat (limited to 'mesalib/src/mesa/main/uniforms.c')
-rw-r--r-- | mesalib/src/mesa/main/uniforms.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/uniforms.c b/mesalib/src/mesa/main/uniforms.c index 0d0cbf57e..c30710772 100644 --- a/mesalib/src/mesa/main/uniforms.c +++ b/mesalib/src/mesa/main/uniforms.c @@ -75,12 +75,26 @@ _mesa_update_shader_textures_used(struct gl_shader_program *shProg, memcpy(prog->SamplerUnits, shader->SamplerUnits, sizeof(prog->SamplerUnits)); memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed)); + shProg->SamplersValidated = GL_TRUE; + for (s = 0; s < MAX_SAMPLERS; s++) { if (prog->SamplersUsed & (1 << s)) { GLuint unit = shader->SamplerUnits[s]; GLuint tgt = shader->SamplerTargets[s]; assert(unit < Elements(prog->TexturesUsed)); assert(tgt < NUM_TEXTURE_TARGETS); + + /* The types of the samplers associated with a particular texture + * unit must be an exact match. Page 74 (page 89 of the PDF) of the + * OpenGL 3.3 core spec says: + * + * "It is not allowed to have variables of different sampler + * types pointing to the same texture image unit within a program + * object." + */ + if (prog->TexturesUsed[unit] & ~(1 << tgt)) + shProg->SamplersValidated = GL_FALSE; + prog->TexturesUsed[unit] |= (1 << tgt); } } @@ -917,7 +931,7 @@ _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name) return -1; } - index = _mesa_get_uniform_location(ctx, shProg, name, &offset); + index = _mesa_get_uniform_location(shProg, name, &offset); if (index == GL_INVALID_INDEX) return -1; @@ -990,7 +1004,7 @@ _mesa_GetUniformIndices(GLuint program, for (i = 0; i < uniformCount; i++) { unsigned offset; - uniformIndices[i] = _mesa_get_uniform_location(ctx, shProg, + uniformIndices[i] = _mesa_get_uniform_location(shProg, uniformNames[i], &offset); } } @@ -1096,7 +1110,7 @@ _mesa_GetActiveUniformBlockiv(GLuint program, for (i = 0; i < block->NumUniforms; i++) { unsigned offset; const int idx = - _mesa_get_uniform_location(ctx, shProg, + _mesa_get_uniform_location(shProg, block->Uniforms[i].IndexName, &offset); if (idx != -1) @@ -1113,7 +1127,7 @@ _mesa_GetActiveUniformBlockiv(GLuint program, for (i = 0; i < block->NumUniforms; i++) { unsigned offset; const int idx = - _mesa_get_uniform_location(ctx, shProg, + _mesa_get_uniform_location(shProg, block->Uniforms[i].IndexName, &offset); |