diff options
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-hlsl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index 92866f9c4..37411c93e 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -351,10 +351,22 @@ void HLSLSourceEmitter::emitEntryPointAttributesImpl(IRFunc* irFunc, IREntryPoin m_writer->emit(")]\n"); }; + auto emitWaveSizeAttribute = [&]() + { + Int waveSize; + if (getComputeWaveSize(irFunc, &waveSize)) + { + m_writer->emit("[WaveSize("); + m_writer->emit(waveSize); + m_writer->emit(")]\n"); + } + }; + switch (stage) { case Stage::Compute: { + emitWaveSizeAttribute(); emitNumThreadsAttribute(); } break; |
