mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
Merge branch 'mesa_7_5_branch'
This commit is contained in:
commit
38f5641106
2 changed files with 16 additions and 4 deletions
|
|
@ -52,6 +52,7 @@ tbd
|
|||
<li>Fixed some Gallium glBlitFramebuffer() bugs
|
||||
<li>Empty glBegin/glEnd() pair could cause divide by zero (bug 23489)
|
||||
<li>Fixed Gallium glBitmap() Z position bug
|
||||
<li>Setting arrays of sampler uniforms did not work
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1631,6 +1631,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
|||
|
||||
if (param->Type == PROGRAM_SAMPLER) {
|
||||
/* This controls which texture unit which is used by a sampler */
|
||||
GLboolean changed = GL_FALSE;
|
||||
GLint i;
|
||||
|
||||
/* this should have been caught by the compatible_types() check */
|
||||
|
|
@ -1655,13 +1656,23 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
|||
_mesa_printf("Set program %p sampler %d '%s' to unit %u\n",
|
||||
program, sampler, param->Name, texUnit);
|
||||
#endif
|
||||
program->SamplerUnits[sampler] = texUnit;
|
||||
if (program->SamplerUnits[sampler] != texUnit) {
|
||||
program->SamplerUnits[sampler] = texUnit;
|
||||
changed = GL_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_mesa_update_shader_textures_used(program);
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
if (changed) {
|
||||
/* When a sampler's value changes it usually requires rewriting
|
||||
* a GPU program's TEX instructions since there may not be a
|
||||
* sampler->texture lookup table. We signal this with the
|
||||
* ProgramStringNotify() callback.
|
||||
*/
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE | _NEW_PROGRAM);
|
||||
_mesa_update_shader_textures_used(program);
|
||||
ctx->Driver.ProgramStringNotify(ctx, program->Target, program);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* ordinary uniform variable */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue