commit | 059a694cd01665be0284828494cdea05cb0ed998 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Fri Sep 06 14:14:24 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Sep 06 14:14:24 2024 +0000 |
tree | 339d23d77b13c952d1f621bbbd36371b634e2f91 | |
parent | e7ad6c436b745a04c770f718dc072b146833379c [diff] |
SwapChainD3D12: Remember resource state for when reusing buffers. Most applications would reconfigure the surface when there is no current texture. However reconfiguration can also be done while a texture is current and such that the IDXGISwapChain could recycle buffers. In that case the ID3D12Resource of the current texture might not be in D3D12_RESOURCE_STATE_COMMON like we assumed for all newly returned wgpu::SurfaceTextures but a different one (based on what barriers where done previously). Add a state to d3d12::Texture::CreateForSwapChain as well as a GetResourceStateForSwapChain getter and use it in d3d12::SwapChain to keep track of the current state of the ID3D12Resource for a swap chain buffer. Bug: 42241264 Change-Id: I28745c8867ad12e3fa3d780e536e14247fd57db5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/205455 Reviewed-by: Loko Kung <lokokung@google.com> Reviewed-by: Geoff Lang <geofflang@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h
that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h
version that Dawn implements.webgpu.h
.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.