mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Reland "D3D12: Stage BindGroups on CPU descriptor heaps."
This reverts commitc7f454c241and relands commit2479860e4b. > D3D12: Stage BindGroups on CPU descriptor heaps. > > Instead of directly populating GPU heaps, pre-encoded > BindGroups are staged on CPU heaps then copied over > to the GPU. Non-shader visible allocators are stored > on the BGL, which hands out fixed-size chunks to > simplify memory managment. To enable memory re-use, > CPU allocations are tied to the lifetime of BindGroup > objects. Reason for revert: We can reland this CL now that the CTS suppression merged. Note: Adds validation to ensure binding size > 0. Bug: dawn:155 Bug: dawn:375 Change-Id: I75b9773bbb7c70bcea803a7ad8b6480d21ea90f7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18904 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
c64242d4c2
commit
cb859a2037
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
#if defined(DAWN_COMPILER_MSVC)
|
||||
# include <intrin.h>
|
||||
@@ -152,3 +153,10 @@ float SRGBToLinear(float srgb) {
|
||||
return std::pow((srgb + 0.055f) / 1.055f, 2.4f);
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t RoundUp(uint64_t n, uint64_t m) {
|
||||
ASSERT(m > 0);
|
||||
ASSERT(n > 0);
|
||||
ASSERT(m <= std::numeric_limits<uint64_t>::max() - n);
|
||||
return ((n + m - 1) / m) * m;
|
||||
}
|
||||
Reference in New Issue
Block a user