From dac6bd29ae8440c27ac687065ace75bdb8e4b71f Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 2 Dec 2019 16:46:30 +0100 Subject: [PATCH] radv: simplify a check in radv_fixup_vertex_input_fetches() The number of loaded channels should always be > 0 now. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_nir_to_llvm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 51422cea12b..8d495d24c18 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -1330,10 +1330,8 @@ radv_fixup_vertex_input_fetches(struct radv_shader_context *ctx, for (unsigned i = 0; i < num_channels; i++) chan[i] = ac_llvm_extract_elem(&ctx->ac, value, i); } else { - if (num_channels) { - assert(num_channels == 1); - chan[0] = value; - } + assert(num_channels == 1); + chan[0] = value; } for (unsigned i = num_channels; i < 4; i++) { -- 2.30.2