summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parse.y
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-07-22 12:29:48 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-07-22 12:29:48 -0700
commitaec429170681567414de70814f69244758323e75 (patch)
tree6b4e03c405d8e547327adcddf5c0dd243ebb51ab /src/mesa/shader/program_parse.y
parent69d3d19b54c46cb7b0e05c04a5304830a1ee2691 (diff)
parser: Initialize unused instruction source registers
The 965 driver expects unused source registers (e.g., SrcReg[2] of a DP3 instruction) to have a register file of PROGRAM_UNDEFINED. Initializing these source registers ensures that this happens.
Diffstat (limited to 'src/mesa/shader/program_parse.y')
-rw-r--r--src/mesa/shader/program_parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 0260196210..fe9022b121 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -1774,11 +1774,15 @@ asm_instruction_ctor(gl_inst_opcode op,
if (src1 != NULL) {
inst->Base.SrcReg[1] = src1->Base;
inst->SrcReg[1] = *src1;
+ } else {
+ init_src_reg(& inst->SrcReg[1]);
}
if (src2 != NULL) {
inst->Base.SrcReg[2] = src2->Base;
inst->SrcReg[2] = *src2;
+ } else {
+ init_src_reg(& inst->SrcReg[2]);
}
}