diff options
| author | Anders Leino <aleino@nvidia.com> | 2024-11-13 18:08:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-13 08:08:14 -0800 |
| commit | 91f19bedb902fb8b97c9b9da9fcb9c82e6f1c785 (patch) | |
| tree | cbb68b387a07f08258ca0b533569c48b3906d5a4 /source | |
| parent | 2be4fa42278173c2a1ef78c776cbf9a952cce83e (diff) | |
Various fixes to enable some WGSL graphics tests (#5548)
* Update Slang-RHI to get WGPU backend fixes
* render-test: Use device local memory type for vertex buffers
This helps to avoid https://github.com/shader-slang/slang-rhi/issues/104
* Fix bug in WGSL emitter layout code.
There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not
being used.
This patch enables a bunch of tests for WGPU.
This helps to address issue #4943.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-wgsl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/slang-emit-wgsl.cpp b/source/slang/slang-emit-wgsl.cpp index 5df94f561..b5ed7b9d2 100644 --- a/source/slang/slang-emit-wgsl.cpp +++ b/source/slang/slang-emit-wgsl.cpp @@ -135,13 +135,13 @@ void WGSLSourceEmitter::emitParameterGroupImpl( case LayoutResourceKind::SamplerState: case LayoutResourceKind::DescriptorTableSlot: { + auto kinds = LayoutResourceKindFlag::make(LayoutResourceKind::DescriptorTableSlot); m_writer->emit("@binding("); - m_writer->emit(attr->getOffset()); + auto index = getBindingOffsetForKinds(&containerChain, kinds); + m_writer->emit(index); m_writer->emit(") "); m_writer->emit("@group("); - auto space = getBindingSpaceForKinds( - &containerChain, - LayoutResourceKind::DescriptorTableSlot); + auto space = getBindingSpaceForKinds(&containerChain, kinds); m_writer->emit(space); m_writer->emit(") "); } |
