From c0c979eebc076b95cc8d18a013ce2968fe6311ad Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 30 Jan 2012 17:22:13 -0500 Subject: r600g: add support for common surface allocator for tiling v13 Tiled surface have all kind of alignment constraint that needs to be met. Instead of having all this code duplicated btw ddx and mesa use common code in libdrm_radeon this also ensure that both ddx and mesa compute those alignment in the same way. v2 fix evergreen v3 fix compressed texture and workaround cube texture issue by disabling 2D array mode for cubemap (need to check if r7xx and newer are also affected by the issue) v4 fix texture array v5 fix evergreen and newer, split surface values computation from mipmap tree generation so that we can get them directly from the ddx v6 final fix to evergreen tile split value v7 fix mipmap offset to avoid to use random value, use color view depth view to address different layer as hardware is doing some magic rotation depending on the layer v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on evergreen, align bytes per pixel to a multiple of a dword v9 fix handling of stencil on evergreen, half fix for compressed texture v10 fix evergreen compressed texture proper support for stencil tile split. Fix stencil issue when array mode was clear by the kernel, always program stencil bo. On evergreen depth buffer bo need to be big enough to hold depth buffer + stencil buffer as even with stencil disabled things get written there. v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen, old ddx overestimate those. Fix linear case when pitch*height < 64. Fix r300g. v12 Fix linear case when pitch*height < 64 for old path, adapt to libdrm API change v13 add libdrm check Signed-off-by: Jerome Glisse --- src/gallium/targets/dri-r300/Makefile | 2 ++ src/gallium/targets/dri-r600/Makefile | 2 +- src/gallium/targets/egl-static/Makefile | 2 ++ src/gallium/targets/va-r300/Makefile | 2 +- src/gallium/targets/va-r600/Makefile | 2 +- src/gallium/targets/vdpau-r300/Makefile | 2 +- src/gallium/targets/vdpau-r600/Makefile | 2 +- src/gallium/targets/xorg-r300/Makefile | 2 +- src/gallium/targets/xorg-r600/Makefile | 2 +- 9 files changed, 11 insertions(+), 7 deletions(-) (limited to 'src/gallium/targets') diff --git a/src/gallium/targets/dri-r300/Makefile b/src/gallium/targets/dri-r300/Makefile index a1bb753f859..6a8bf6635f7 100644 --- a/src/gallium/targets/dri-r300/Makefile +++ b/src/gallium/targets/dri-r300/Makefile @@ -21,4 +21,6 @@ DRIVER_DEFINES = \ include ../Makefile.dri +DRI_LIB_DEPS += -ldrm_radeon + symlinks: diff --git a/src/gallium/targets/dri-r600/Makefile b/src/gallium/targets/dri-r600/Makefile index 2995b58876b..9cc9cb9f63b 100644 --- a/src/gallium/targets/dri-r600/Makefile +++ b/src/gallium/targets/dri-r600/Makefile @@ -21,6 +21,6 @@ DRIVER_DEFINES = \ include ../Makefile.dri -DRI_LIB_DEPS += +DRI_LIB_DEPS += -ldrm_radeon symlinks: diff --git a/src/gallium/targets/egl-static/Makefile b/src/gallium/targets/egl-static/Makefile index 70e4362ef1f..02a55eef160 100644 --- a/src/gallium/targets/egl-static/Makefile +++ b/src/gallium/targets/egl-static/Makefile @@ -115,6 +115,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R300=1 egl_LIBS += \ $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \ $(TOP)/src/gallium/drivers/r300/libr300.a +egl_SYS += -ldrm_radeon endif endif @@ -125,6 +126,7 @@ egl_CPPFLAGS += -D_EGL_PIPE_R600=1 egl_LIBS += \ $(TOP)/src/gallium/winsys/radeon/drm/libradeonwinsys.a \ $(TOP)/src/gallium/drivers/r600/libr600.a +egl_SYS += -ldrm_radeon endif endif diff --git a/src/gallium/targets/va-r300/Makefile b/src/gallium/targets/va-r300/Makefile index 3e0797b65a0..a270dfa7c99 100644 --- a/src/gallium/targets/va-r300/Makefile +++ b/src/gallium/targets/va-r300/Makefile @@ -19,7 +19,7 @@ C_SOURCES = \ $(COMMON_GALLIUM_SOURCES) \ $(DRIVER_SOURCES) -DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes +DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon include ../Makefile.va diff --git a/src/gallium/targets/va-r600/Makefile b/src/gallium/targets/va-r600/Makefile index bab18fea2ac..afead84391b 100644 --- a/src/gallium/targets/va-r600/Makefile +++ b/src/gallium/targets/va-r600/Makefile @@ -19,7 +19,7 @@ C_SOURCES = \ $(COMMON_GALLIUM_SOURCES) \ $(DRIVER_SOURCES) -DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes +DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon include ../Makefile.va diff --git a/src/gallium/targets/vdpau-r300/Makefile b/src/gallium/targets/vdpau-r300/Makefile index 95988bdc652..849f72e03e8 100644 --- a/src/gallium/targets/vdpau-r300/Makefile +++ b/src/gallium/targets/vdpau-r300/Makefile @@ -20,7 +20,7 @@ C_SOURCES = \ $(COMMON_GALLIUM_SOURCES) \ $(DRIVER_SOURCES) -DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes +DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon include ../Makefile.vdpau diff --git a/src/gallium/targets/vdpau-r600/Makefile b/src/gallium/targets/vdpau-r600/Makefile index 466e80eadf9..ef27b6572c2 100644 --- a/src/gallium/targets/vdpau-r600/Makefile +++ b/src/gallium/targets/vdpau-r600/Makefile @@ -15,7 +15,7 @@ C_SOURCES = \ $(COMMON_GALLIUM_SOURCES) \ $(DRIVER_SOURCES) -DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes +DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes -ldrm_radeon include ../Makefile.vdpau diff --git a/src/gallium/targets/xorg-r300/Makefile b/src/gallium/targets/xorg-r300/Makefile index 26cc5590d7d..45bb3d7e701 100644 --- a/src/gallium/targets/xorg-r300/Makefile +++ b/src/gallium/targets/xorg-r300/Makefile @@ -19,6 +19,6 @@ DRIVER_PIPES = \ $(TOP)/src/gallium/drivers/rbug/librbug.a DRIVER_LINKS = \ - $(shell $(PKG_CONFIG) --libs libdrm) + $(shell $(PKG_CONFIG) --libs libdrm libdrm_radeon) include ../Makefile.xorg diff --git a/src/gallium/targets/xorg-r600/Makefile b/src/gallium/targets/xorg-r600/Makefile index 3c0cc83711c..fd973304f2c 100644 --- a/src/gallium/targets/xorg-r600/Makefile +++ b/src/gallium/targets/xorg-r600/Makefile @@ -19,6 +19,6 @@ DRIVER_PIPES = \ $(TOP)/src/gallium/drivers/rbug/librbug.a DRIVER_LINKS = \ - $(shell $(PKG_CONFIG) --libs libdrm) + $(shell $(PKG_CONFIG) --libs libdrm libdrm_radeon) include ../Makefile.xorg -- cgit v1.2.3