summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/radeon
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-12-21 19:26:27 +0100
committerMarek Olšák <maraeo@gmail.com>2010-12-22 03:39:37 +0100
commit2a95542088fbada4ffe5bdd2da90b215cb6a5003 (patch)
treeed2d82ec2e2b68cdb56e41f1f6516d5cca8b4672 /src/gallium/winsys/radeon
parent4fe78d3e12fa963273de4d83b1fd55a78a5d41bf (diff)
r300g: support B10G10R10A2 render targets only with DRM 2.8.0 or later versions
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_common.c4
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_r300.c2
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h4
3 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_common.c b/src/gallium/winsys/radeon/drm/radeon_drm_common.c
index 6bc6244115..f38ab6e3b4 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_common.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_common.c
@@ -122,6 +122,10 @@ static void do_ioctls(struct radeon_drm_winsys *winsys)
(version->version_major == 2 &&
version->version_minor >= 6);
+ winsys->drm_2_8_0 = version->version_major > 2 ||
+ (version->version_major == 2 &&
+ version->version_minor >= 8);
+
info.request = RADEON_INFO_DEVICE_ID;
retval = drmCommandWriteRead(winsys->fd, DRM_RADEON_INFO, &info, sizeof(info));
if (retval) {
diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c
index 9f59b3de46..ae7020a063 100644
--- a/src/gallium/winsys/radeon/drm/radeon_r300.c
+++ b/src/gallium/winsys/radeon/drm/radeon_r300.c
@@ -211,6 +211,8 @@ static uint32_t radeon_get_value(struct r300_winsys_screen *rws,
return ws->drm_2_3_0;
case R300_VID_DRM_2_6_0:
return ws->drm_2_6_0;
+ case R300_VID_DRM_2_8_0:
+ return ws->drm_2_8_0;
case R300_CAN_HYPERZ:
return ws->hyperz;
}
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 81da1a25e0..6f232143f6 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -49,8 +49,10 @@ struct radeon_drm_winsys {
boolean squaretiling; /* 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) */
+ /* DRM 2.6.0 (Hyper-Z, GB_Z_PEQ_CONFIG allowed on rv350->r4xx, FG_ALPHA_VALUE) */
boolean drm_2_6_0;
+ /* DRM 2.8.0 (US_FORMAT regs, ARGB2101010 colorbuffer) */
+ boolean drm_2_8_0;
/* Hyper-Z user */
boolean hyperz;