Module: wine Branch: refs/heads/master Commit: e0ccbeb282b8250f4555ba3ca3dba31e77047b2a URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=e0ccbeb282b8250f4555ba3c...
Author: Jason Green jave27@gmail.com Date: Tue Jun 20 18:32:52 2006 -0400
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.
---
dlls/wined3d/glsl_shader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index c85b0c9..f3c9cca 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -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));