improve: only require scene-color mips for non-zero LOD - #11
Merged
Conversation
- SceneColorMips requirement now only set when sampling at non-zero or dynamic LOD, not for literal level-zero taps - Literal level-zero taps still emit textureSampleLevel (needs EXT_shader_texture_lod) but don't require host to build mip chain - Add StageRequiresSceneColorMips and RequiresSceneColorMips to detect non-zero/dynamic LOD usage - Update documentation to clarify that level-zero taps are valid in non-uniform WGSL control flow - Add tests verifying level-zero doesn't require mips while dynamic LOD does - Update test stubs to implement new interface methods (exprs, nestedStmts, children)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Refines the SceneColorMips requirement so the host only builds a scene-color mip chain when sampling at a non-zero or dynamic LOD. Level-zero taps continue to emit textureSampleLevel for WGSL non-uniform control flow compatibility, but skip unnecessary mip generation. Also implements missing interface stubs in IR test helpers to satisfy updated contract expectations.
Changes
Testing
go test ./...to verify all tests pass, including the new scenarios in lower/post_surface_test.go