radeonsi: move sid.h/r600d_common.h to a common place.

Step one to merging radv would be to move some files around.

This only adds the include path to r600/radeonsi, because later
we want to avoid having to add it to the generic target paths.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Dave Airlie 2016-09-02 17:09:45 +10:00
parent 0d7ec8b7d0
commit f1f1ba3781
13 changed files with 42 additions and 9 deletions

View File

@ -2670,6 +2670,7 @@ CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
dnl Substitute the config
AC_CONFIG_FILES([Makefile
src/Makefile
src/amd/Makefile
src/compiler/Makefile
src/egl/Makefile
src/egl/main/egl.pc

View File

@ -50,6 +50,10 @@ SUBDIRS = . gtest util mapi/glapi/gen mapi
# include only conditionally ?
SUBDIRS += compiler
if HAVE_GALLIUM_RADEON_COMMON
SUBDIRS += amd
endif
if HAVE_INTEL_DRIVERS
SUBDIRS += intel
endif

24
src/amd/Makefile.am Normal file
View File

@ -0,0 +1,24 @@
# Copyright © 2016 Red Hat.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
include Makefile.sources
EXTRA_DIST = $(COMMON_HEADER_FILES)

3
src/amd/Makefile.sources Normal file
View File

@ -0,0 +1,3 @@
COMMON_HEADER_FILES = \
common/sid.h \
common/r600d_common.h

View File

@ -3,11 +3,13 @@ include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
$(RADEON_CFLAGS)
$(RADEON_CFLAGS) \
-I$(top_srcdir)/src/amd/common
AM_CXXFLAGS = \
$(GALLIUM_DRIVER_CXXFLAGS) \
$(RADEON_CFLAGS)
$(RADEON_CFLAGS) \
-I$(top_srcdir)/src/amd/common
noinst_LTLIBRARIES = libr600.la

View File

@ -2,7 +2,6 @@ C_SOURCES := \
cayman_msaa.c \
r600_buffer_common.c \
r600_cs.h \
r600d_common.h \
r600_gpu_load.c \
r600_perfcounter.c \
r600_pipe_common.c \

View File

@ -31,7 +31,7 @@
#define R600_CS_H
#include "r600_pipe_common.h"
#include "r600d_common.h"
#include "amd/common/r600d_common.h"
/**
* Return true if there is enough memory in VRAM and GTT for the buffers

View File

@ -28,7 +28,7 @@
#include "util/u_memory.h"
#include "r600_query.h"
#include "r600_pipe_common.h"
#include "r600d_common.h"
#include "amd/common/r600d_common.h"
/* Max counters per HW block */
#define R600_QUERY_MAX_COUNTERS 16

View File

@ -25,6 +25,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
-I$(top_srcdir)/src/amd/common \
$(RADEON_CFLAGS) \
$(LLVM_CFLAGS)
@ -32,8 +33,8 @@ noinst_LTLIBRARIES = libradeonsi.la
libradeonsi_la_SOURCES = $(C_SOURCES) $(GENERATED_SOURCES)
sid_tables.h: $(srcdir)/sid_tables.py $(srcdir)/sid.h
$(AM_V_GEN) $(PYTHON2) $(srcdir)/sid_tables.py $(srcdir)/sid.h > $@
sid_tables.h: $(srcdir)/sid_tables.py $(top_srcdir)/src/amd/common/sid.h
$(AM_V_GEN) $(PYTHON2) $(srcdir)/sid_tables.py $(top_srcdir)/src/amd/common/sid.h > $@
EXTRA_DIST = \
sid_tables.py

View File

@ -5,7 +5,6 @@ C_SOURCES := \
si_cp_dma.c \
si_debug.c \
si_descriptors.c \
sid.h \
si_dma.c \
si_hw_context.c \
si_pipe.c \

View File

@ -35,7 +35,7 @@
#include <stdio.h>
#include <amdgpu_drm.h>
#include "../../../drivers/radeonsi/sid.h"
#include "amd/common/sid.h"
/* FENCES */