summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index db8f171786d..762f6072e0c 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -392,17 +392,34 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
case 1:
break;
case 2:
- case 3:
case 4:
case 6:
- return FALSE;
-#if 0
- if (usage != PIPE_BIND_RENDER_TARGET ||
+ /* We need DRM 2.8.0. */
+ if (!drm_2_8_0) {
+ return FALSE;
+ }
+ /* Only support R500, because I didn't test older chipsets,
+ * but MSAA should work there too. */
+ if (!is_r500 && !debug_get_bool_option("RADEON_MSAA", FALSE)) {
+ return FALSE;
+ }
+ /* No texturing and scanout. */
+ if (usage & (PIPE_BIND_SAMPLER_VIEW |
+ PIPE_BIND_DISPLAY_TARGET |
+ PIPE_BIND_SCANOUT)) {
+ return FALSE;
+ }
+ /* Only allow depth/stencil, RGBA8, RGBA16F */
+ if (!util_format_is_depth_or_stencil(format) &&
!util_format_is_rgba8_variant(
- util_format_description(format))) {
+ util_format_description(format)) &&
+ format != PIPE_FORMAT_R16G16B16A16_FLOAT) {
+ return FALSE;
+ }
+ /* RGBA16F AA is only supported on R500. */
+ if (format == PIPE_FORMAT_R16G16B16A16_FLOAT && !is_r500) {
return FALSE;
}
-#endif
break;
default:
return FALSE;