diff options
author | marha <marha@users.sourceforge.net> | 2011-07-26 12:48:28 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-26 12:48:28 +0200 |
commit | dc23661fa1d58aa98d67fae47a919de452b8cd28 (patch) | |
tree | 0a8c7987f3756290e3ba9cfb8cdf23d6e9532037 /mesalib/src/mesa/program | |
parent | 8680f93ff96770b0a022596d8d4092a29c586435 (diff) | |
parent | ece07bdeaa82ea59e74bcfc588bcabe5e47567c1 (diff) | |
download | vcxsrv-dc23661fa1d58aa98d67fae47a919de452b8cd28.tar.gz vcxsrv-dc23661fa1d58aa98d67fae47a919de452b8cd28.tar.bz2 vcxsrv-dc23661fa1d58aa98d67fae47a919de452b8cd28.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libX11/specs/libX11/CH11.xml
mesalib/src/glsl/main.cpp
mesalib/src/mesa/main/compiler.h
mesalib/src/mesa/main/get.c
mesalib/src/mesa/main/texcompress.c
mesalib/src/mesa/main/texparam.c
mesalib/src/mesa/program/ir_to_mesa.cpp
mesalib/src/mesa/program/prog_optimize.c
pixman/pixman/pixman-fast-path.c
pixman/pixman/pixman-fast-path.h
xorg-server/hw/xquartz/GL/indirect.c
xorg-server/hw/xquartz/X11Application.h
xorg-server/hw/xquartz/X11Application.m
xorg-server/hw/xquartz/bundle/Resources/French.lproj/locversion.plist
xorg-server/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib
xorg-server/hw/xquartz/bundle/Resources/German.lproj/locversion.plist
xorg-server/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib
xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist
xorg-server/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib
xorg-server/hw/xquartz/darwinEvents.c
xorg-server/hw/xquartz/darwinEvents.h
xorg-server/hw/xquartz/man/Xquartz.man
xorg-server/hw/xquartz/xpr/dri.c
xorg-server/xkeyboard-config/symbols/ee
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r-- | mesalib/src/mesa/program/ir_to_mesa.cpp | 20 | ||||
-rw-r--r-- | mesalib/src/mesa/program/prog_optimize.c | 9 |
2 files changed, 25 insertions, 4 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index 24369a24a..f39fa37d5 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -134,7 +134,7 @@ src_reg::src_reg(dst_reg reg) this->index = reg.index;
this->swizzle = SWIZZLE_XYZW;
this->negate = 0;
- this->reladdr = NULL;
+ this->reladdr = reg.reladdr;
}
dst_reg::dst_reg(src_reg reg)
@@ -1415,9 +1415,9 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir) case ir_var_in:
case ir_var_inout:
/* The linker assigns locations for varyings and attributes,
- * including deprecated builtins (like gl_Color), user-assign
- * generic attributes (glBindVertexLocation), and
- * user-defined varyings.
+ * including deprecated builtins (like gl_Color),
+ * user-assigned generic attributes (glBindVertexLocation),
+ * and user-defined varyings.
*
* FINISHME: We would hit this path for function arguments. Fix!
*/
@@ -1496,6 +1496,18 @@ ir_to_mesa_visitor::visit(ir_dereference_array *ir) this->result, src_reg_for_float(element_size));
}
+ /* If there was already a relative address register involved, add the
+ * new and the old together to get the new offset.
+ */
+ if (src.reladdr != NULL) {
+ src_reg accum_reg = get_temp(glsl_type::float_type);
+
+ emit(ir, OPCODE_ADD, dst_reg(accum_reg),
+ index_reg, *src.reladdr);
+
+ index_reg = accum_reg;
+ }
+
src.reladdr = ralloc(mem_ctx, src_reg);
memcpy(src.reladdr, &index_reg, sizeof(index_reg));
}
diff --git a/mesalib/src/mesa/program/prog_optimize.c b/mesalib/src/mesa/program/prog_optimize.c index 0c5129ba9..bb908067d 100644 --- a/mesalib/src/mesa/program/prog_optimize.c +++ b/mesalib/src/mesa/program/prog_optimize.c @@ -1319,6 +1319,15 @@ _mesa_simplify_cmp(struct gl_program * program) inst->Opcode = OPCODE_MOV;
inst->SrcReg[0] = inst->SrcReg[1];
+
+ /* Unused operands are expected to have the file set to
+ * PROGRAM_UNDEFINED. This is how _mesa_init_instructions initializes
+ * all of the sources.
+ */
+ inst->SrcReg[1].File = PROGRAM_UNDEFINED;
+ inst->SrcReg[1].Swizzle = SWIZZLE_NOOP;
+ inst->SrcReg[2].File = PROGRAM_UNDEFINED;
+ inst->SrcReg[2].Swizzle = SWIZZLE_NOOP;
}
}
if (dbg) {
|