[Mesa-dev] [PATCH 3/5] radv: remove unsigned comparison against 0
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Oct 5 07:45:08 UTC 2018
Patches 2-3 are:
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
On 10/5/18 2:00 AM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> The value is always >= 0 here.
>
> Found by coverity
> ---
> 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 32d347ebd0f..bf6b8aee50e 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-dev
mailing list