Fix buffer overflow on Mac
For OpenGL on Mac, Swiftshader renders directly to the IOSurface given
to us by the OS. This surface is not necessarily vertically padded so
its height is a multiple of 2. Since we render 4 pixels at a time in a
quad, the bottom 2 pixels may not be written to legal memory if the
height of the target surface is an odd number.
This change prevents Swiftshader from rendering quads on Mac if doing so
would overflow the buffer.
Bug: chromium:944796
Bug: angleproject:2764
Change-Id: I08bec895980b42f99b8a4434969edcaf7d331284
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32030
Presubmit-Ready: Sean Risser <srisser@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by:
Sean Risser <srisser@google.com>
Showing
Please
register
or
sign in
to comment