Commit 4a60126
committed
Confirmed bug: RGUI renders with swapped R and B channels on Metal
The convert_bgra4444_to_bgra8888 kernel in Shaders.metal expects input bits laid out as B(15:12) G(11:8) R(7:4) A(3:0) — the D3D10/11/12 packing convention. But when the Metal driver is active, rgui_set_pixel_format_function (menu/drivers/rgui.c:1412-1413) falls through to the else branch and packs with argb32_to_rgba4444, producing R(15:12) G(11:8) B(7:4) A(3:0). The shader then decodes the bytes swapped — a red RGUI pixel 0xF00F gets rendered as blue.
This has presumably been wrong since whenever the Metal driver first shipped with 4444 support, but nobody ever pulled the thread.1 parent 3a3a940 commit 4a60126
1 file changed
Lines changed: 2 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | | - | |
| 1403 | + | |
| 1404 | + | |
1404 | 1405 | | |
1405 | 1406 | | |
1406 | 1407 | | |
| |||
0 commit comments