summaryrefslogtreecommitdiffstats
path: root/source/slang/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/ir.cpp')
-rw-r--r--source/slang/ir.cpp27
1 files changed, 24 insertions, 3 deletions
diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp
index ab961a159..d6a01a484 100644
--- a/source/slang/ir.cpp
+++ b/source/slang/ir.cpp
@@ -55,6 +55,28 @@ namespace Slang
}
}
+ void IRUse::set(IRValue* usedValue)
+ {
+ // clear out the old value
+ if (usedValue)
+ {
+ *prevLink = nextUse;
+ }
+
+ init(user, usedValue);
+ }
+
+ void IRUse::clear()
+ {
+ if (usedValue)
+ {
+ *prevLink = nextUse;
+ }
+
+ user = nullptr;
+ usedValue = nullptr;
+ }
+
//
IRUse* IRUser::getArgs()
@@ -3683,9 +3705,8 @@ namespace Slang
// these should get run whether or not the entry point
// references them.
- // Depending on the downstream target, we may need to apply some
- // guaranteed transformations to legalize things. We will go
- // ahead and apply there here for now.
+ // For GLSL only, we will need to perform "legalization" of
+ // the entry point and any entry-point parameters.
switch (target)
{
case CodeGenTarget::GLSL: