diff options
author | Marek Olšák <[email protected]> | 2011-01-27 23:06:15 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-01-27 23:06:15 +0100 |
commit | 2e3ccada076fe275d04d37dc60142230445d1007 (patch) | |
tree | 5b426f93dc51de47303e6297694d804a71f17dec /src/gallium/winsys/radeon | |
parent | e0b98cde41a9d39b6099950585d9516f8136dafe (diff) |
r300g: rename flag squaretiling -> drm_2_1_0
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_buffer.c | 9 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_common.c | 8 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_r300.c | 4 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_winsys.h | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c index 5e14287ec2d..4b0f688ce9a 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c @@ -448,15 +448,18 @@ static void radeon_drm_buffer_set_tiling(struct r300_winsys_screen *ws, enum r300_buffer_tiling macrotiled, uint32_t pitch) { +#ifndef RADEON_BO_FLAGS_MICRO_TILE_SQUARE +#define RADEON_BO_FLAGS_MICRO_TILE_SQUARE 0x20 +#endif + struct radeon_drm_buffer *buf = get_drm_buffer(radeon_pb_buffer(_buf)); uint32_t flags = 0; + if (microtiled == R300_BUFFER_TILED) flags |= RADEON_BO_FLAGS_MICRO_TILE; -/* XXX Remove this ifdef when libdrm version 2.4.19 becomes mandatory. */ -#ifdef RADEON_BO_FLAGS_MICRO_TILE_SQUARE else if (microtiled == R300_BUFFER_SQUARETILED) flags |= RADEON_BO_FLAGS_MICRO_TILE_SQUARE; -#endif + if (macrotiled == R300_BUFFER_TILED) flags |= RADEON_BO_FLAGS_MACRO_TILE; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_common.c b/src/gallium/winsys/radeon/drm/radeon_drm_common.c index fe71f080592..3663c1fff6a 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_common.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_common.c @@ -107,12 +107,8 @@ static void do_ioctls(struct radeon_drm_winsys *winsys) exit(1); } -/* XXX Remove this ifdef when libdrm version 2.4.19 becomes mandatory. */ -#ifdef RADEON_BO_FLAGS_MICRO_TILE_SQUARE - // Supported since 2.1.0. - winsys->squaretiling = version->version_major > 2 || - version->version_minor >= 1; -#endif + winsys->drm_2_1_0 = version->version_major > 2 || + version->version_minor >= 1; winsys->drm_2_3_0 = version->version_major > 2 || version->version_minor >= 3; diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c index bacf181b47c..307ae01f5bb 100644 --- a/src/gallium/winsys/radeon/drm/radeon_r300.c +++ b/src/gallium/winsys/radeon/drm/radeon_r300.c @@ -145,8 +145,8 @@ static uint32_t radeon_get_value(struct r300_winsys_screen *rws, return ws->gb_pipes; case R300_VID_Z_PIPES: return ws->z_pipes; - case R300_VID_SQUARE_TILING_SUPPORT: - return ws->squaretiling; + case R300_VID_DRM_2_1_0: + return ws->drm_2_1_0; case R300_VID_DRM_2_3_0: return ws->drm_2_3_0; case R300_VID_DRM_2_6_0: diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h index 492edfef8c3..76954d5d1a8 100644 --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h @@ -46,7 +46,7 @@ struct radeon_drm_winsys { uint32_t z_pipes; /* Z pipe count (rv530 only) */ uint32_t gart_size; /* GART size. */ uint32_t vram_size; /* VRAM size. */ - boolean squaretiling; /* Square tiling support. */ + boolean drm_2_1_0; /* Square tiling support. */ /* DRM 2.3.0 (R500 VAP regs, MSPOS regs, fixed tex3D size checking) */ boolean drm_2_3_0; /* DRM 2.6.0 (Hyper-Z, GB_Z_PEQ_CONFIG allowed on rv350->r4xx, FG_ALPHA_VALUE) */ |