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/11168
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
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;
}
}