-
Address cubemap faces as consecutive layers · bb575d48Nicolas Capens authored
Vulkan cubemaps use six consecutive layers for the faces, so we can reuse the same addressing logic as for 2D array textures. Hence the 3D lookup vector becomes a 2D coordinate plus layer coordinate after projection. The only difference is we don't have to clamp to the range of layers. This simplifies the sampled image descriptor since we only have to store a single pointer per mipmap level. We also avoid the per-lane lookup (gather) operation. YCbCr sampling was adjusted to not use the same array of buffer pointers. Also eliminate the unused lodOrBias parameter from computeLod*(). It's added afterwards. Bug: b/134164485 Bug: b/129523279 Change-Id: I5c349ff458aabb1d77e32104429b635d96237292 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31088Tested-by:
Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
bb575d48
×