summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-05-04 17:34:33 +0200
committerSamuel Pitoiset <[email protected]>2017-06-14 10:04:36 +0200
commit064d6263c54cd9a3b0f5954538fa74b5022f22de (patch)
treef0f3c92a398244c86fc3a4c0020160ae875b005a /src/compiler/glsl
parent31154f097519af5143dfb3ffe67b9fe731f81b6e (diff)
glsl: add ir_variable::contains_bindless()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/ir.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir.h b/src/compiler/glsl/ir.h
index 91e665cc1b9..840c06e10ac 100644
--- a/src/compiler/glsl/ir.h
+++ b/src/compiler/glsl/ir.h
@@ -475,6 +475,17 @@ public:
}
/**
+ * Return whether this variable contains a bindless sampler/image.
+ */
+ inline bool contains_bindless() const
+ {
+ if (!this->type->contains_sampler() && !this->type->contains_image())
+ return false;
+
+ return this->data.bindless || this->data.mode != ir_var_uniform;
+ }
+
+ /**
* Set this->interface_type on a newly created variable.
*/
void init_interface_type(const struct glsl_type *type)