Commit e04b719876163072a3af6ca0cbcc4445a582bbc4

Amirali Abdolrashidi 2025-08-28T14:58:08

Fix BGR565 pixel functions It seems that the B5G6R5 read/write pixels switch the red and blue components due to them being based on D3D11, which does not seem to have native support for R5G6B5, instead using B5G6R5 and using the related loading functions to switch the two components. However, Vulkan supports both native R5G6B5 and B5G6R5, and using the latter format (e.g., using BGR565 in the backend instead of RGB565) causes errors in the tests. * e.g., the test BlendPackedTest.RGB565/ES2_D3D11 would fail if the readColor() for B5G6R5 is changed to switch red and blue, although the test is regarding RGB565. This does not affect Vulkan, but if BGR565 is used in Vulkan, the test would fail without this switch. * Fixed the order of the component values in B5G6R5 read/write functions. * Updated packPixels() in D3D11 renderer to use R5G6B5's functions when the internal format is GL_RGB565 and the texture's format is BGR565. Bug: b/441803462 Bug: b/409867243 Change-Id: Ia4883f6dfb5d96e77bbdc087f48e7ffca42a5657 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6847283 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>