diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/hlsl.meta.slang | 1 | ||||
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 7c5ca0027..e677b9020 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -2987,6 +2987,7 @@ __glsl_extension(GL_KHR_shader_subgroup_basic) __spirv_version(1.3) __target_intrinsic(glsl, "subgroupBarrier()") __target_intrinsic(hlsl, "GroupMemoryBarrier()") +__target_intrinsic(cuda, "__syncwarp()") void GroupMemoryBarrierWithWaveSync(); // NOTE! WaveMaskBroadcastLaneAt is *NOT* standard HLSL diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 5359740b4..1e2482bb5 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -984,7 +984,7 @@ void CPPSourceEmitter::_emitGetAtDefinition(const UnownedStringSlice& funcName, { int vecSize = int(getIntVal(vectorType->getElementCount())); - writer->emit("assert(b >= 0 && b < "); + writer->emit("SLANG_PRELUDE_ASSERT(b >= 0 && b < "); writer->emit(vecSize); writer->emit(");\n"); if (lValue) @@ -997,7 +997,7 @@ void CPPSourceEmitter::_emitGetAtDefinition(const UnownedStringSlice& funcName, //int colCount = int(getIntVal(matrixType->getColumnCount())); int rowCount = int(getIntVal(matrixType->getRowCount())); - writer->emit("assert(b >= 0 && b < "); + writer->emit("SLANG_PRELUDE_ASSERT(b >= 0 && b < "); writer->emit(rowCount); writer->emit(");\n"); |
