commit | 24d21e0e776a18dd96d57197149ad64213a0b03b | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Wed Sep 25 17:27:29 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Sep 25 17:27:29 2024 +0000 |
tree | c7a1502ffbb293e6ce45c3eccd8cd736a457d953 | |
parent | e8b48677212c06c3927798f19f55b1eaf098adb0 [diff] |
Split dawn::native::vulkan::Texture into multiple classes. The Texture class was becoming very difficult to work with as the handling of regular barriers was mixed with all the external texture logic which is very complex, making it increasingly harder to understand what's happening in all of Texture's state. This commit splits off Texture into: - Texture, a base class containing logic for all the regular barrier transition. - InternalTexture that creates and owns a regular VkImage. - SwapChainTexture that owns an externally created VkImage. - ExternalVkImageTexture for textures created from the the deprecated ExternalImageDescriptorVk image import path. - SharedTexture for textures created from a SharedTextureMemory. - ImportedTextureBase for common logic between SharedTexture and ExternalVkImageTexture until the latter is removed. No functional changes are intended and most methods have just been moved to one of the child classes without changes. Exceptions are: - DestroyImpl() that has been split off between all child classes. - TweakTransition() (formerly TweakTransitionForExternalTexture) which is now a virtual method called unconditionally. This could affect performance slightly as the hot code path is doing a virtual call (that is most often a noop) instead of a boolean, but it could be optimized later. - CanReuseWithoutBarriers() is now a virtual method overridden by ExternalTextureBase to handle the external state. Likewise this could have a slight performance cost and could be optimized later. - The ExternalState::InternalOnly value was removed, and explicit initialization of mLastExternalState is done in ExternalVkImageTexture::Initialize. Finally a member rename in CommandRecordingContext snuck in, that will be useful in follow-up commits. Bug: Change-Id: I27d0e0165e3d0917067c9cd2469fc5fd6173b47e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/207654 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com>
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.