diff options
author | Tomeu Vizoso <[email protected]> | 2020-04-24 08:40:51 +0200 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2020-04-30 16:27:34 +0200 |
commit | 3c98c452f012d20bcca3038af88bcbe7278d9c68 (patch) | |
tree | 1ff26ab78a81cf1a524c224fd1950ffe1be53a0d /src/panfrost/encoder/pan_format.c | |
parent | 33b13b9fbd2998977f76bfeeacf63900b0ed9cba (diff) |
panfrost: Emit blend descriptors on Bifrost
Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4724>
Diffstat (limited to 'src/panfrost/encoder/pan_format.c')
-rw-r--r-- | src/panfrost/encoder/pan_format.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/panfrost/encoder/pan_format.c b/src/panfrost/encoder/pan_format.c index 873c4d227d2..408f815b6f8 100644 --- a/src/panfrost/encoder/pan_format.c +++ b/src/panfrost/encoder/pan_format.c @@ -275,3 +275,20 @@ panfrost_invert_swizzle(const unsigned char *in, unsigned char *out) out[idx] = PIPE_SWIZZLE_X + c; } } + +enum mali_format +panfrost_format_to_bifrost_blend(const struct util_format_description *desc) +{ + enum mali_format format = panfrost_find_format(desc); + + switch (format) { + case MALI_RGBA4_UNORM: + return MALI_RGBA4; + case MALI_RGBA8_UNORM: + return MALI_RGBA8_2; + case MALI_RGB10_A2_UNORM: + return MALI_RGB10_A2_2; + default: + return format; + } +} |