From 371d75334ca411c49f2b2389efa61afa0603c862 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 27 Aug 2017 00:41:05 -0400 Subject: [PATCH] st/mesa: fix handling of vertex array double inputs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The is_double_vertex_input needs to be set for arrays of doubles as well. Fixes KHR-GL45.enhanced_layouts.varying_array_locations Signed-off-by: Ilia Mirkin Reviewed-by: Timothy Arceri Reviewed-by: Nicolai Hähnle Reviewed-by: Kenneth Graunke Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit ae53bff8b13b433ca79904dfbda7264eb7188fa7) --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 96c08a64f31..3b3bd702bdd 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2748,7 +2748,9 @@ glsl_to_tgsi_visitor::visit(ir_dereference_variable *ir) this->result = st_src_reg(entry->file, entry->index, var->type, entry->component, entry->array_id); - if (this->shader->Stage == MESA_SHADER_VERTEX && var->data.mode == ir_var_shader_in && var->type->is_double()) + if (this->shader->Stage == MESA_SHADER_VERTEX && + var->data.mode == ir_var_shader_in && + var->type->without_array()->is_double()) this->result.is_double_vertex_input = true; if (!native_integers) this->result.type = GLSL_TYPE_FLOAT; -- 2.11.0