radv: simplify a check in radv_fixup_vertex_input_fetches()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 2 Dec 2019 15:46:30 +0000 (16:46 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 4 Dec 2019 07:04:05 +0000 (08:04 +0100)
The number of loaded channels should always be > 0 now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_nir_to_llvm.c

index 51422cea12bccd74f8f4f8f3dab9b21dade5157a..8d495d24c187f7efa6c77c66cff7fa73a15fae52 100644 (file)
@@ -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++) {