From: Alyssa Rosenzweig Date: Wed, 8 Jul 2020 20:37:00 +0000 (-0400) Subject: panfrost: Handle PIPE_FORMAT_S8_UINT X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=816af26f027ebe325bcaaa70ad1eb9575cddea9f;p=mesa.git panfrost: Handle PIPE_FORMAT_S8_UINT For wallpaper blits with separate stencil. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/encoder/pan_format.c b/src/panfrost/encoder/pan_format.c index d7b0b207bab..67c6fba4164 100644 --- a/src/panfrost/encoder/pan_format.c +++ b/src/panfrost/encoder/pan_format.c @@ -141,6 +141,7 @@ struct panfrost_format panfrost_pipe_format_table[PIPE_FORMAT_COUNT] = { [PIPE_FORMAT_Z32_FLOAT] = { MALI_R32F, _TZ }, [PIPE_FORMAT_Z32_FLOAT_S8X24_UINT] = { MALI_R32F, _TZ }, [PIPE_FORMAT_X24S8_UINT] = { MALI_RGBA8UI, _TZ }, + [PIPE_FORMAT_S8_UINT] = { MALI_R8UI, _T }, [PIPE_FORMAT_R32_FIXED] = { MALI_R32_FIXED, _V }, [PIPE_FORMAT_R32G32_FIXED] = { MALI_RG32_FIXED, _V }, diff --git a/src/panfrost/encoder/pan_texture.c b/src/panfrost/encoder/pan_texture.c index 18f7455442e..5aa74d60c2f 100644 --- a/src/panfrost/encoder/pan_texture.c +++ b/src/panfrost/encoder/pan_texture.c @@ -241,12 +241,19 @@ panfrost_emit_texture_payload( } } +#define MALI_SWIZZLE_R001 \ + (MALI_CHANNEL_RED << 0) | \ + (MALI_CHANNEL_ZERO << 3) | \ + (MALI_CHANNEL_ZERO << 6) | \ + (MALI_CHANNEL_ONE << 9) + #define MALI_SWIZZLE_A001 \ (MALI_CHANNEL_ALPHA << 0) | \ (MALI_CHANNEL_ZERO << 3) | \ (MALI_CHANNEL_ZERO << 6) | \ (MALI_CHANNEL_ONE << 9) + void panfrost_new_texture( void *out, @@ -283,6 +290,8 @@ panfrost_new_texture( .format = { .swizzle = (format == PIPE_FORMAT_X24S8_UINT) ? MALI_SWIZZLE_A001 : + (format == PIPE_FORMAT_S8_UINT) ? + MALI_SWIZZLE_R001 : panfrost_translate_swizzle_4(desc->swizzle), .format = mali_format, .srgb = (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB),