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

Author: Nicolai Hähnle <[email protected]>
Date:   Thu Sep  7 18:43:42 2017 +0200

st/glsl_to_tgsi: only the first (inner-most) array reference can be a 2D index

Don't get distracted by record dereferences between array references.

Fixes dEQP-GLES31.functional.tessellation.user_defined_io.per_vertex_block.*

Cc: [email protected]
Reviewed-by: Marek Olšák <[email protected]>

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
 1 file changed, 1 insertion(+), 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 026aea5d53..cf6e8f8fde 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2532,7 +2532,7 @@ glsl_to_tgsi_visitor::visit(ir_dereference_array *ir)
    ir->array->accept(this);
    src = this->result;
 
-   if (ir->array->ir_type != ir_type_dereference_array) {
+   if (!src.has_index2) {
       switch (this->prog->Target) {
       case GL_TESS_CONTROL_PROGRAM_NV:
          is_2D = (src.file == PROGRAM_INPUT || src.file == PROGRAM_OUTPUT) &&

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to