Some nir variables are only filled up for some specific modes. We
found to need the binding for ubos/ssbos.

The comment before that code (starts with XXX) points that binding
still needs to be filled up for uniform variables at that point, and
that should be fixed, although it doesn't specify why that's a problem
or the alternative. For now doing the same for ubos/ssbos, and will
hope that the future fixing is done for all of them.
---
 src/compiler/spirv/vtn_variables.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/spirv/vtn_variables.c 
b/src/compiler/spirv/vtn_variables.c
index 04103455614..957ef0610b7 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1841,7 +1841,9 @@ vtn_create_variable(struct vtn_builder *b, struct 
vtn_value *val,
 
    vtn_foreach_decoration(b, val, var_decoration_cb, var);
 
-   if (var->mode == vtn_variable_mode_uniform) {
+   if (var->mode == vtn_variable_mode_uniform ||
+       var->mode == vtn_variable_mode_ubo ||
+       var->mode == vtn_variable_mode_ssbo) {
       /* XXX: We still need the binding information in the nir_variable
        * for these. We should fix that.
        */
-- 
2.14.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to