diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-15 07:12:47 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-07-15 08:03:35 -0700 |
commit | 0b8300580726a2299815582a33b488b6edd91c19 (patch) | |
tree | d1b8845ad697df79b25df1d543637b4de7b50aea /src/gallium/drivers/panfrost | |
parent | 1aaf68d1201c29c41c49cc66a33bc2a740af4fd9 (diff) |
panfrost: Advertise more depth/stencil formats
Fixes a regression in glmark's shadow/refract scenes.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_screen.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 2d8ecdf2068..ff67c0b14bc 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -388,7 +388,7 @@ panfrost_is_format_supported( struct pipe_screen *screen, return FALSE; /* Format wishlist */ - if (format == PIPE_FORMAT_Z24X8_UNORM || format == PIPE_FORMAT_X8Z24_UNORM) + if (format == PIPE_FORMAT_X8Z24_UNORM) return FALSE; if (format == PIPE_FORMAT_A1B5G5R5_UNORM || format == PIPE_FORMAT_X1B5G5R5_UNORM) @@ -400,8 +400,11 @@ panfrost_is_format_supported( struct pipe_screen *screen, /* Don't confuse poorly written apps (workaround dEQP bug) that expect * more alpha than they ask for */ + bool scanout = bind & (PIPE_BIND_SCANOUT | PIPE_BIND_SHARED | PIPE_BIND_DISPLAY_TARGET); - if (scanout && !util_format_is_rgba8_variant(format_desc)) + bool renderable = bind & PIPE_BIND_RENDER_TARGET; + + if (scanout && renderable && !util_format_is_rgba8_variant(format_desc)) return FALSE; if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN && @@ -423,6 +426,8 @@ panfrost_is_format_supported( struct pipe_screen *screen, if (bind & PIPE_BIND_DEPTH_STENCIL) { switch (format) { case PIPE_FORMAT_Z24_UNORM_S8_UINT: + case PIPE_FORMAT_Z24X8_UNORM: + case PIPE_FORMAT_Z32_UNORM: return true; default: |