Treat the array coordinate separately
The array layer coordinate isn't subject to addressing modes like the
other coordinates. There's just one selection computation:
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-unnormalized-to-integer
This change eliminates the internally used ADDRESSING_LAYER mode, and
avoids using the 'w' coordinate as the array layer coordinate for 2D
array images (instead exclusively using it for 3D images).
Also, the cube face index is combined with the array layer in case of
cube array images. The division by 6 was eliminated by adjusting the
descriptor 'depth' field instead.
Bug: b/162315264
Change-Id: I4a541697ea265b3ad5b7d7c3a2420c045f46cbbe
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/47388
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Chris Forbes <chrisforbes@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment