diff options
| author | venkataram-nv <vedavamadath@nvidia.com> | 2024-07-26 14:04:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-26 14:04:22 -0700 |
| commit | c0bff66541302309ff4833e8d4ae2eba1561498a (patch) | |
| tree | f8e90eb03a0b621d80a454aa2cec1139e5e455f0 /source | |
| parent | a266cbfe961f7f7bc80efc4f6c137e8771cb62c6 (diff) | |
Disable warnings for input global variables (#4745)
* Disable warnings for input global variables
* Update comment to reflect actual check
Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
* Update comments in uninitialized-globals.slang
* Update uninitialized-globals.slang
* Refactoring test variable
* Typo in test
---------
Co-authored-by: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-inst-defs.h | 2 | ||||
| -rw-r--r-- | source/slang/slang-ir-use-uninitialized-values.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/slang-ir-inst-defs.h b/source/slang/slang-ir-inst-defs.h index 9899feba1..74cb534f9 100644 --- a/source/slang/slang-ir-inst-defs.h +++ b/source/slang/slang-ir-inst-defs.h @@ -903,7 +903,7 @@ INST_RANGE(BindingQuery, GetRegisterIndex, GetRegisterSpace) INST(AlwaysFoldIntoUseSiteDecoration, alwaysFold, 0, 0) INST(GlobalOutputDecoration, output, 0, 0) - INST(GlobalInputDecoration, output, 0, 0) + INST(GlobalInputDecoration, input, 0, 0) INST(GLSLLocationDecoration, glslLocation, 1, 0) INST(GLSLOffsetDecoration, glslOffset, 1, 0) INST(PayloadDecoration, payload, 0, 0) diff --git a/source/slang/slang-ir-use-uninitialized-values.cpp b/source/slang/slang-ir-use-uninitialized-values.cpp index e92eb7d7a..9f2cbe7a7 100644 --- a/source/slang/slang-ir-use-uninitialized-values.cpp +++ b/source/slang/slang-ir-use-uninitialized-values.cpp @@ -552,6 +552,9 @@ namespace Slang if (variable->findDecoration<IRSemanticDecoration>()) return; + if (variable->findDecoration<IRGlobalInputDecoration>()) + return; + // Check for initialization blocks for (auto inst : variable->getChildren()) { |
