Commit b14ed802 by Alexis Hetu Committed by Alexis Hétu

Fixed writing to FORMAT_A8 and FORMAT_R8

Change-Id: Ia704d2c15f46effc534ae0c51fc82bf78be9428b Reviewed-on: https://swiftshader-review.googlesource.com/5620Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarMeng-Lin Wu <marleymoo@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent ebefeba5
...@@ -1718,9 +1718,9 @@ namespace sw ...@@ -1718,9 +1718,9 @@ namespace sw
{ {
Pointer<Byte> buffer = cBuffer + 1 * x; Pointer<Byte> buffer = cBuffer + 1 * x;
Short4 value; Short4 value;
Insert(value, *Pointer<Short>(buffer), 0); value = Insert(value, *Pointer<Short>(buffer), 0);
Int pitch = *Pointer<Int>(data + OFFSET(DrawData, colorPitchB[index])); Int pitch = *Pointer<Int>(data + OFFSET(DrawData, colorPitchB[index]));
Insert(value, *Pointer<Short>(buffer + pitch), 1); value = Insert(value, *Pointer<Short>(buffer + pitch), 1);
value = UnpackLow(As<Byte8>(value), As<Byte8>(value)); value = UnpackLow(As<Byte8>(value), As<Byte8>(value));
current.x &= *Pointer<Short4>(constants + OFFSET(Constants, maskB4Q) + 8 * xMask); current.x &= *Pointer<Short4>(constants + OFFSET(Constants, maskB4Q) + 8 * xMask);
...@@ -1736,9 +1736,9 @@ namespace sw ...@@ -1736,9 +1736,9 @@ namespace sw
{ {
Pointer<Byte> buffer = cBuffer + 1 * x; Pointer<Byte> buffer = cBuffer + 1 * x;
Short4 value; Short4 value;
Insert(value, *Pointer<Short>(buffer), 0); value = Insert(value, *Pointer<Short>(buffer), 0);
Int pitch = *Pointer<Int>(data + OFFSET(DrawData,colorPitchB[index])); Int pitch = *Pointer<Int>(data + OFFSET(DrawData,colorPitchB[index]));
Insert(value, *Pointer<Short>(buffer + pitch), 1); value = Insert(value, *Pointer<Short>(buffer + pitch), 1);
value = UnpackLow(As<Byte8>(value), As<Byte8>(value)); value = UnpackLow(As<Byte8>(value), As<Byte8>(value));
current.w &= *Pointer<Short4>(constants + OFFSET(Constants,maskB4Q) + 8 * xMask); current.w &= *Pointer<Short4>(constants + OFFSET(Constants,maskB4Q) + 8 * xMask);
......
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