H. Verbeet : wined3d: Take the texUnitMap into account when loading
shader_glsl_load_psamplers() .
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jun 13 06:14:02 CDT 2007
Module: wine
Branch: master
Commit: 8311ff32a383a8bd8fc8e9bfcb78a0c80925057f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8311ff32a383a8bd8fc8e9bfcb78a0c80925057f
Author: H. Verbeet <hverbeet at gmail.com>
Date: Tue Jun 12 23:08:11 2007 +0200
wined3d: Take the texUnitMap into account when loading shader_glsl_load_psamplers().
---
dlls/wined3d/glsl_shader.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 4999841..afffa23 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -87,13 +87,14 @@ static void shader_glsl_load_psamplers(
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));
- if (name_loc != -1) {
- TRACE("Loading %s for texture %d\n", sampler_name, i);
- GL_EXTCALL(glUniform1iARB(name_loc, i));
- checkGLcall("glUniform1iARB");
- }
+ snprintf(sampler_name, sizeof(sampler_name), "Psampler%d", i);
+ name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));
+ if (name_loc != -1) {
+ int mapped_unit = stateBlock->wineD3DDevice->texUnitMap[i];
+ TRACE("Loading %s for texture %d\n", sampler_name, mapped_unit);
+ GL_EXTCALL(glUniform1iARB(name_loc, mapped_unit));
+ checkGLcall("glUniform1iARB");
+ }
}
}
}
More information about the wine-cvs
mailing list