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 caea2ea3b2b5455b52a9d9d210e074d148523f1f..d327f52be605e272b2bfc71897fff0f33ec68c5b 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 6d28a8b32235358ed9074a3a4caba2e591a039c2..c055d300b666e2cb35eda0725622fc92edd13744 100644 (file)
@@ -274,6 +274,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.
        */