|   | 716c5d00 | 2023-11-13T10:23:10 |  | Vulkan: Add RGB8-to-RGBA8 ubyte loading function
  Currently, to update RGB8 on desktop, ANGLE uses memcpy for each
pixel, which is suboptimal. This CL adds a loading function to improve
the copy time for RGB textures where RGBA is needed on the hardware.
* Added a specialization to LoadToNative3To4() for unsigned bytes
  using 0xFF as the fourth component.
  * It is optimized for unsigned bytes when converting an RGB format
    to its corresponding RGBA format, e.g., RGB8 to RGBA8.
  * It uses uint32_t operations to speed up the process.
* Added unit tests for the specialized LoadToNative3To4.
  * LoadToNative_unittest.cpp
* Added perf test for RGB8 image allocation and loading.
  * RGBImageAllocationBenchmark in RGBImageAllocation.cpp.
  * RGBImageAllocationBenchmark shows some improvement in cpu_time
    and wall_time on a Linux and a Windows device. (Results below using
    aligned source pointer and texture size of 2048):
    * On Windows: +~85% cpu_time, +~71% wall_time
    * On Linux:   +~26% cpu_time, +~27% wall_time
Bug: b/308177124
Change-Id: I421d83f75fdc513b0111dffb0a5d5e74682dd6fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4995489
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com> |