summaryrefslogtreecommitdiff
path: root/source/slang/ir.h
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-05-29 11:39:55 -0700
committerGitHub <noreply@github.com>2018-05-29 11:39:55 -0700
commite7a83323bfc4dd698ef491375a37c65c83915951 (patch)
tree4dc8d7ac5c192817a6d3fa680b731723ff9eba27 /source/slang/ir.h
parentace9a8dc7e4353b1cf8e846abe2b8dc53ecdbc59 (diff)
Fix global atomic functions (#582)
Fixes #581 This change adds a new parameter passing mode `__ref` to exist alongisde `in`, `out`, and `inout`. The `__ref` modifier indicates true by-reference parameter passing (whereas `inout` is copy-in-copy-out). This is not intended to be something that users interact with directly, but rather a low-level feature that lets us provide a correct signature for the `Interlocked*()` operations in the standard library. Most of the support for passing what are logically addresses around already exists in the IR, so the majority of the work here is just in introducing the new type `Ref<T>` and then using it appropriately when lowering `__ref` parameters/arguments to the IR.
Diffstat (limited to 'source/slang/ir.h')
-rw-r--r--source/slang/ir.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/ir.h b/source/slang/ir.h
index 91ca377f2..b23e26e5e 100644
--- a/source/slang/ir.h
+++ b/source/slang/ir.h
@@ -828,6 +828,7 @@ struct IRPtrType : IRPtrTypeBase
SIMPLE_IR_PARENT_TYPE(OutTypeBase, PtrTypeBase)
SIMPLE_IR_TYPE(OutType, OutTypeBase)
SIMPLE_IR_TYPE(InOutType, OutTypeBase)
+SIMPLE_IR_TYPE(RefType, OutTypeBase)
struct IRFuncType : IRType
{