From: Samuel Pitoiset Date: Thu, 14 Feb 2019 08:43:36 +0000 (+0100) Subject: radv: fix radv_fixup_vertex_input_fetches() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=227df98fa63ae5cd0509399c030d74dc6f524226;p=mesa.git 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 --- 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);