Module: wine
Branch: master
Commit: 2cb49c67dbfde20a154a78bd349c919fb63fbe6f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2cb49c67dbfde20a154a78bd3…
Author: H. Verbeet <hverbeet(a)gmail.com>
Date: Mon Jan 15 19:36:11 2007 +0100
wined3d: Pass the correct mask to shader_glsl_add_src_param() in shader_glsl_loop().
Fix the comment.
---
dlls/wined3d/glsl_shader.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 97cb950..4d575d6 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1397,17 +1397,18 @@ void shader_glsl_sincos(SHADER_OPCODE_AR
}
/** Process the WINED3DSIO_LOOP instruction in GLSL:
- * Start a for() loop where src0.y is the initial value of aL,
- * increment aL by src0.z for a total of src0.x iterations.
+ * Start a for() loop where src1.y is the initial value of aL,
+ * increment aL by src1.z for a total of src1.x iterations.
* Need to use a temporary variable for this operation.
*/
+/* FIXME: I don't think nested loops will work correctly this way. */
void shader_glsl_loop(SHADER_OPCODE_ARG* arg) {
char src1_str[100];
char src1_reg[50];
char src1_mask[6];
- shader_glsl_add_src_param_old(arg, arg->src[1], arg->src_addr[1], src1_reg, src1_mask, src1_str);
+ shader_glsl_add_src_param(arg, arg->src[1], arg->src_addr[1], WINED3DSP_WRITEMASK_ALL, src1_reg, src1_mask, src1_str);
shader_addline(arg->buffer, "for (tmpInt = 0, aL = %s.y; tmpInt < %s.x; tmpInt++, aL += %s.z) {\n",
src1_reg, src1_reg, src1_reg);