summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_screen.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-11-28 19:25:05 +0000
committerJosé Fonseca <[email protected]>2012-11-29 14:08:42 +0000
commit6916387e5396a891f2ffbc68866802d03f6a0939 (patch)
tree6381dd82d6c8f244acf0860f1475b0d858ee718d /src/gallium/drivers/llvmpipe/lp_screen.c
parent9f06061d50f90bf425a5337cea1b0adb94a46d25 (diff)
llvmpipe: Only advertise unswizzled formats.
Update llvmpipe_is_format_supported and llvmpipe_is_format_unswizzled so that only the formats that we can render without swizzling are advertised. We can still render all D3D10 required formats except PIPE_FORMAT_R11G11B10_FLOAT, which needs to be implemented in a future opportunity. Removal of rendertarget swizzling will be done in a subsequent change. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_screen.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 74b7b99c0ea..f1da6f87cbf 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -315,20 +315,19 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
if (sample_count > 1)
return FALSE;
- if (format_desc->format == PIPE_FORMAT_R11G11B10_FLOAT ||
- format_desc->format == PIPE_FORMAT_R9G9B9E5_FLOAT)
- return TRUE;
-
if (bind & PIPE_BIND_RENDER_TARGET) {
- if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS ||
- format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
+ if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB)
return FALSE;
if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
return FALSE;
+ assert(format_desc->block.width == 1);
+ assert(format_desc->block.height == 1);
+
+ if (format_desc->is_mixed)
+ return FALSE;
- if (format_desc->block.width != 1 ||
- format_desc->block.height != 1)
+ if (!format_desc->is_array && !format_desc->is_bitmask)
return FALSE;
}