Fix usages of textureDimensionAndFormatCompatible #4376
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sorry this is so big. Most of it is relatively search and replace
Fix usages of
textureDimensionAndFormatCompatible
.All of these usages were wrong as they need the device to
know if a dimension and format are compatible since
extensions enable 3d dimension with compressed textures.
So, rename
textureDimensionAndFormatCompatible
totextureFormatAndDimensionAndPossiblyCompatible
tolet a test filter out formats that can't possibly
be used with certain dimensions. Then, for each test,
call
t.skipIfTextureFormatAndDimensionNotCompatible
which checks the extensions.
Further, a few tests needed fixing.
copyTextureToTexture validation tests needed to handle
3d compress texture size limits correctly.
createTexture needed to not skip 3d compressed textures
layout_related needed to pass dimension to createAlignedTexture
and also, several tests had dimension as a test parameter but
didn't seem to be using it anywhere so added it into at least
texture creation on those tests.
expectTextureToMatchByRendering needed to handle 3d textures
texture_zero tests were mostly indirectly affected by
changes to texture_zero_init_test.ts. Nothing interesting
changed in this PR but the params there are extremely
convoluted and I didn't bother to decode exactly what
is going on in detail. I did glance over them and I think
they aren't skipping compressed textures.