radv: remove unsigned comparison against 0
authorDave Airlie <airlied@redhat.com>
Thu, 4 Oct 2018 23:30:44 +0000 (09:30 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 11 Oct 2018 00:19:20 +0000 (10:19 +1000)
The value is always >= 0 here.

Found by coverity

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_nir_to_llvm.c

index b2f04d029b73a686e3b8e0530e0cc3155d0a7cec..a7e37958c1361bf3e0a52c1c92a1916048158e7f 100644 (file)
@@ -2282,7 +2282,7 @@ si_llvm_init_export_args(struct radv_shader_context *ctx,
                return;
 
        bool is_16bit = ac_get_type_size(LLVMTypeOf(values[0])) == 2;
-       if (ctx->stage == MESA_SHADER_FRAGMENT && target >= V_008DFC_SQ_EXP_MRT) {
+       if (ctx->stage == MESA_SHADER_FRAGMENT) {
                unsigned index = target - V_008DFC_SQ_EXP_MRT;
                unsigned col_format = (ctx->options->key.fs.col_format >> (4 * index)) & 0xf;
                bool is_int8 = (ctx->options->key.fs.is_int8 >> index) & 1;