Commit 494e4b5f by Alexis Hetu Committed by Alexis Hétu

Fixed loading GL_RGB10_A2UI texture format

The GL_RGB10_A2UI was being unpacked as a double sized version of GL_UNSIGNED_SHORT_5_5_5_1, which it is not. The channels are not stored in the same order for these 2 formats. This fixes all "rgb10_a2ui" related test in: dEQP-GLES3.functional.texture.format.sized.* dEQP-GLES3.functional.texture.specification.* Change-Id: I0d398d0537a440906e9ef3aeb01fe4e782f778b6 Reviewed-on: https://swiftshader-review.googlesource.com/11168Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 01805772
......@@ -263,10 +263,10 @@ namespace
for(int x = 0; x < width; x++)
{
unsigned int rgba = source1010102U[x];
dest16U[4 * x + 0] = (rgba & 0x00000FFC) >> 2;
dest16U[4 * x + 1] = (rgba & 0x003FF000) >> 12;
dest16U[4 * x + 2] = (rgba & 0xFFC00000) >> 22;
dest16U[4 * x + 3] = (rgba & 0x00000003);
dest16U[4 * x + 0] = (rgba & 0x000003FF);
dest16U[4 * x + 1] = (rgba & 0x000FFC00) >> 10;
dest16U[4 * x + 2] = (rgba & 0x3FF00000) >> 20;
dest16U[4 * x + 3] = (rgba & 0xC0000000) >> 30;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment