Lines Matching full:newinst
51 struct prog_instruction *newInst;
74 newInst = _mesa_alloc_instructions(newLen);
75 if (!newInst) {
83 * newInst[0] = DP4 result.position.x, mvp.row[0], vertex.position;
84 * newInst[1] = DP4 result.position.y, mvp.row[1], vertex.position;
85 * newInst[2] = DP4 result.position.z, mvp.row[2], vertex.position;
86 * newInst[3] = DP4 result.position.w, mvp.row[3], vertex.position;
88 _mesa_init_instructions(newInst, 4);
90 newInst[i].Opcode = OPCODE_DP4;
91 newInst[i].DstReg.File = PROGRAM_OUTPUT;
92 newInst[i].DstReg.Index = VERT_RESULT_HPOS;
93 newInst[i].DstReg.WriteMask = (WRITEMASK_X << i);
94 newInst[i].SrcReg[0].File = PROGRAM_STATE_VAR;
95 newInst[i].SrcReg[0].Index = mvpRef[i];
96 newInst[i].SrcReg[0].Swizzle = SWIZZLE_NOOP;
97 newInst[i].SrcReg[1].File = PROGRAM_INPUT;
98 newInst[i].SrcReg[1].Index = VERT_ATTRIB_POS;
99 newInst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP;
103 _mesa_copy_instructions (newInst + 4, vprog->Base.Instructions, origLen);
109 vprog->Base.Instructions = newInst;
119 struct prog_instruction *newInst;
143 newInst = _mesa_alloc_instructions(newLen);
144 if (!newInst) {
160 _mesa_init_instructions(newInst, 4);
162 newInst[0].Opcode = OPCODE_MUL;
163 newInst[0].DstReg.File = PROGRAM_TEMPORARY;
164 newInst[0].DstReg.Index = hposTemp;
165 newInst[0].DstReg.WriteMask = WRITEMASK_XYZW;
166 newInst[0].SrcReg[0].File = PROGRAM_INPUT;
167 newInst[0].SrcReg[0].Index = VERT_ATTRIB_POS;
168 newInst[0].SrcReg[0].Swizzle = SWIZZLE_XXXX;
169 newInst[0].SrcReg[1].File = PROGRAM_STATE_VAR;
170 newInst[0].SrcReg[1].Index = mvpRef[0];
171 newInst[0].SrcReg[1].Swizzle = SWIZZLE_NOOP;
174 newInst[i].Opcode = OPCODE_MAD;
175 newInst[i].DstReg.File = PROGRAM_TEMPORARY;
176 newInst[i].DstReg.Index = hposTemp;
177 newInst[i].DstReg.WriteMask = WRITEMASK_XYZW;
178 newInst[i].SrcReg[0].File = PROGRAM_INPUT;
179 newInst[i].SrcReg[0].Index = VERT_ATTRIB_POS;
180 newInst[i].SrcReg[0].Swizzle = MAKE_SWIZZLE4(i,i,i,i);
181 newInst[i].SrcReg[1].File = PROGRAM_STATE_VAR;
182 newInst[i].SrcReg[1].Index = mvpRef[i];
183 newInst[i].SrcReg[1].Swizzle = SWIZZLE_NOOP;
184 newInst[i].SrcReg[2].File = PROGRAM_TEMPORARY;
185 newInst[i].SrcReg[2].Index = hposTemp;
186 newInst[1].SrcReg[2].Swizzle = SWIZZLE_NOOP;
189 newInst[3].Opcode = OPCODE_MAD;
190 newInst[3].DstReg.File = PROGRAM_OUTPUT;
191 newInst[3].DstReg.Index = VERT_RESULT_HPOS;
192 newInst[3].DstReg.WriteMask = WRITEMASK_XYZW;
193 newInst[3].SrcReg[0].File = PROGRAM_INPUT;
194 newInst[3].SrcReg[0].Index = VERT_ATTRIB_POS;
195 newInst[3].SrcReg[0].Swizzle = SWIZZLE_WWWW;
196 newInst[3].SrcReg[1].File = PROGRAM_STATE_VAR;
197 newInst[3].SrcReg[1].Index = mvpRef[3];
198 newInst[3].SrcReg[1].Swizzle = SWIZZLE_NOOP;
199 newInst[3].SrcReg[2].File = PROGRAM_TEMPORARY;
200 newInst[3].SrcReg[2].Index = hposTemp;
201 newInst[3].SrcReg[2].Swizzle = SWIZZLE_NOOP;
205 _mesa_copy_instructions (newInst + 4, vprog->Base.Instructions, origLen);
211 vprog->Base.Instructions = newInst;
257 struct prog_instruction *newInst, *inst;
276 newInst = _mesa_alloc_instructions(newLen);
277 if (!newInst) {
284 _mesa_copy_instructions(newInst, fprog->Base.Instructions, origLen);
299 inst = newInst;
412 fprog->Base.Instructions = newInst;
413 fprog->Base.NumInstructions = inst - newInst;