Mesa (master): radv: remove unsigned comparison against 0
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 11 00:20:56 UTC 2018
Module: Mesa
Branch: master
Commit: 600d8ecb579045eec5048c141ee1f805cd4bf14b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=600d8ecb579045eec5048c141ee1f805cd4bf14b
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Oct 5 09:30:44 2018 +1000
radv: remove unsigned comparison against 0
The value is always >= 0 here.
Found by coverity
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_nir_to_llvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index b2f04d029b..a7e37958c1 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -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;
More information about the mesa-commit
mailing list