osmesa/test: Clear the stencil bits in the depth test.
authorEric Anholt <eric@anholt.net>
Wed, 9 Dec 2020 18:04:10 +0000 (10:04 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Dec 2020 18:38:13 +0000 (18:38 +0000)
commit7497917cfd8972849c611087366a027fecdea80b
treee60bf6a2966b0bfd5d49ff8c4cea1259b5dfb6ab
parenta9a8e05b696ec756c87be7a0f5c7a0aafc310904
osmesa/test: Clear the stencil bits in the depth test.

Since the depth buffer starts out as a malloc, and we weren't clearing it,
you could get undefined values in your top 8 bits.  This should fix
intermittent failures of the depth test.

(Sadly, valgrind wasn't catching this, presumably because the 32-bit value
there *is* written, just some bits are left undef)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1243>
src/gallium/targets/osmesa/test-render.cpp