mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 08:06:19 +00:00
Add SwapChain::GetCurrentTexture
This is to eventually allow more using swapchain textures as CopySrc and CopyDst. Note that this commit doesn't add any additional usages. Because textures can reflect their creation parameters, swapchains now need to pass in the correct texture descriptor in all code paths. This requires additional handling in dawn::native error swapchains, and dawn::wire::client's SwapChain reservation and Device::CreateSwapChain code. Tests are added for all of these code paths except dawn::wire::client::Device::CreateSwapChain because there is no way to create a Surface in wire tests at the moment (they don't have an instance). Bug: dawn:1551 Change-Id: I22d5e909e1e94d48eb52cae57aabff8a7f0c04c1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133463 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
2ef42221d4
commit
943a1a2d7a
@@ -71,7 +71,8 @@ class DAWN_WIRE_EXPORT WireClient : public CommandHandler {
|
||||
const volatile char* HandleCommands(const volatile char* commands, size_t size) override;
|
||||
|
||||
ReservedTexture ReserveTexture(WGPUDevice device, const WGPUTextureDescriptor* descriptor);
|
||||
ReservedSwapChain ReserveSwapChain(WGPUDevice device);
|
||||
ReservedSwapChain ReserveSwapChain(WGPUDevice device,
|
||||
const WGPUSwapChainDescriptor* descriptor);
|
||||
ReservedDevice ReserveDevice();
|
||||
ReservedInstance ReserveInstance();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user