Fix write stencil ops when writeMask == 0
We were checking whether we need to apply the write mask by erroneously
looking at whether the writeMask was non-zero. This meant that when the
write mask was zero, we would compute the stencil value, and store
it, rather than store 0. Instead, what we mean is to apply the write
mask if masking does something: when it's not FF (or 2^n-1, with
n = number of stencil bits).
Bug: b/141484021
Change-Id: I6134289ac8bb13a3502884e4e408f71961814adf
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36848Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by:
Antonio Maiorano <amaiorano@google.com>
Showing
Please
register
or
sign in
to comment