[Mesa-dev] [PATCH 04/22] gallium/radeon: cleanup header inclusion
Emil Velikov
emil.l.velikov at gmail.com
Mon Aug 18 16:20:41 PDT 2014
- Add top_srcdir/src/gallium/winsys to GALLIUM_DRIVER_C{XXFLAGS}.
- Remove top_srcdir/src/gallium/drivers/radeon from the includes.
As a result:
- Common radeon headers are already prefixed with 'radeon/'
- Winsys header inclusion is prefixed 'radeon/drm'
Cc: Marek Olšák <marek.olsak at amd.com>
Cc: Michel Dänzer <michel.daenzer at amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/Automake.inc | 2 ++
src/gallium/drivers/r300/compiler/r300_fragprog.c | 2 +-
src/gallium/drivers/r300/compiler/r300_fragprog_emit.c | 2 +-
src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c | 2 +-
src/gallium/drivers/r300/compiler/r3xx_vertprog.c | 2 +-
src/gallium/drivers/r300/compiler/r3xx_vertprog_dump.c | 2 +-
src/gallium/drivers/r300/compiler/r500_fragprog.c | 2 +-
src/gallium/drivers/r300/compiler/r500_fragprog_emit.c | 2 +-
src/gallium/drivers/r300/r300_chipset.c | 2 +-
src/gallium/drivers/r300/r300_context.h | 2 +-
src/gallium/drivers/r300/r300_screen.h | 2 +-
src/gallium/drivers/r600/Makefile.am | 3 +--
src/gallium/drivers/r600/r600_llvm.c | 4 ++--
src/gallium/drivers/r600/r600_llvm.h | 2 +-
src/gallium/drivers/r600/r600_pipe.h | 4 ++--
src/gallium/drivers/radeon/r600_pipe_common.h | 2 +-
src/gallium/drivers/radeon/radeon_uvd.c | 2 +-
src/gallium/drivers/radeon/radeon_uvd.h | 2 +-
src/gallium/drivers/radeon/radeon_vce.c | 2 +-
src/gallium/drivers/radeon/radeon_vce_40_2_2.c | 2 +-
src/gallium/drivers/radeon/radeon_video.c | 2 +-
src/gallium/drivers/radeon/radeon_video.h | 2 +-
src/gallium/drivers/radeonsi/Makefile.am | 1 -
src/gallium/drivers/radeonsi/si_compute.c | 4 ++--
src/gallium/drivers/radeonsi/si_descriptors.c | 2 +-
src/gallium/drivers/radeonsi/si_dma.c | 2 +-
src/gallium/drivers/radeonsi/si_pm4.c | 2 +-
src/gallium/drivers/radeonsi/si_pm4.h | 2 +-
src/gallium/drivers/radeonsi/si_shader.c | 4 ++--
src/gallium/drivers/radeonsi/si_state.c | 2 +-
src/gallium/drivers/radeonsi/si_state.h | 2 +-
src/gallium/drivers/radeonsi/si_state_draw.c | 2 +-
32 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index 74053eb..c43f735 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -16,6 +16,7 @@ GALLIUM_DRIVER_CFLAGS = \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
-I$(top_srcdir)/src/gallium/drivers \
+ -I$(top_srcdir)/src/gallium/winsys \
$(DEFINES) \
$(VISIBILITY_CFLAGS)
@@ -26,6 +27,7 @@ GALLIUM_DRIVER_CXXFLAGS = \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
-I$(top_srcdir)/src/gallium/drivers \
+ -I$(top_srcdir)/src/gallium/winsys \
$(DEFINES) \
$(VISIBILITY_CXXFLAGS)
diff --git a/src/gallium/drivers/r300/compiler/r300_fragprog.c b/src/gallium/drivers/r300/compiler/r300_fragprog.c
index deba9ca..3c6e205 100644
--- a/src/gallium/drivers/r300/compiler/r300_fragprog.c
+++ b/src/gallium/drivers/r300/compiler/r300_fragprog.c
@@ -29,7 +29,7 @@
#include <stdio.h>
-#include "../r300_reg.h"
+#include "r300_reg.h"
static void presub_string(char out[10], unsigned int inst)
{
diff --git a/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c b/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c
index 841d46f..b539c5d 100644
--- a/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c
+++ b/src/gallium/drivers/r300/compiler/r300_fragprog_emit.c
@@ -38,7 +38,7 @@
#include "r300_fragprog.h"
-#include "../r300_reg.h"
+#include "r300_reg.h"
#include "radeon_program_pair.h"
#include "r300_fragprog_swizzle.h"
diff --git a/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c b/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c
index b7bca8c..075eac5 100644
--- a/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c
+++ b/src/gallium/drivers/r300/compiler/r300_fragprog_swizzle.c
@@ -35,7 +35,7 @@
#include <stdio.h>
-#include "../r300_reg.h"
+#include "r300_reg.h"
#include "radeon_compiler.h"
#define MAKE_SWZ3(x, y, z) (RC_MAKE_SWIZZLE(RC_SWIZZLE_##x, RC_SWIZZLE_##y, RC_SWIZZLE_##z, RC_SWIZZLE_ZERO))
diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
index 524c4fd..fd4f6f4 100644
--- a/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
+++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog.c
@@ -24,7 +24,7 @@
#include <stdio.h>
-#include "../r300_reg.h"
+#include "r300_reg.h"
#include "radeon_compiler_util.h"
#include "radeon_dataflow.h"
diff --git a/src/gallium/drivers/r300/compiler/r3xx_vertprog_dump.c b/src/gallium/drivers/r300/compiler/r3xx_vertprog_dump.c
index a41559c8..3cffe44 100644
--- a/src/gallium/drivers/r300/compiler/r3xx_vertprog_dump.c
+++ b/src/gallium/drivers/r300/compiler/r3xx_vertprog_dump.c
@@ -22,7 +22,7 @@
#include "radeon_compiler.h"
#include "radeon_code.h"
-#include "../r300_reg.h"
+#include "r300_reg.h"
#include <stdio.h>
diff --git a/src/gallium/drivers/r300/compiler/r500_fragprog.c b/src/gallium/drivers/r300/compiler/r500_fragprog.c
index 499aa92..88aad8a 100644
--- a/src/gallium/drivers/r300/compiler/r500_fragprog.c
+++ b/src/gallium/drivers/r300/compiler/r500_fragprog.c
@@ -32,7 +32,7 @@
#include "radeon_compiler_util.h"
#include "radeon_list.h"
#include "radeon_variable.h"
-#include "../r300_reg.h"
+#include "r300_reg.h"
/**
* Rewrite IF instructions to use the ALU result special register.
diff --git a/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c b/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
index f6b6c0f..a50b867 100644
--- a/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
+++ b/src/gallium/drivers/r300/compiler/r500_fragprog_emit.c
@@ -41,7 +41,7 @@
#include "r500_fragprog.h"
-#include "../r300_reg.h"
+#include "r300_reg.h"
#include "radeon_program_pair.h"
diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c
index c1f5e3c..7a83611 100644
--- a/src/gallium/drivers/r300/r300_chipset.c
+++ b/src/gallium/drivers/r300/r300_chipset.c
@@ -22,7 +22,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "r300_chipset.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "util/u_debug.h"
#include "util/u_memory.h"
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 8736cc7..92a35d5 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -36,7 +36,7 @@
#include "r300_defines.h"
#include "r300_screen.h"
#include "compiler/radeon_regalloc.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
struct u_upload_mgr;
struct r300_context;
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index e129cee..f0dd3c6 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -25,7 +25,7 @@
#define R300_SCREEN_H
#include "r300_chipset.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "pipe/p_screen.h"
#include "util/u_slab.h"
#include "os/os_thread.h"
diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
index 30e098e..ff84cd0 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -20,8 +20,7 @@ libr600_la_SOURCES = \
if NEED_RADEON_LLVM
AM_CFLAGS += \
- $(LLVM_CFLAGS) \
- -I$(top_srcdir)/src/gallium/drivers/radeon/
+ $(LLVM_CFLAGS)
libr600_la_SOURCES += \
$(LLVM_C_SOURCES)
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index d1e3255..7661419 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -13,8 +13,8 @@
#include "r600_opcodes.h"
#include "r600_shader.h"
#include "r600_pipe.h"
-#include "radeon_llvm.h"
-#include "radeon_llvm_emit.h"
+#include "radeon/radeon_llvm.h"
+#include "radeon/radeon_llvm_emit.h"
#include <stdio.h>
diff --git a/src/gallium/drivers/r600/r600_llvm.h b/src/gallium/drivers/r600/r600_llvm.h
index e036bff..3840a5a 100644
--- a/src/gallium/drivers/r600/r600_llvm.h
+++ b/src/gallium/drivers/r600/r600_llvm.h
@@ -4,7 +4,7 @@
#if defined R600_USE_LLVM || defined HAVE_OPENCL
-#include "radeon_llvm.h"
+#include "radeon/radeon_llvm.h"
#include <llvm-c/Core.h>
struct r600_bytecode;
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index d04fef8..84f2b19 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -26,8 +26,8 @@
#ifndef R600_PIPE_H
#define R600_PIPE_H
-#include "../radeon/r600_pipe_common.h"
-#include "../radeon/r600_cs.h"
+#include "radeon/r600_pipe_common.h"
+#include "radeon/r600_cs.h"
#include "r600_llvm.h"
#include "r600_public.h"
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index ab348ae..06cd429 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -34,7 +34,7 @@
#include <stdio.h>
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "util/u_double_list.h"
#include "util/u_range.h"
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index d77217c..9d3b2bf 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -45,7 +45,7 @@
#include "vl/vl_defines.h"
#include "vl/vl_mpeg12_decoder.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "r600_pipe_common.h"
#include "radeon_video.h"
#include "radeon_uvd.h"
diff --git a/src/gallium/drivers/radeon/radeon_uvd.h b/src/gallium/drivers/radeon/radeon_uvd.h
index 8cf70fd..462b101 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.h
+++ b/src/gallium/drivers/radeon/radeon_uvd.h
@@ -34,7 +34,7 @@
#ifndef RADEON_UVD_H
#define RADEON_UVD_H
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "vl/vl_video_buffer.h"
/* UVD uses PM4 packet type 0 and 2 */
diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c
index 9174c97..b7b88a3 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -40,7 +40,7 @@
#include "vl/vl_video_buffer.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "r600_pipe_common.h"
#include "radeon_video.h"
#include "radeon_vce.h"
diff --git a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
index ecb4b0d..6b5da47 100644
--- a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
+++ b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
@@ -40,7 +40,7 @@
#include "vl/vl_video_buffer.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "radeon_video.h"
#include "radeon_vce.h"
diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
index 17e9a59..9f490a2 100644
--- a/src/gallium/drivers/radeon/radeon_video.c
+++ b/src/gallium/drivers/radeon/radeon_video.c
@@ -39,7 +39,7 @@
#include "vl/vl_defines.h"
#include "vl/vl_video_buffer.h"
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "r600_pipe_common.h"
#include "radeon_video.h"
#include "radeon_vce.h"
diff --git a/src/gallium/drivers/radeon/radeon_video.h b/src/gallium/drivers/radeon/radeon_video.h
index 42de5a9..0193638 100644
--- a/src/gallium/drivers/radeon/radeon_video.h
+++ b/src/gallium/drivers/radeon/radeon_video.h
@@ -34,7 +34,7 @@
#ifndef RADEON_VIDEO_H
#define RADEON_VIDEO_H
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#include "vl/vl_video_buffer.h"
#define RVID_ERR(fmt, args...) \
diff --git a/src/gallium/drivers/radeonsi/Makefile.am b/src/gallium/drivers/radeonsi/Makefile.am
index 926b203..aa79c5e 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -24,7 +24,6 @@ include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
- -I$(top_srcdir)/src/gallium/drivers/radeon \
$(GALLIUM_DRIVER_CFLAGS) \
$(RADEON_CFLAGS) \
$(LLVM_CFLAGS)
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 31de4be..fc842d4 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -24,12 +24,12 @@
#include "util/u_memory.h"
-#include "../radeon/r600_cs.h"
+#include "radeon/r600_cs.h"
#include "si_pipe.h"
#include "si_shader.h"
#include "sid.h"
-#include "radeon_llvm_util.h"
+#include "radeon/radeon_llvm_util.h"
#define MAX_GLOBAL_BUFFERS 20
#if HAVE_LLVM < 0x0305
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 0e95f48..792d2c3 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -23,7 +23,7 @@
* Authors:
* Marek Olšák <marek.olsak at amd.com>
*/
-#include "../radeon/r600_cs.h"
+#include "radeon/r600_cs.h"
#include "si_pipe.h"
#include "si_shader.h"
#include "sid.h"
diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c
index e908746..ac8811d 100644
--- a/src/gallium/drivers/radeonsi/si_dma.c
+++ b/src/gallium/drivers/radeonsi/si_dma.c
@@ -26,7 +26,7 @@
#include "sid.h"
#include "si_pipe.h"
-#include "../radeon/r600_cs.h"
+#include "radeon/r600_cs.h"
#include "util/u_format.h"
diff --git a/src/gallium/drivers/radeonsi/si_pm4.c b/src/gallium/drivers/radeonsi/si_pm4.c
index 705b226..61ebad5 100644
--- a/src/gallium/drivers/radeonsi/si_pm4.c
+++ b/src/gallium/drivers/radeonsi/si_pm4.c
@@ -24,7 +24,7 @@
* Christian König <christian.koenig at amd.com>
*/
-#include "../radeon/r600_cs.h"
+#include "radeon/r600_cs.h"
#include "util/u_memory.h"
#include "si_pipe.h"
#include "sid.h"
diff --git a/src/gallium/drivers/radeonsi/si_pm4.h b/src/gallium/drivers/radeonsi/si_pm4.h
index 0702bd4..c7e032a 100644
--- a/src/gallium/drivers/radeonsi/si_pm4.h
+++ b/src/gallium/drivers/radeonsi/si_pm4.h
@@ -27,7 +27,7 @@
#ifndef SI_PM4_H
#define SI_PM4_H
-#include "../../winsys/radeon/drm/radeon_winsys.h"
+#include "radeon/drm/radeon_winsys.h"
#define SI_PM4_MAX_DW 256
#define SI_PM4_MAX_BO 32
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 3fcd314..24b1510 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -32,8 +32,8 @@
#include "gallivm/lp_bld_logic.h"
#include "gallivm/lp_bld_arit.h"
#include "gallivm/lp_bld_flow.h"
-#include "radeon_llvm.h"
-#include "radeon_llvm_emit.h"
+#include "radeon/radeon_llvm.h"
+#include "radeon/radeon_llvm_emit.h"
#include "util/u_memory.h"
#include "tgsi/tgsi_parse.h"
#include "tgsi/tgsi_util.h"
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 98c19d6..102c758 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -27,7 +27,7 @@
#include "si_pipe.h"
#include "si_shader.h"
#include "sid.h"
-#include "../radeon/r600_cs.h"
+#include "radeon/r600_cs.h"
#include "tgsi/tgsi_parse.h"
#include "tgsi/tgsi_scan.h"
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index 82bea79..ed897df 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -28,7 +28,7 @@
#define SI_STATE_H
#include "si_pm4.h"
-#include "../radeon/r600_pipe_common.h"
+#include "radeon/r600_pipe_common.h"
struct si_screen;
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 411ea04..aa50689 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -26,7 +26,7 @@
#include "si_pipe.h"
#include "si_shader.h"
-#include "../radeon/r600_cs.h"
+#include "radeon/r600_cs.h"
#include "sid.h"
#include "util/u_blitter.h"
--
2.0.2
More information about the mesa-dev
mailing list