summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-02-14 09:43:36 +0100
committerSamuel Pitoiset <[email protected]>2019-02-14 09:44:35 +0100
commit227df98fa63ae5cd0509399c030d74dc6f524226 (patch)
treec377f085e3a145aa84d7288ff1470adcd83bce42
parent4b3549c0846f451119ee883a33205b0caa1cf16e (diff)
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 <[email protected]>
-rw-r--r--src/amd/vulkan/radv_nir_to_llvm.c2
1 files changed, 1 insertions, 1 deletions
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);