summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_variable.c')
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c
index f9f02066a3..046db2cefc 100644
--- a/src/mesa/shader/slang/slang_compile_variable.c
+++ b/src/mesa/shader/slang/slang_compile_variable.c
@@ -364,6 +364,9 @@ build_quant(slang_export_data_quant * q, const slang_variable * var)
q->size = var->size;
if (spec->type == slang_spec_array) {
q->array_len = var->array_len;
+#if 1
+ if (var->array_len > 0)
+#endif
q->size /= var->array_len;
spec = spec->_array;
}