[Mesa-dev] [PATCH v3 19/63] glsl: add ir_variable::contains_bindless()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Jun 9 13:35:17 UTC 2017
v2: - rename is_bindless() to contains_bindless()
- update the comment
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com> (v1)
---
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 91e665cc1b..840c06e10a 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)
--
2.13.1
More information about the mesa-dev
mailing list