summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/program_parse.tab.c4
-rw-r--r--src/mesa/shader/program_parse.y4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c
index bf48b9752fd..cb5fa7cd71c 100644
--- a/src/mesa/shader/program_parse.tab.c
+++ b/src/mesa/shader/program_parse.tab.c
@@ -4558,11 +4558,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]);
}
}
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 0260196210a..fe9022b1218 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]);
}
}