[Mesa-dev] [PATCH 6/8] glsl: fix partial marking for fp64 types.

Dave Airlie airlied at gmail.com
Tue Dec 8 22:06:50 PST 2015


From: Dave Airlie <airlied at redhat.com>

This doubles the element width for the types that are greater
than 2 elements wide.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/glsl/ir_set_program_inouts.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index c9b8a38..a2dea67 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;
-- 
2.5.0



More information about the mesa-dev mailing list