summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen.c
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/drivers/r300/r300_screen.c
parent4fe78d3e12fa963273de4d83b1fd55a78a5d41bf (diff)
downloadexternal_mesa3d-2a95542088fbada4ffe5bdd2da90b215cb6a5003.zip
external_mesa3d-2a95542088fbada4ffe5bdd2da90b215cb6a5003.tar.gz
external_mesa3d-2a95542088fbada4ffe5bdd2da90b215cb6a5003.tar.bz2
r300g: support B10G10R10A2 render targets only with DRM 2.8.0 or later versions
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 921d6f1..36060ab 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -309,7 +309,9 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
unsigned usage,
unsigned geom_flags)
{
+ struct r300_winsys_screen *rws = r300_screen(screen)->rws;
uint32_t retval = 0;
+ boolean drm_2_8_0 = rws->get_value(rws, R300_VID_DRM_2_8_0);
boolean is_r500 = r300_screen(screen)->caps.is_r500;
boolean is_r400 = r300_screen(screen)->caps.is_r400;
boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM ||
@@ -363,7 +365,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED)) &&
/* 2101010 cannot be rendered to on non-r5xx. */
- (is_r500 || !is_color2101010) &&
+ (!is_color2101010 || (is_r500 && drm_2_8_0)) &&
r300_is_colorbuffer_format_supported(format)) {
retval |= usage &
(PIPE_BIND_RENDER_TARGET |