mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Make the SwapChain interface match webgpu.h
This changes the methods of Dawn's SwapChain to match webgpu.h, namely Present() now doesn't take arguments, and GetNextTexture() is replaced with GetCurrentTextureView(). BUG=dawn:269 Change-Id: Ia0debefb170caf799c3310b1dad5535c4c5f59ca Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13441 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
700cfe7664
commit
604072bc2e
@@ -125,8 +125,7 @@ void init() {
|
||||
}
|
||||
|
||||
void frame() {
|
||||
WGPUTexture backbuffer = wgpuSwapChainGetNextTexture(swapchain);
|
||||
WGPUTextureView backbufferView = wgpuTextureCreateView(backbuffer, nullptr);
|
||||
WGPUTextureView backbufferView = wgpuSwapChainGetCurrentTextureView(swapchain);
|
||||
WGPURenderPassDescriptor renderpassInfo;
|
||||
renderpassInfo.nextInChain = nullptr;
|
||||
renderpassInfo.label = nullptr;
|
||||
@@ -157,7 +156,7 @@ void frame() {
|
||||
|
||||
wgpuQueueSubmit(queue, 1, &commands);
|
||||
wgpuCommandBufferRelease(commands);
|
||||
wgpuSwapChainPresent(swapchain, backbuffer);
|
||||
wgpuSwapChainPresent(swapchain);
|
||||
wgpuTextureViewRelease(backbufferView);
|
||||
|
||||
DoFlush();
|
||||
|
||||
Reference in New Issue
Block a user