aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-07-10 15:58:39 -0500
committerMarge Bot <[email protected]>2020-07-12 00:02:45 +0000
commit351b5137d71b8dc944bad6dcb83cd93e6d38c44e (patch)
treefe3e44eff5dc626f181007b7f9bcb7ece15a6552 /src/compiler/nir
parent81773b4b441fbd8ec284de78e4dfdcecdca112dc (diff)
spirv: Allow block-decorated struct types for constants
Whenever a struct type is decorated Block or BufferBlock we turn that into a GLSL_TYPE_INTERFACE. Since these decorations can end up random places, we should allow them for constants. Closes: #3252 Fixes: 9d0ae777dd6 "spirv: Use interface type for block and buffer..." Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5855>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_print.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index e83d411f295..fe73746c334 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -399,6 +399,7 @@ print_constant(nir_constant *c, const struct glsl_type *type, print_state *state
break;
case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_INTERFACE:
for (i = 0; i < c->num_elements; i++) {
if (i > 0) fprintf(fp, ", ");
fprintf(fp, "{ ");