summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pick_status.json2
-rw-r--r--src/panfrost/vulkan/panvk_vX_blend.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 7d249cb28c7..0204abd59c3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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
diff --git a/src/panfrost/vulkan/panvk_vX_blend.c b/src/panfrost/vulkan/panvk_vX_blend.c
index abec563a5f3..909d8166593 100644
--- a/src/panfrost/vulkan/panvk_vX_blend.c
+++ b/src/panfrost/vulkan/panvk_vX_blend.c
@@ -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) {