Module: Mesa
Branch: master
Commit: 12243f682d49ee69c35a12022c03d92a3e01ca70
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=12243f682d49ee69c35a12022c03d92a3e01ca70

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Oct 30 08:17:07 2020 -0400

zink: add util function for checking whether a shader descriptor is a buffer

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9543>

---

 src/gallium/drivers/zink/zink_compiler.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_compiler.h 
b/src/gallium/drivers/zink/zink_compiler.h
index cc55a738e35..e7b0b7839c6 100644
--- a/src/gallium/drivers/zink/zink_compiler.h
+++ b/src/gallium/drivers/zink/zink_compiler.h
@@ -104,4 +104,11 @@ zink_shader_free(struct zink_context *ctx, struct 
zink_shader *shader);
 struct zink_shader *
 zink_shader_tcs_create(struct zink_context *ctx, struct zink_shader *vs);
 
+static inline bool
+zink_shader_descriptor_is_buffer(struct zink_shader *zs, enum 
zink_descriptor_type type, unsigned i)
+{
+   return zs->bindings[type][i].type == 
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER ||
+          zs->bindings[type][i].type == 
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER;
+}
+
 #endif

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to