mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 06:40:24 +01:00
panvk: Adjust RGB component order for fixed-function blending
Basically what004e0eb3ab("panfrost: use RGB1 component ordering for R5G6B5 pixel formats") was doing in the gallium driver, but applied to panvk this time. Fixes:004e0eb3ab("panfrost: use RGB1 component ordering for R5G6B5 pixel formats") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30685> (cherry picked from commit9241af23e5)
This commit is contained in:
parent
c799cfe577
commit
0d8a86f519
2 changed files with 14 additions and 1 deletions
|
|
@ -74,7 +74,7 @@
|
|||
"description": "panvk: Adjust RGB component order for fixed-function blending",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "004e0eb3ab854957bdb798142678765360b7104b",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -237,6 +237,19 @@ emit_blend_desc(const struct pan_shader_info *fs_info, mali_ptr fs_code,
|
|||
cfg.internal.fixed_function.num_comps = 4;
|
||||
cfg.internal.fixed_function.conversion.memory_format =
|
||||
GENX(panfrost_dithered_format_from_pipe_format)(rt->format, false);
|
||||
|
||||
#if PAN_ARCH >= 7
|
||||
if (cfg.internal.mode == MALI_BLEND_MODE_FIXED_FUNCTION &&
|
||||
(cfg.internal.fixed_function.conversion.memory_format & 0xff) ==
|
||||
MALI_RGB_COMPONENT_ORDER_RGB1) {
|
||||
/* fixed function does not like RGB1 as the component order */
|
||||
/* force this field to be the RGBA. */
|
||||
cfg.internal.fixed_function.conversion.memory_format &= ~0xff;
|
||||
cfg.internal.fixed_function.conversion.memory_format |=
|
||||
MALI_RGB_COMPONENT_ORDER_RGBA;
|
||||
}
|
||||
#endif
|
||||
|
||||
cfg.internal.fixed_function.rt = rt_idx;
|
||||
|
||||
if (fs_info->fs.untyped_color_outputs) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue