commit | 08419c5581e0523229dca8b415e8db8db6585a17 | [log] [tgz] |
---|---|---|
author | Jiawei Shao <jiawei.shao@intel.com> | Mon Jul 24 02:37:14 2023 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jul 24 02:37:14 2023 +0000 |
tree | b26abc622c9a21489c91e5d1f1b6edfa4efd828b | |
parent | 408509f6297ac7cbaf8ecaacb3fffdeb100965de [diff] |
D3D12: Fix resource placement alignment for textures This patch fixes resource placement aligment for textures by always trying to use small placement alignment first so that we can have a chance to allocate less memory for small-sized textures. When GetResourceAllocationInfo() shows we cannot use small placement alignment we can call GetResourceAllocationInfo() again with 0 as alignment to get the correct system alignment. Previously we always directly use 0 as alignment for resource heap tier 2, so we won't be able to use small placement alignment because according to D3D12 SPEC, if Alignment is set to 0, the runtime will always use 4MB for MSAA textures and 64KB for everything else. Bug: dawn:282 Test: dawn_end2end_tests Change-Id: I425e7454e481d24317eb8a2e760e234c698e575f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/142220 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Kokoro: Kokoro <noreply+kokoro@google.com>
Dawn is an open-source and cross-platform implementation of the work-in-progress 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)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.