diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-02-07 13:10:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-07 13:10:04 -0500 |
| commit | 199d1f52b6690843fbdc7a383775396469516e56 (patch) | |
| tree | 672304471e8cc86131fd317d76ede1f60ea8e7a5 /source/slang/slang-emit-cpp.cpp | |
| parent | af84d85799758234110fc42f0ba5c771dacb5fe3 (diff) | |
HLSL Intrinsic coverage test improvements (#1206)
* Fix CPP construct when matrix type.
* Test intrinsics on float matrices.
* Fix typo in _areNearlyEqual test. Increased default sensitivity.
Added matrix-float test.
* Matrix double test.
Fixed some issues with CUDA.
* Added reduced intrinsic version of matrix-double test.
* Improve matrix double coverage.
Test reflect/length etc on vector float.
* * Added literal-float test.
* Added vector double test
* Improved coverage of vector/matrix tests
* Disable Dx11 double-vector test because fails on CI.
* Disable literal-float, because on CI fails.
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 99d1fbf22..f3d16444a 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -1166,8 +1166,18 @@ void CPPSourceEmitter::_emitConstructConvertDefinition(const UnownedStringSlice& { writer->emit(", \n"); } - writer->emit(rowTypeName); - writer->emit("{ "); + + if (m_target == CodeGenTarget::CUDASource) + { + m_writer->emit("make_"); + writer->emit(rowTypeName); + m_writer->emit("("); + } + else + { + writer->emit(rowTypeName); + writer->emit("{ "); + } } for (int j = 0; j < dim.colCount; ++j) @@ -1184,7 +1194,14 @@ void CPPSourceEmitter::_emitConstructConvertDefinition(const UnownedStringSlice& } if (dim.rowCount > 1) { - writer->emit("}"); + if (m_target == CodeGenTarget::CUDASource) + { + writer->emit(")"); + } + else + { + writer->emit("}"); + } } } |
