summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_screen.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 1fed537899a..26aac329e67 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -328,12 +328,17 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
return FALSE;
if (bind & PIPE_BIND_RENDER_TARGET) {
- if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB)
+ if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
+ if (format_desc->nr_channels < 3)
+ return FALSE;
+ }
+ else if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB)
return FALSE;
if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN &&
format != PIPE_FORMAT_R11G11B10_FLOAT)
return FALSE;
+
assert(format_desc->block.width == 1);
assert(format_desc->block.height == 1);