Mesa (master): spirv: reduce array size in vtn_handle_constant
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Apr 14 20:26:08 UTC 2019
Module: Mesa
Branch: master
Commit: 73d883037d170ab8dcade3e0cfcf9f33c8ed6557
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=73d883037d170ab8dcade3e0cfcf9f33c8ed6557
Author: Karol Herbst <kherbst at redhat.com>
Date: Wed Apr 10 16:46:50 2019 +0200
spirv: reduce array size in vtn_handle_constant
we already assert above that there are no more than 3 sources, so it
doesn't make sense to use an array of 4 sources
Signed-off-by: Karol Herbst <kherbst at redhat.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/compiler/spirv/spirv_to_nir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 98205a1b8b2..6fae48074f7 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2005,7 +2005,7 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
nir_op op = vtn_nir_alu_op_for_spirv_opcode(b, opcode, &swap,
nir_alu_type_get_type_size(src_alu_type),
nir_alu_type_get_type_size(dst_alu_type));
- nir_const_value src[4];
+ nir_const_value src[3];
for (unsigned i = 0; i < count - 4; i++) {
struct vtn_value *src_val =
More information about the mesa-commit
mailing list