Commit bb6400198da72affee4d11b9f9df955d9e81ec2d

Amirali Abdolrashidi 2024-12-18T12:36:13

Vulkan: Fix partial clear texture for RGB8 snorm When clearing an RGB8 snorm texture, due to this format not being renderable, a temporary buffer is filled with the clear value and applied to the image as a buffer update. However, this buffer's unpack state has nothing to do with the context's unpacking state. This should be reflected on the pixel unpack state that is used to calculate the required buffer size for the update. Otherwise, it can result in wrong colors for parts of the image. * Updated the pixel unpack state in the unrenderable part of the clear function for textures (TextureVk::clearSubImageImpl()). * It will now use "1" as the alignment since it is tightly packed. * Added unit test to clear one corner of an RGB8 snorm texture and use it for drawing. * Clear2DRGB8SnormCorner Bug: angleproject:384765600 Change-Id: Id302a9f4049626aae1a68798e86d7183d5c264e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6108140 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Charlie Lao <cclao@google.com>