Lines Matching defs:newInst
51 struct prog_instruction *newInst;
73 newInst = rzalloc_array(vprog, struct prog_instruction, newLen);
74 if (!newInst) {
82 * newInst[0] = DP4 result.position.x, mvp.row[0], vertex.position;
83 * newInst[1] = DP4 result.position.y, mvp.row[1], vertex.position;
84 * newInst[2] = DP4 result.position.z, mvp.row[2], vertex.position;
85 * newInst[3] = DP4 result.position.w, mvp.row[3], vertex.position;
87 _mesa_init_instructions(newInst, 4);
89 newInst[i].Opcode = OPCODE_DP4;
90 newInst[i].DstReg.File = PROGRAM_OUTPUT;
91 newInst[i].DstReg.Index = VARYING_SLOT_POS;
92 newInst[i].DstReg.WriteMask = (WRITEMASK_X << i);
93 newInst[i].SrcReg[0].File = PROGRAM_STATE_VAR;
94 newInst[i].SrcReg[0].Index = mvpRef[i];
95 newInst[i].SrcReg[0].Swizzle = SWIZZLE_NOOP;
96 newInst[i].SrcReg[1].File = PROGRAM_INPUT;
97 newInst[i].SrcReg[1].Index = VERT_ATTRIB_POS;
98 newInst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP;
102 _mesa_copy_instructions (newInst + 4, vprog->arb.Instructions, origLen);
108 vprog->arb.Instructions = newInst;
118 struct prog_instruction *newInst;
141 newInst = rzalloc_array(vprog, struct prog_instruction, newLen);
142 if (!newInst) {
158 _mesa_init_instructions(newInst, 4);
160 newInst[0].Opcode = OPCODE_MUL;
161 newInst[0].DstReg.File = PROGRAM_TEMPORARY;
162 newInst[0].DstReg.Index = hposTemp;
163 newInst[0].DstReg.WriteMask = WRITEMASK_XYZW;
164 newInst[0].SrcReg[0].File = PROGRAM_INPUT;
165 newInst[0].SrcReg[0].Index = VERT_ATTRIB_POS;
166 newInst[0].SrcReg[0].Swizzle = SWIZZLE_XXXX;
167 newInst[0].SrcReg[1].File = PROGRAM_STATE_VAR;
168 newInst[0].SrcReg[1].Index = mvpRef[0];
169 newInst[0].SrcReg[1].Swizzle = SWIZZLE_NOOP;
172 newInst[i].Opcode = OPCODE_MAD;
173 newInst[i].DstReg.File = PROGRAM_TEMPORARY;
174 newInst[i].DstReg.Index = hposTemp;
175 newInst[i].DstReg.WriteMask = WRITEMASK_XYZW;
176 newInst[i].SrcReg[0].File = PROGRAM_INPUT;
177 newInst[i].SrcReg[0].Index = VERT_ATTRIB_POS;
178 newInst[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(i,i,i,i);
179 newInst[i].SrcReg[1].File = PROGRAM_STATE_VAR;
180 newInst[i].SrcReg[1].Index = mvpRef[i];
181 newInst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP;
182 newInst[i].SrcReg[2].File = PROGRAM_TEMPORARY;
183 newInst[i].SrcReg[2].Index = hposTemp;
184 newInst[1].SrcReg[2].Swizzle = SWIZZLE_NOOP;
187 newInst[3].Opcode = OPCODE_MAD;
188 newInst[3].DstReg.File = PROGRAM_OUTPUT;
189 newInst[3].DstReg.Index = VARYING_SLOT_POS;
190 newInst[3].DstReg.WriteMask = WRITEMASK_XYZW;
191 newInst[3].SrcReg[0].File = PROGRAM_INPUT;
192 newInst[3].SrcReg[0].Index = VERT_ATTRIB_POS;
193 newInst[3].SrcReg[0].Swizzle = SWIZZLE_WWWW;
194 newInst[3].SrcReg[1].File = PROGRAM_STATE_VAR;
195 newInst[3].SrcReg[1].Index = mvpRef[3];
196 newInst[3].SrcReg[1].Swizzle = SWIZZLE_NOOP;
197 newInst[3].SrcReg[2].File = PROGRAM_TEMPORARY;
198 newInst[3].SrcReg[2].Index = hposTemp;
199 newInst[3].SrcReg[2].Swizzle = SWIZZLE_NOOP;
203 _mesa_copy_instructions (newInst + 4, vprog->arb.Instructions, origLen);
209 vprog->arb.Instructions = newInst;
254 struct prog_instruction *newInst, *inst;
273 newInst = rzalloc_array(fprog, struct prog_instruction, newLen);
274 if (!newInst) {
281 _mesa_copy_instructions(newInst, fprog->arb.Instructions, origLen);
296 inst = newInst;
409 fprog->arb.Instructions = newInst;
410 fprog->arb.NumInstructions = inst - newInst;