summaryrefslogtreecommitdiff
path: root/source/slang/slang-type-layout.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2021-06-14 10:36:42 -0400
committerGitHub <noreply@github.com>2021-06-14 10:36:42 -0400
commit45f737dfde81d31b44afb6e5d7e89de88ee51160 (patch)
tree37d48cf9700406f4249e53dba5d905ee48a3b03a /source/slang/slang-type-layout.h
parent746ee0dc5bddeea177aaf609bcc5085b46c4057c (diff)
Improve comments around -Xarg and C++/CUDA layout (#1884)
* #include an absolute path didn't work - because paths were taken to always be relative. * Alter comments around layout size/alignment to reflect nuance on C++/CUDA. * Fix some errors in -X documentation, and clarify some of the behavior. * Small doc improvements.
Diffstat (limited to 'source/slang/slang-type-layout.h')
-rw-r--r--source/slang/slang-type-layout.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-type-layout.h b/source/slang/slang-type-layout.h
index be7ccdf8f..8c50b4eb3 100644
--- a/source/slang/slang-type-layout.h
+++ b/source/slang/slang-type-layout.h
@@ -251,6 +251,10 @@ struct SimpleLayoutInfo
LayoutResourceKind kind;
// How many resources of that kind?
+ //
+ // For uniform, the size is the number of bytes "reserved" exclusively for an instance of that type.
+ // In *general* it is not necessary for a size to be rounded up to the alignment. Some targets do
+ // though - for example C++ and CUDA targets always have size as a multiple of alignment.
LayoutSize size;
// only useful in the uniform case