From 6cee1eeda28c1ce1e5d326a0c43427b4776a1d09 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 8 Jun 2021 07:44:05 -0700 Subject: Various fixes to CUDA backend. (#1877) - Fix emitting `StructuredBuffer::Load`, which triggers emitting for `IROp_WrapExistential` that is previously unhandled. - Fix cuda layout around vectors, they should be aligned to 1,2,4,8,16 bytes instead of just using element type's alignment. That means `float4` has alignment of 16 instead of 4. - Fix `SLANG_CUDA_HANDLE_ERROR` macro definition. - Fix navis sometimes fail to find `Slang::kIROp_*` enum values when debugging external projects. Co-authored-by: Yong He Co-authored-by: jsmall-nvidia --- source/slang/slang-ir.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 1f68623bb..90d0181f7 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -6019,3 +6019,15 @@ namespace Slang } } // namespace Slang +#if SLANG_VC +#ifdef _DEBUG +// Natvis sometimes cannot find enum values. +// Export symbols for them to make sure natvis works correctly when debugging external projects. +SLANG_API const int __SlangIROpNameHint = Slang::kIROp_NameHintDecoration; +SLANG_API const int __SlangIROpExport = Slang::kIROp_ExportDecoration; +SLANG_API const int __SlangIROpImport = Slang::kIROp_ImportDecoration; +SLANG_API const int __SlangIROpStringLit = Slang::kIROp_StringLit; +SLANG_API const int __SlangIROpIntLit = Slang::kIROp_IntLit; +#endif +#endif + -- cgit v1.2.3