nir: add streams to nir data
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 7 Nov 2017 02:56:08 +0000 (13:56 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sun, 12 Nov 2017 00:08:26 +0000 (11:08 +1100)
This will be used by gallium drivers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/nir/nir.h

index caea2ea..d327f52 100644 (file)
@@ -322,6 +322,7 @@ nir_visitor::visit(ir_variable *ir)
    var->data.patch = ir->data.patch;
    var->data.invariant = ir->data.invariant;
    var->data.location = ir->data.location;
+   var->data.stream = ir->data.stream;
    var->data.compact = false;
 
    switch(ir->data.mode) {
index 6d28a8b..c055d30 100644 (file)
@@ -275,6 +275,14 @@ typedef struct nir_variable {
       unsigned int driver_location;
 
       /**
+       * Vertex stream output identifier.
+       *
+       * For packed outputs, bit 31 is set and bits [2*i+1,2*i] indicate the
+       * stream of the i-th component.
+       */
+      unsigned stream;
+
+      /**
        * output index for dual source blending.
        */
       int index;