From 064d6263c54cd9a3b0f5954538fa74b5022f22de Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 4 May 2017 17:34:33 +0200 Subject: [PATCH] glsl: add ir_variable::contains_bindless() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- src/compiler/glsl/ir.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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. */ -- 2.30.2