summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-07-18 15:10:49 -0700
committerKenneth Graunke <[email protected]>2013-07-18 16:57:24 -0700
commit4da1504c0fd0cfccbff514ed03c4dc5deb24cf73 (patch)
treef7f5475ead39c5734c9f9ec17821ee7ec57f573f /src/glsl/ir.h
parent5e5e12040beb40ff93797d55c913ebe6cd00c2ae (diff)
glsl: Add ir_variable fields for explicit bindings.
These are not used yet, but they exist and are copied appropriately. v2: Add an explicit "int binding" variable rather than reusing constant_value, as suggested by Paul Berry. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r--src/glsl/ir.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 1f0dc0906a1..7ac291cf40e 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -471,6 +471,14 @@ public:
unsigned explicit_index:1;
/**
+ * Was an initial binding explicitly set in the shader?
+ *
+ * If so, constant_value contains an integer ir_constant representing the
+ * initial binding point.
+ */
+ unsigned explicit_binding:1;
+
+ /**
* Does this variable have an initializer?
*
* This is used by the linker to cross-validiate initializers of global
@@ -528,6 +536,13 @@ public:
int index;
/**
+ * Initial binding point for a sampler or UBO.
+ *
+ * For array types, this represents the binding point for the first element.
+ */
+ int binding;
+
+ /**
* Built-in state that backs this uniform
*
* Once set at variable creation, \c state_slots must remain invariant.