nir: Add explicit_binding to nir_variable
authorNeil Roberts <nroberts@igalia.com>
Fri, 23 Feb 2018 15:06:30 +0000 (16:06 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 21 Jun 2018 12:25:05 +0000 (14:25 +0200)
This is copied from the corresponding value in ir_variable. The
intention is to eventually use it in a pure-NIR linker.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/nir/nir.h

index baaa3affed907d6f0090d6fe34012293bee251a7..b10c1ff4eeba946ea5682f8219b346561c268b1e 100644 (file)
@@ -435,6 +435,7 @@ nir_visitor::visit(ir_variable *ir)
    var->data.index = ir->data.index;
    var->data.descriptor_set = 0;
    var->data.binding = ir->data.binding;
+   var->data.explicit_binding = ir->data.explicit_binding;
    var->data.bindless = ir->data.bindless;
    var->data.offset = ir->data.offset;
    var->data.image.read_only = ir->data.memory_read_only;
index 66764eeaf2913f4fdeef6c5d7346da0d93370868..7e9f3968f633c29271032c47f1ee79163ac5c613 100644 (file)
@@ -252,6 +252,11 @@ typedef struct nir_variable {
        */
       unsigned bindless:1;
 
+      /**
+       * Was an explicit binding set in the shader?
+       */
+      unsigned explicit_binding:1;
+
       /**
        * \brief Layout qualifier for gl_FragDepth.
        *