diff options
author | Roland Scheidegger <[email protected]> | 2013-01-12 17:28:40 -0800 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-01-18 09:14:52 -0800 |
commit | d03d9b657e73fe026a395c7c7f0e157ad90107c7 (patch) | |
tree | 4a52a8c9377877a0d3e63a7eb64abd8f7ec4ba40 /src/gallium/drivers | |
parent | f2a87a1f5bcd78f381409345740ed37273453c0d (diff) |
llvmpipe: turn on integer texture support
Now that things mostly seem to work enable those formats.
Some formats cause crashes (notably RGB8 variants) so switch these off
(these crashes are not specific to INT/UINT variants but the state tracker
doesn't use them for UNORM etc. formats so it went unnoticed so far).
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_screen.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 450a896b097..872967caeef 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -332,6 +332,20 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, if (!format_desc->is_array && !format_desc->is_bitmask) return FALSE; + + /* + * XXX refuse formats known to crash in generate_unswizzled_blend(). + * These include all 3-channel 24bit RGB8 variants, plus 48bit + * (except those using floats) 3-channel RGB16 variants (the latter + * seems to be more of a llvm bug though). + * The mesa state tracker only seems to use these for SINT/UINT formats. + */ + if (format_desc->is_array && format_desc->nr_channels == 3) { + if (format_desc->block.bits == 24 || (format_desc->block.bits == 48 && + !util_format_is_float(format))) { + return FALSE; + } + } } if (bind & PIPE_BIND_DISPLAY_TARGET) { @@ -356,14 +370,10 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, } /* - * Everything can be supported by u_format. + * Everything can be supported by u_format + * (those without fetch_rgba_float might be not but shouldn't hit that) */ - if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS && - !format_desc->fetch_rgba_float) { - return FALSE; - } - return TRUE; } |