From 8a884a25c5a4325875324b0cc4e69851711f6c9f Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 9 Aug 2019 16:01:04 +0300 Subject: [PATCH] amd: prepare dropping include of p_compiler.h Signed-off-by: Lionel Landwerlin Acked-by: Eric Engestrom --- src/amd/common/ac_gpu_info.c | 3 ++- src/amd/common/ac_surface.c | 4 ++-- src/amd/vulkan/radv_device.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index f1f31e55abe..b02a3e98113 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -26,6 +26,7 @@ #include "ac_gpu_info.h" #include "sid.h" +#include "util/macros.h" #include "util/u_math.h" #include @@ -460,7 +461,7 @@ bool ac_query_gpu_info(int fd, void *dev_p, info->gart_page_size = alignment_info.size_remote; if (info->chip_class == GFX6) - info->gfx_ib_pad_with_type2 = TRUE; + info->gfx_ib_pad_with_type2 = true; unsigned ib_align = 0; ib_align = MAX2(ib_align, gfx.ib_start_alignment); diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index a9052d068e9..5cfd192118d 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1265,7 +1265,7 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib, return ret; surf->u.gfx9.dcc_retile_map[index * 2] = addrout.addr; - if (addrout.addr > USHRT_MAX) + if (addrout.addr > UINT16_MAX) surf->u.gfx9.dcc_retile_use_uint16 = false; /* Compute dst DCC address */ @@ -1278,7 +1278,7 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib, return ret; surf->u.gfx9.dcc_retile_map[index * 2 + 1] = addrout.addr; - if (addrout.addr > USHRT_MAX) + if (addrout.addr > UINT16_MAX) surf->u.gfx9.dcc_retile_use_uint16 = false; assert(index * 2 + 1 < surf->u.gfx9.dcc_retile_num_elements); diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 4a2d836abe3..8e5d5bee921 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -4480,7 +4480,7 @@ radv_initialise_color_surface(struct radv_device *device, format = radv_translate_colorformat(iview->vk_format); if (format == V_028C70_COLOR_INVALID || ntype == ~0u) radv_finishme("Illegal color\n"); - swap = radv_translate_colorswap(iview->vk_format, FALSE); + swap = radv_translate_colorswap(iview->vk_format, false); endian = radv_colorformat_endian_swap(format); /* blend clamp should be set for all NORM/SRGB types */ -- 2.30.2