summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/program_parse.tab.c10
-rw-r--r--src/mesa/shader/program_parse.y10
2 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c
index 1d071988974..9b4c4e82775 100644
--- a/src/mesa/shader/program_parse.tab.c
+++ b/src/mesa/shader/program_parse.tab.c
@@ -4748,7 +4748,15 @@ asm_instruction_ctor(gl_inst_opcode op,
if (inst) {
_mesa_init_instructions(& inst->Base, 1);
inst->Base.Opcode = op;
- inst->Base.DstReg = *dst;
+
+ /* In the core ARB extensions only the KIL instruction doesn't have a
+ * destination register.
+ */
+ if (dst == NULL) {
+ init_dst_reg(& inst->Base.DstReg);
+ } else {
+ inst->Base.DstReg = *dst;
+ }
inst->Base.SrcReg[0] = src0->Base;
inst->SrcReg[0] = *src0;
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 9a5907a4e09..1a214b38ae8 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -1879,7 +1879,15 @@ asm_instruction_ctor(gl_inst_opcode op,
if (inst) {
_mesa_init_instructions(& inst->Base, 1);
inst->Base.Opcode = op;
- inst->Base.DstReg = *dst;
+
+ /* In the core ARB extensions only the KIL instruction doesn't have a
+ * destination register.
+ */
+ if (dst == NULL) {
+ init_dst_reg(& inst->Base.DstReg);
+ } else {
+ inst->Base.DstReg = *dst;
+ }
inst->Base.SrcReg[0] = src0->Base;
inst->SrcReg[0] = *src0;