summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-cpp.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-08-22 15:58:28 -0400
committerGitHub <noreply@github.com>2019-08-22 15:58:28 -0400
commit06a0e3980fd04fa265bd20eb11f2abc18bd6a215 (patch)
treeea664d7f0ecfa4b6948319d4fcfb0bbd1e3af888 /source/slang/slang-emit-cpp.h
parentbc392f9dbfb8cb6c359bb890fb85b831e49bfd55 (diff)
WIP: CPU compute coverage (#1030)
* Add support for '=' when defining a name in test. * Add support for double intrinsics. * Add support for asdouble Add findOrAddInst - used instead of findOrEmitHoistableInst, for nominal instructions. Support cloning of string literals. C++ working on more compute tests. * Constant buffer support in reflection. Fixed debugging into source for generated C++. buffer-layout.slang works. * Added cpu test result. * Remove some commented out code. Comment on next fixes. * Improvements to reflection CPU code. * C++ working with ByteAddressBuffer. * Enabled more compute tests for CPU. * Enabled more compute tests on CPU. Added support for [] style access to a vector. * Enabled more CPU compute tests. * Handling of buffer-type-splitting.slang Named buffers can be paths to resources * Fix some warnings, remove some dead code. * Fix problem with verification of number of operands for asuint/asint as they can have 1 or 3 operands. asdouble takes 2. * Fix handling in MemoryArena around aligned allocations. That _allocateAlignedFromNewBlock assumed the block allocated has the aligment that was requested and so did not correct the start address.
Diffstat (limited to 'source/slang/slang-emit-cpp.h')
-rw-r--r--source/slang/slang-emit-cpp.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/slang/slang-emit-cpp.h b/source/slang/slang-emit-cpp.h
index 4280bdc80..6c300320a 100644
--- a/source/slang/slang-emit-cpp.h
+++ b/source/slang/slang-emit-cpp.h
@@ -110,11 +110,15 @@ just constructXXXFromScalar. Would be good if there was a suitable name to encom
x(Step, "step", 2) \
\
x(AsFloat, "asfloat", 1) \
- x(AsInt, "asint", 1) \
- x(AsUInt, "asuint", 1) \
+ x(AsInt, "asint", -1) \
+ x(AsUInt, "asuint", -1) \
+ x(AsDouble, "asdouble", 2) \
\
x(ConstructConvert, "", 1) \
- x(ConstructFromScalar, "", 1)
+ x(ConstructFromScalar, "", 1) \
+ \
+ x(GetAt, "", 2) \
+ x(SetAt, "", 3)
class CPPSourceEmitter: public CLikeSourceEmitter
@@ -224,7 +228,8 @@ protected:
void _emitReflectDefinition(const UnownedStringSlice& funcName, const SpecializedIntrinsic& specOp);
void _emitConstructConvertDefinition(const UnownedStringSlice& funcName, const SpecializedIntrinsic& specOp);
void _emitConstructFromScalarDefinition(const UnownedStringSlice& funcName, const SpecializedIntrinsic& specOp);
-
+ void _emitGetAtDefinition(const UnownedStringSlice& funcName, const SpecializedIntrinsic& specOp);
+
void _emitSignature(const UnownedStringSlice& funcName, const SpecializedIntrinsic& specOp);
void _emitInOutParamType(IRType* type, String const& name, IRType* valueType);