Repository navigation
Shaders: build the constant-colour test shader only on Windows, where its tests run - #258
Closed
SkippySteve wants to merge 1 commit into
Closed
SkippySteve wants to merge 1 commit into
SkippySteve wants to merge 1 commit into
Conversation
constant_color() feeds two #[cfg(windows)] tests (a D3D12 pipeline and dxil.dll validation), but was itself unconditional, so on Linux the test build warned that it was never used and clippy -D warnings failed. Gate it on Windows and move its two imports (Attr, Shader) into it, since nothing else in the test module uses them.
Author
|
superseded by #262 (combined: keep helper + hermetic Linux container test) |
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.
constant_color()incrates/victory-shader/src/emit/mod.rsis only called by two#[cfg(windows)]tests (stub_pipeline_is_created,constant_color_validates), but the helper itself had no gate. On Linux the test build warnsfunction constant_color is never used, socargo clippy -p victory-shader --all-targets -- -D warningsfails.This gates the helper on
windowsand moves its two imports (bitcode::Attr,shader::Shader) into the function body, because nothing else in the test module uses them and they would otherwise become unused imports.No behaviour change. The Windows tests compile and run exactly as before.
Checked on Linux:
cargo clippy -p victory-shader --all-targets -- -D warnings: clean (it failed before this change)cargo clippy -p victory-shader --all-targets --target x86_64-pc-windows-msvc -- -D warnings: cleancargo test -p victory-shader: 56 passedcargo fmt --check,cargo xtask policy: ok