summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/pipe-loader
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/pipe-loader')
-rw-r--r--src/gallium/targets/pipe-loader/Makefile.am4
-rw-r--r--src/gallium/targets/pipe-loader/pipe_radeonsi.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/targets/pipe-loader/Makefile.am b/src/gallium/targets/pipe-loader/Makefile.am
index e4048b58605..4d9f7be2ec9 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -155,10 +155,12 @@ nodist_EXTRA_pipe_radeonsi_la_SOURCES = dummy.cpp
pipe_radeonsi_la_LIBADD = \
$(PIPE_LIBS) \
$(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
+ $(top_builddir)/src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.la \
$(top_builddir)/src/gallium/drivers/radeon/libradeon.la \
$(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
$(LIBDRM_LIBS) \
- $(RADEON_LIBS)
+ $(RADEON_LIBS) \
+ $(AMDGPU_LIBS)
endif
diff --git a/src/gallium/targets/pipe-loader/pipe_radeonsi.c b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
index 5457b5b5e32..31077af6a04 100644
--- a/src/gallium/targets/pipe-loader/pipe_radeonsi.c
+++ b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
@@ -2,6 +2,7 @@
#include "target-helpers/inline_debug_helper.h"
#include "radeon/drm/radeon_drm_public.h"
#include "radeon/radeon_winsys.h"
+#include "amdgpu/drm/amdgpu_public.h"
#include "radeonsi/si_public.h"
static struct pipe_screen *
@@ -9,7 +10,12 @@ create_screen(int fd)
{
struct radeon_winsys *rw;
- rw = radeon_drm_winsys_create(fd, radeonsi_screen_create);
+ /* First, try amdgpu. */
+ rw = amdgpu_winsys_create(fd, radeonsi_screen_create);
+
+ if (!rw)
+ rw = radeon_drm_winsys_create(fd, radeonsi_screen_create);
+
return rw ? debug_screen_wrap(rw->screen) : NULL;
}