Multisampled blitter clear fix
When clearing a multisampled buffer, the reactor blitter was only
clearing the first sample. This cl makes the reactor blitter
effectively clear all samples of a multisampled buffer.
Change-Id: I7ce1af401bf537fe85e1c8393a2c57144641ad8e
Reviewed-on: https://swiftshader-review.googlesource.com/18032
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Renderer/Blitter.cpp b/src/Renderer/Blitter.cpp
index 3cb0fc9..ce02ff9 100644
--- a/src/Renderer/Blitter.cpp
+++ b/src/Renderer/Blitter.cpp
@@ -1256,9 +1256,14 @@
}
else if(hasConstantColorF)
{
- if(!write(constantColorF, d, state))
+ for(int s = 0; s < state.destSamples; s++)
{
- return nullptr;
+ if(!write(constantColorF, d, state))
+ {
+ return nullptr;
+ }
+
+ d += *Pointer<Int>(blit + OFFSET(BlitData, dSliceB));
}
}
else if(intBoth) // Integer types do not support filtering