diff options
| author | Yong He <yonghe@outlook.com> | 2024-11-06 10:58:09 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-06 10:58:09 -0800 |
| commit | b86703432629bbfd75a902671d15e40c591065a7 (patch) | |
| tree | 2109f87304fa534034f01812551f29be098c4710 /source/slang/slang-emit.cpp | |
| parent | f8294202ce8d5658f6308eeaed634058db9bbb4b (diff) | |
[WGSL] Enable arbitrary arrays in uniform buffers. (#5497)
* [WGSL] Enable arbitrary arrays in uniform buffers.
* format code
* Undo irrelevant change and fixups.
* Update expected failure list.
* Fix.
* Rename.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index c23195f7c..1950f251c 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -1455,7 +1455,10 @@ Result linkAndOptimizeIR( if (requiredLoweringPassSet.meshOutput) legalizeMeshOutputTypes(irModule); - lowerBufferElementTypeToStorageType(targetProgram, irModule); + BufferElementTypeLoweringOptions bufferElementTypeLoweringOptions; + bufferElementTypeLoweringOptions.use16ByteArrayElementForConstantBuffer = + isWGPUTarget(targetRequest); + lowerBufferElementTypeToStorageType(targetProgram, irModule, bufferElementTypeLoweringOptions); // Rewrite functions that return arrays to return them via `out` parameter, // since our target languages doesn't allow returning arrays. |
