Add support for D16_UNORM depth test & write
D16_UNORM depth operations are performed in fixed point to avoid quirks
of ushort <-> float roundtrip
Some slight oddities to work around missing primitives:
- We only have CmpEQ, CmpGT. This matches SSE hardware reality.
Everything else is made out of negations and operand swaps.
- We only have *signed* CmpGT. Make an unsigned CmpGT by biasing both
16-bit operands by -0x8000.
- In non-quad-layout we don't have a good way to separate .xy and .zw
halfs; reading via masked short4 reads, writing via individual
component writes.
Bug: b/128363727
Test: dEQP-VK.pipeline.depth.format.*
Change-Id: I9c8b249470a9c91589c91135988dc4d1a58bbc5f
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27030Tested-by:
Chris Forbes <chrisforbes@google.com>
Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Showing
Please
register
or
sign in
to comment