Commit b9f2ee0
committed
Add --allow-fragment-no-output compiler flag to bypass fragment shader validation
Implements a new compiler flag that allows fragment shaders with no output
operations to compile without errors. This addresses issue #284 where
fragment shaders optimized by DCE (Dead Code Elimination) would fail
validation even when the lack of output was intentional.
Changes:
- Add `allow_fragment_no_output` field to linker Options struct
- Add command-line flag parsing for `--allow-fragment-no-output`
- Skip fragment shader output validation when flag is enabled
- Update error message to include usage hint for the new flag
This flag is intended for testing scenarios and special use cases where
fragment shaders legitimately produce no output. The validation remains
active by default to catch unintentional issues.1 parent becdc41 commit b9f2ee0
File tree
2 files changed
+11
-1
lines changed- crates/rustc_codegen_spirv/src/linker
- tests/compiletests/ui/dis
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
711 | 714 | | |
712 | 715 | | |
713 | 716 | | |
714 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
715 | 720 | | |
716 | 721 | | |
717 | 722 | | |
| |||
851 | 856 | | |
852 | 857 | | |
853 | 858 | | |
| 859 | + | |
| 860 | + | |
854 | 861 | | |
855 | 862 | | |
856 | 863 | | |
| |||
864 | 871 | | |
865 | 872 | | |
866 | 873 | | |
| 874 | + | |
| 875 | + | |
867 | 876 | | |
868 | 877 | | |
869 | 878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
0 commit comments