From 45f737dfde81d31b44afb6e5d7e89de88ee51160 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 14 Jun 2021 10:36:42 -0400 Subject: 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. --- source/slang/slang-type-layout.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/slang-type-layout.h') 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 -- cgit v1.2.3