Fix image sampling with divergent LOD
Currently our SamplerCore code performs sampling for four SIMD lanes
simultaneously. With implicit LOD calculation for fragment shaders, all
four pixels in a quad share the same LOD and thus sample from the same
mipmap level. But for the vertex shader the LOD is always explicitly
provided, and can vary significantly between completely unrelated
vertices. Previously we only used the LOD of the first one in each group
of four.
As a workaround, process explicit-lod sampling instructions in a
lane-by-lane manner.
Bug: b/133868964
Tests: dEQP-VK.glsl.texture_functions.*
Change-Id: If4e0d3c04d29529300111d73801124080cb4b544
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/32488
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Reviewed-by:
Chris Forbes <chrisforbes@google.com>
Showing
Please
register
or
sign in
to comment