From: Samuel Pitoiset Date: Mon, 2 Dec 2019 15:46:30 +0000 (+0100) Subject: radv: simplify a check in radv_fixup_vertex_input_fetches() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dac6bd29ae8440c27ac687065ace75bdb8e4b71f;p=mesa.git 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 --- 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++) {