nir: add matrix_layout to nir_variable data
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 13 Mar 2020 03:18:27 +0000 (14:18 +1100)
committerMarge Bot <eric+marge@anholt.net>
Sat, 18 Apr 2020 11:50:44 +0000 (11:50 +0000)
This will be used by the following patch.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4623>

src/compiler/glsl/glsl_to_nir.cpp
src/compiler/nir/nir.h

index 2043ea8d8badbc6916f3ad9e14a433c79a3587fb..8ef74066925266231c8223ff6cbffdfff6e4299f 100644 (file)
@@ -464,6 +464,7 @@ nir_visitor::visit(ir_variable *ir)
 
    var->data.precision = ir->data.precision;
    var->data.explicit_location = ir->data.explicit_location;
+   var->data.matrix_layout = ir->data.matrix_layout;
    var->data.from_named_ifc_block = ir->data.from_named_ifc_block;
    var->data.compact = false;
 
index c76d009bf8c6342b219b69fc12840f7d3cee436a..b9a5637e68e0c8a17f5fe148e0d344cc4fa76eb8 100644 (file)
@@ -439,6 +439,11 @@ typedef struct nir_variable {
        */
       unsigned explicit_offset:1;
 
+      /**
+       * Layout of the matrix.  Uses glsl_matrix_layout values.
+       */
+      unsigned matrix_layout:2;
+
       /**
        * Non-zero if this variable was created by lowering a named interface
        * block.