Fix clearing all samples of multisample render targets. Only libGLESv2 was clearing all the samples of a multisample buffer. Since all known APIs always clear all the samples, this could be handled in the Renderer. Bug swiftshader:77 Change-Id: Ib9adc3c61d263420ed0a0ae4828a693bd360b076 Reviewed-on: https://swiftshader-review.googlesource.com/10788 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Renderer/Surface.cpp b/src/Renderer/Surface.cpp index 1a63ff9..6bcc657 100644 --- a/src/Renderer/Surface.cpp +++ b/src/Renderer/Surface.cpp
@@ -3193,14 +3193,14 @@ resource->unlock(); } - bool Surface::isEntire(const SliceRect& rect) const + bool Surface::isEntire(const Rect& rect) const { return (rect.x0 == 0 && rect.y0 == 0 && rect.x1 == internal.width && rect.y1 == internal.height && internal.depth == 1); } - SliceRect Surface::getRect() const + Rect Surface::getRect() const { - return SliceRect(0, 0, internal.width, internal.height, 0); + return Rect(0, 0, internal.width, internal.height); } void Surface::clearDepth(float depth, int x0, int y0, int width, int height)