summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_mesa_to_tgsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_mesa_to_tgsi.c')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index e150dff9bb..dd7e40be08 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -158,12 +158,6 @@ map_texture_target(
GLuint textarget,
GLboolean shadow )
{
-#if 1
- /* XXX remove this line after we've checked that the rest of gallium
- * can handle the TGSI_TEXTURE_SHADOWx tokens.
- */
- shadow = GL_FALSE;
-#endif
switch( textarget ) {
case TEXTURE_1D_INDEX:
if (shadow)
@@ -225,11 +219,15 @@ static struct tgsi_full_immediate
make_immediate(const float *value, uint size)
{
struct tgsi_full_immediate imm;
+ unsigned i;
imm = tgsi_default_full_immediate();
imm.Immediate.NrTokens += size;
imm.Immediate.DataType = TGSI_IMM_FLOAT32;
- imm.u.Pointer = value;
+
+ for (i = 0; i < size; i++)
+ imm.u[i].Float = value[i];
+
return imm;
}
@@ -370,7 +368,7 @@ compile_instruction(
fullinst->Instruction.Opcode = TGSI_OPCODE_ADD;
break;
case OPCODE_BGNLOOP:
- fullinst->Instruction.Opcode = TGSI_OPCODE_BGNLOOP2;
+ fullinst->Instruction.Opcode = TGSI_OPCODE_BGNLOOP;
fullinst->InstructionExtLabel.Label = inst->BranchTarget + preamble_size;
break;
case OPCODE_BGNSUB:
@@ -428,7 +426,7 @@ compile_instruction(
fullinst->Instruction.Opcode = TGSI_OPCODE_ENDIF;
break;
case OPCODE_ENDLOOP:
- fullinst->Instruction.Opcode = TGSI_OPCODE_ENDLOOP2;
+ fullinst->Instruction.Opcode = TGSI_OPCODE_ENDLOOP;
fullinst->InstructionExtLabel.Label = inst->BranchTarget + preamble_size;
break;
case OPCODE_ENDSUB: