Eliminate large image specialization
Images with dimensions of 65536 texels or more exceed the 16-bit logic
used by our 'low' precision sampler code. Thus we were treating them
differently and forced them to use our 32-bit code path. However,
ordinary images can't have such large dimensions. Only texel buffers
must support 65536 or more texels.
Those can only be accessed by OpImageFetch, OpImageRead, and
OpImageWrite instructions, and the latter two already use custom 32-bit
addressing logic. Thus we can simply specify all Fetch operations to
use the 32-bit sampler code path instead of differentiating based on
resource dimensions.
This fixes dEQP robustness tests which are enabled by the
shaderStorageImageExtendedFormats feature, because the 16-bit code path
does not bounds check fetch coordinates correctly.
Note that fetch does not perform filtering, and thus there is no excess
from using 32-bit filtering code.
Bug: b/152224843
Tests: dEQP-VK.robustness.buffer_access.*.texel_copy.a2b10g10r10_unorm_pack32.oob_uniform_read.*
Change-Id: Ie658e0fc9da05cad8efec58bac3238fb498ff10b
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46131
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Showing
Please
register
or
sign in
to comment