From 227df98fa63ae5cd0509399c030d74dc6f524226 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 14 Feb 2019 09:43:36 +0100 Subject: [PATCH] radv: fix radv_fixup_vertex_input_fetches() We should check that num_channels is 4, otherwise that breaks the world. Sorry for the short breakage. Fixes: 4b3549c0846 ("radv: reduce the number of loaded channels for vertex input fetches") Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 08ab64971ab..f1fc392292a 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -2072,7 +2072,7 @@ radv_fixup_vertex_input_fetches(struct radv_shader_context *ctx, if (LLVMGetTypeKind(LLVMTypeOf(value)) == LLVMVectorTypeKind) { unsigned vec_size = LLVMGetVectorSize(LLVMTypeOf(value)); - if (num_channels == vec_size) + if (num_channels == 4 && num_channels == vec_size) return value; num_channels = MIN2(num_channels, vec_size); -- 2.30.2