From: Marek Olšák Date: Thu, 26 Mar 2020 01:30:55 +0000 (-0400) Subject: radv: stop including files from mesa/main X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=013b65635f1db45650809d8d802436c1e9d009e3;p=mesa.git radv: stop including files from mesa/main Reviewed-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 1ecac0c1b55..e95d6f1e0b8 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -7034,6 +7034,11 @@ radv_get_max_anisotropy(struct radv_device *device, return 0; } +static inline int S_FIXED(float value, unsigned frac_bits) +{ + return value * (1 << frac_bits); +} + static void radv_init_sampler(struct radv_device *device, struct radv_sampler *sampler, diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index f414437e2a3..c992fce9537 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -46,7 +46,6 @@ #include "util/debug.h" #include "ac_exp_param.h" #include "ac_shader_util.h" -#include "main/menums.h" struct radv_blend_state { uint32_t blend_enable_4bit; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index d8e0763f8fc..133f32a4e4e 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -49,7 +49,6 @@ #include "util/macros.h" #include "util/list.h" #include "util/xmlconfig.h" -#include "main/macros.h" #include "vk_alloc.h" #include "vk_debug_report.h" diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h index 59c628b730f..60d08e37140 100644 --- a/src/amd/vulkan/radv_radeon_winsys.h +++ b/src/amd/vulkan/radv_radeon_winsys.h @@ -33,15 +33,15 @@ #include #include #include -#include "main/macros.h" +#include #include "amd_family.h" +#include "util/u_memory.h" +#include "util/u_math.h" struct radeon_info; struct ac_surf_info; struct radeon_surf; -#define FREE(x) free(x) - enum radeon_bo_domain { /* bitfield */ RADEON_DOMAIN_GTT = 2, RADEON_DOMAIN_VRAM = 4, diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index e53efc87f92..c0fd636de60 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -32,7 +32,6 @@ #include "radv_cs.h" #include "sid.h" #include "radv_util.h" -#include "main/macros.h" static void si_write_harvested_raster_configs(struct radv_physical_device *physical_device, diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index c07641d6ab8..bfade961d94 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -37,6 +37,8 @@ #include #include "util/u_atomic.h" +#include "util/u_memory.h" +#include "util/u_math.h" #define AMDGPU_TILING_SCANOUT_SHIFT 63 #define AMDGPU_TILING_SCANOUT_MASK 1 @@ -61,7 +63,7 @@ radv_amdgpu_bo_va_op(struct radv_amdgpu_winsys *ws, if (!(bo_flags & RADEON_FLAG_READ_ONLY)) flags |= AMDGPU_VM_PAGE_WRITEABLE; - size = ALIGN(size, getpagesize()); + size = align64(size, getpagesize()); return amdgpu_bo_va_op_raw(ws->dev, bo, offset, size, addr, flags, ops); diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c index 299707f0c2b..b4533bb4dc7 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c @@ -29,6 +29,7 @@ #include #include +#include "util/u_memory.h" #include "ac_debug.h" #include "radv_radeon_winsys.h" #include "radv_amdgpu_cs.h" diff --git a/src/amd/vulkan/winsys/null/radv_null_bo.c b/src/amd/vulkan/winsys/null/radv_null_bo.c index 02aad5f2ea4..41e88a24a2c 100644 --- a/src/amd/vulkan/winsys/null/radv_null_bo.c +++ b/src/amd/vulkan/winsys/null/radv_null_bo.c @@ -26,6 +26,7 @@ */ #include "radv_null_bo.h" +#include "util/u_memory.h" static struct radeon_winsys_bo * radv_null_winsys_bo_create(struct radeon_winsys *_ws, diff --git a/src/amd/vulkan/winsys/null/radv_null_cs.c b/src/amd/vulkan/winsys/null/radv_null_cs.c index ebf3395bf30..fc76d5c6d4e 100644 --- a/src/amd/vulkan/winsys/null/radv_null_cs.c +++ b/src/amd/vulkan/winsys/null/radv_null_cs.c @@ -26,6 +26,7 @@ */ #include "radv_null_cs.h" +#include "util/u_memory.h" struct radv_null_cs { struct radeon_cmdbuf base;