radv: stop including files from mesa/main
authorMarek Olšák <marek.olsak@amd.com>
Thu, 26 Mar 2020 01:30:55 +0000 (21:30 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Mar 2020 21:00:10 +0000 (21:00 +0000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>

src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_radeon_winsys.h
src/amd/vulkan/si_cmd_buffer.c
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
src/amd/vulkan/winsys/null/radv_null_bo.c
src/amd/vulkan/winsys/null/radv_null_cs.c

index 1ecac0c1b553c369e489a963fcff339e620caaed..e95d6f1e0b8fdbec037627dfb123b831ac248b76 100644 (file)
@@ -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,
index f414437e2a39fb0cdac8478ebfd671362ea26456..c992fce953762883534644fbf49a2d280efe6677 100644 (file)
@@ -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;
index d8e0763f8fc202f9275c414f0bbfdd6bfffa23eb..133f32a4e4e6503c47ded32a3fbf019baedd52a2 100644 (file)
@@ -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"
 
index 59c628b730fceb7e3a7b2e6d5501591eca25f990..60d08e371402c386d74b4b27bf07255a0ad842a3 100644 (file)
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
-#include "main/macros.h"
+#include <string.h>
 #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,
index e53efc87f92208eb73e098e3b45257510eec9006..c0fd636de608a36dac97d7cf434bd48b64e6dc9a 100644 (file)
@@ -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,
index c07641d6ab859cf72cd009f9256716894dbc2d61..bfade961d9421b52749981e496577a6f7896202a 100644 (file)
@@ -37,6 +37,8 @@
 #include <unistd.h>
 
 #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);
index 299707f0c2b5c97414131fd8e806c1488a20e6fc..b4533bb4dc7edc6e7a1a248e9b9af779642215a6 100644 (file)
@@ -29,6 +29,7 @@
 #include <pthread.h>
 #include <errno.h>
 
+#include "util/u_memory.h"
 #include "ac_debug.h"
 #include "radv_radeon_winsys.h"
 #include "radv_amdgpu_cs.h"
index 02aad5f2ea472119f0101381dc191223c12fdd88..41e88a24a2c4fa3d7f3b7c8d64fcdc08f832e160 100644 (file)
@@ -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,
index ebf3395bf306726488b4178dc763aab98e0433b0..fc76d5c6d4e8b53b263d2a0014b8b0a05231ee0b 100644 (file)
@@ -26,6 +26,7 @@
  */
 
 #include "radv_null_cs.h"
+#include "util/u_memory.h"
 
 struct radv_null_cs {
        struct radeon_cmdbuf base;