diff options
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_texture_desc.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_winsys.h | 2 | ||||
-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 |
7 files changed, 14 insertions, 15 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index ca2762809dd..ec8608f74bd 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -889,7 +889,7 @@ struct pipe_resource *r300_texture_from_handle(struct pipe_screen *screen, break; case 2: - if (rws->get_value(rws, R300_VID_SQUARE_TILING_SUPPORT)) + if (rws->get_value(rws, R300_VID_DRM_2_1_0)) microtile = R300_BUFFER_SQUARETILED; break; } diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c index 7b1739142d4..bc33871565b 100644 --- a/src/gallium/drivers/r300/r300_texture_desc.c +++ b/src/gallium/drivers/r300/r300_texture_desc.c @@ -361,7 +361,7 @@ static void r300_setup_tiling(struct r300_screen *screen, break; case 2: - if (rws->get_value(rws, R300_VID_SQUARE_TILING_SUPPORT)) { + if (rws->get_value(rws, R300_VID_DRM_2_1_0)) { desc->microtile = R300_BUFFER_SQUARETILED; } break; diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index 460da77a4fb..35ed35cca7c 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -50,7 +50,7 @@ enum r300_value_id { R300_VID_PCI_ID, R300_VID_GB_PIPES, R300_VID_Z_PIPES, - R300_VID_SQUARE_TILING_SUPPORT, + R300_VID_DRM_2_1_0, /* Square tiling. */ R300_VID_DRM_2_3_0, /* R500 VAP regs, MSPOS regs, fixed tex3D size checking */ R300_VID_DRM_2_6_0, /* Hyper-Z, GB_Z_PEQ_CONFIG on rv350->r4xx, R500 FG_ALPHA_VALUE */ R300_VID_DRM_2_8_0, /* R500 US_FORMAT regs, R500 ARGB2101010 colorbuffer */ 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) */ |