From: Samuel Pitoiset Date: Thu, 4 May 2017 15:34:33 +0000 (+0200) Subject: glsl: add ir_variable::contains_bindless() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=064d6263c54cd9a3b0f5954538fa74b5022f22de;p=mesa.git glsl: add ir_variable::contains_bindless() Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- 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 @@ -474,6 +474,17 @@ public: return this->type->without_array() == this->interface_type; } + /** + * 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. */