Author :
Jamie Madill
Date :
2021-08-18 16:29:12
Hash :0adaabfc Message :Ensure RGB10A2 format properly uses 4 pixel bytes.
This fixes a problem with capture/replay where using pixelBytes was
returning a 3 byte stride for this 4 byte format. Note this format
is a bit odd, because it forces the alpha to 1.0, but the format
is specified as using 4 byte upload width, with 2 bits unused.
Also adds compile and run-time checking to ensure our bits are always
multiples of 8. This flushed out an issue with 565 formats which were
using an extra 1 bit for alpha.
Test: TexureUploadFormatTest
Bug: angleproject:5133
Change-Id: Ia41e86a4980fc041bb1a19b548c32329fa486d03
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3104686
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>