Fixed writing to FORMAT_A8 and FORMAT_R8
Change-Id: Ia704d2c15f46effc534ae0c51fc82bf78be9428b
Reviewed-on: https://swiftshader-review.googlesource.com/5620
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Meng-Lin Wu <marleymoo@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Shader/PixelRoutine.cpp b/src/Shader/PixelRoutine.cpp
index 776cc3b..c26e7ca 100644
--- a/src/Shader/PixelRoutine.cpp
+++ b/src/Shader/PixelRoutine.cpp
@@ -1718,9 +1718,9 @@
{
Pointer<Byte> buffer = cBuffer + 1 * x;
Short4 value;
- Insert(value, *Pointer<Short>(buffer), 0);
+ value = Insert(value, *Pointer<Short>(buffer), 0);
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));
current.x &= *Pointer<Short4>(constants + OFFSET(Constants, maskB4Q) + 8 * xMask);
@@ -1736,9 +1736,9 @@
{
Pointer<Byte> buffer = cBuffer + 1 * x;
Short4 value;
- Insert(value, *Pointer<Short>(buffer), 0);
+ value = Insert(value, *Pointer<Short>(buffer), 0);
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));
current.w &= *Pointer<Short4>(constants + OFFSET(Constants,maskB4Q) + 8 * xMask);