Mesa (master): st/mesa: fix handling of vertex array double inputs

Ilia Mirkin imirkin at kemper.freedesktop.org
Mon Aug 28 13:09:22 UTC 2017


Module: Mesa
Branch: master
Commit: ae53bff8b13b433ca79904dfbda7264eb7188fa7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae53bff8b13b433ca79904dfbda7264eb7188fa7

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Aug 27 00:41:05 2017 -0400

st/mesa: fix handling of vertex array double inputs

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 <imirkin at alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: mesa-stable at lists.freedesktop.org

---

 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 9f021962e4..95c2f85b4c 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2718,7 +2718,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;




More information about the mesa-commit mailing list