From: Dave Airlie Date: Mon, 12 Oct 2015 03:55:00 +0000 (+1000) Subject: glsl: fix partial marking for fp64 types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64cfacf3197170b238d68b0e4a2d556bddd1b7d7;p=mesa.git glsl: fix partial marking for fp64 types. This doubles the element width for the types that are greater than 2 elements wide. Reviewed-by: Timothy Arceri Signed-off-by: Dave Airlie --- diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp index c9b8a38384f..a2dea67c6a9 100644 --- a/src/glsl/ir_set_program_inouts.cpp +++ b/src/glsl/ir_set_program_inouts.cpp @@ -301,6 +301,13 @@ ir_set_program_inouts_visitor::try_mark_partial_variable(ir_variable *var, return false; } + /* double element width for double types that takes two slots */ + if (this->shader_stage != MESA_SHADER_VERTEX || + var->data.mode != ir_var_shader_in) { + if (type->without_array()->is_dual_slot_double()) + elem_width *= 2; + } + mark(this->prog, var, index_as_constant->value.u[0] * elem_width, elem_width, this->shader_stage); return true;