webgpu improvements
This commit is contained in:
parent
5a75571ffd
commit
8347467e1e
18 changed files with 1932 additions and 153 deletions
|
|
@ -191,5 +191,13 @@ export namespace Crafter {
|
|||
heap.samplerTable[r.firstElement] = WebGPU::wgpuCreateLinearClampSampler();
|
||||
return SamplerSlot(&heap, r.firstElement);
|
||||
}
|
||||
|
||||
// Same as AllocateLinearClampSampler but the address modes are
|
||||
// `repeat` instead of `clamp-to-edge`. Mip filtering is also linear.
|
||||
inline SamplerSlot AllocateLinearRepeatSampler(DescriptorHeapWebGPU& heap) {
|
||||
DescriptorRange r = heap.AllocateSamplerSlots(1);
|
||||
heap.samplerTable[r.firstElement] = WebGPU::wgpuCreateLinearRepeatSampler();
|
||||
return SamplerSlot(&heap, r.firstElement);
|
||||
}
|
||||
}
|
||||
#endif // CRAFTER_GRAPHICS_WINDOW_DOM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue