diff options
author | Marek Olšák <[email protected]> | 2010-03-23 13:33:16 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-03-23 13:34:31 +0100 |
commit | 1f25eca311715f5ebceaee50ba4d68c3c9ea79a6 (patch) | |
tree | e8a2d61ffe15966ee1a74cd59d9e87837ace7dee /src/gallium | |
parent | 2a3accbc00c565e6641f926d6d3761249540fdea (diff) |
radeong: fix build issue with libdrm < 2.4.19
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_drm.c | 3 | ||||
-rw-r--r-- | src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm.c b/src/gallium/winsys/drm/radeon/core/radeon_drm.c index 7aa9c5425d6..3dfcc5aef07 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_drm.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_drm.c @@ -93,9 +93,12 @@ static void do_ioctls(int fd, struct radeon_libdrm_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 info.request = RADEON_INFO_DEVICE_ID; retval = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)); diff --git a/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c index ec45abf4676..66f61322457 100644 --- a/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c +++ b/src/gallium/winsys/drm/radeon/core/radeon_drm_buffer.c @@ -315,8 +315,11 @@ void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf, uint32_t flags = 0, old_flags, old_pitch; 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; |