wined3d: Bind correct number of samplers for GLSL shaders.

We are only checking against GL_MAX_TEXTURES when binding samplers,
when we should be checking against the maximum number of samplers that
the card supports.  Spotted by H. Verbeet.
This commit is contained in:
Jason Green 2006-06-20 18:32:52 -04:00 committed by Alexandre Julliard
parent e8992af0fa
commit e0ccbeb282
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ void shader_glsl_load_psamplers(
int i;
char sampler_name[20];
for (i=0; i< GL_LIMITS(textures); ++i) {
for (i=0; i< GL_LIMITS(samplers); ++i) {
if (stateBlock->textures[i] != NULL) {
snprintf(sampler_name, sizeof(sampler_name), "Psampler%d", i);
name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));