From: Neil Roberts Date: Fri, 23 Feb 2018 15:06:30 +0000 (+0100) Subject: nir: Add explicit_binding to nir_variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=652be1563fa6a042d70336431331c75f0f492341;p=mesa.git nir: Add explicit_binding to nir_variable 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 --- diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index baaa3affed9..b10c1ff4eeb 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -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; diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 66764eeaf29..7e9f3968f63 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -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. *