* Convert IR storage to an instruction src register.
*/
static void
-storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st,
- GLuint swizzle)
+storage_to_src_reg(struct prog_src_register *src, const slang_ir_storage *st)
{
static const GLuint defaultSwizzle[4] = {
MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X),
/* gen this instruction */
inst = new_instruction(prog, info->InstOpcode);
- storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store,
- /**n->Children[0]->Swizzle*/0);
- storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store,
- /**n->Children[1]->Swizzle*/0);
+ storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store);
+ storage_to_src_reg(&inst->SrcReg[1], n->Children[1]->Store);
free_temp_storage(vt, n->Children[0]);
free_temp_storage(vt, n->Children[1]);
/* gen this instruction */
inst = new_instruction(prog, info->InstOpcode);
- storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store,
- /**n->Children[0]->Swizzle*/0);
+ storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store);
free_temp_storage(vt, n->Children[0]);
if (!n->Store) {
inst = new_instruction(prog, OPCODE_MOV);
storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
- storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store,
- /**n->Children[0]->Swizzle*/0);
+ storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store);
inst->SrcReg[0].NegateBase = NEGATE_XYZW;
inst->Comment = n->Comment;
return inst;
storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
/* Child[1] is the coord */
- storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store,
- /**n->Children[1]->Swizzle*/0);
+ storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store);
/* Child[0] is the sampler (a uniform which'll indicate the texture unit) */
assert(n->Children[0]->Store);
inst = new_instruction(prog, OPCODE_MOV);
inst->Comment = _mesa_strdup("IR_MOVE block");
storage_to_dst_reg(&inst->DstReg, &dstStore, n->Writemask);
- storage_to_src_reg(&inst->SrcReg[0], &srcStore,
- /**n->Children[1]->Swizzle*/0);
+ storage_to_src_reg(&inst->SrcReg[0], &srcStore);
srcStore.Index++;
dstStore.Index++;
size -= 4;
assert(n->Children[0]->Store->Index >= 0);
assert(n->Children[0]->Store->Index < 16);
storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store, n->Writemask);
- storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store,
- /**n->Children[1]->Swizzle*/0);
+ storage_to_src_reg(&inst->SrcReg[0], n->Children[1]->Store);
}
/* XXX is this test correct? */
if (_slang_is_temp(vt, n->Children[1]->Store->Index)) {
inst = new_instruction(prog, OPCODE_MOV);
inst->CondUpdate = GL_TRUE;
storage_to_dst_reg(&inst->DstReg, n->Store, n->Writemask);
- storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store,
- /**n->Children[0]->Swizzle*/0);
+ storage_to_src_reg(&inst->SrcReg[0], n->Children[0]->Store);
_slang_free_temp(vt, n->Store->Index, n->Store->Size);
return inst; /* XXX or null? */
}