summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 75ab9c5de7c..881b9e05de1 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -706,9 +706,11 @@ struct st_src_reg
glsl_to_tgsi_visitor::st_src_reg_for_float(float val)
{
st_src_reg src(PROGRAM_CONSTANT, -1, NULL);
+ union gl_constant_value uval;
+ uval.f = val;
src.index = _mesa_add_unnamed_constant(this->prog->Parameters,
- &val, 1, &src.swizzle);
+ &uval, 1, &src.swizzle);
return src;
}
@@ -1791,7 +1793,7 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir)
src = st_src_reg(PROGRAM_CONSTANT, -1, NULL);
src.index = _mesa_add_unnamed_constant(this->prog->Parameters,
- values,
+ (gl_constant_value *) values,
ir->type->vector_elements,
&src.swizzle);
emit(ir, TGSI_OPCODE_MOV, mat_column, src);
@@ -1829,7 +1831,7 @@ glsl_to_tgsi_visitor::visit(ir_constant *ir)
this->result = st_src_reg(PROGRAM_CONSTANT, -1, ir->type);
this->result.index = _mesa_add_unnamed_constant(this->prog->Parameters,
- values,
+ (gl_constant_value *) values,
ir->type->vector_elements,
&this->result.swizzle);
}
@@ -2401,7 +2403,7 @@ add_uniforms_to_parameters_list(struct gl_shader_program *shader_program,
*/
if (file == PROGRAM_SAMPLER) {
for (unsigned int j = 0; j < size / 4; j++)
- prog->Parameters->ParameterValues[index + j][0] = next_sampler++;
+ prog->Parameters->ParameterValues[index + j][0].f = next_sampler++;
}
/* The location chosen in the Parameters list here (returned
@@ -3762,7 +3764,7 @@ st_translate_program(
else
t->constants[i] =
ureg_DECL_immediate( ureg,
- proginfo->Parameters->ParameterValues[i],
+ (GLfloat *) proginfo->Parameters->ParameterValues[i],
4 );
break;
default: