[Vulkan] Shared memory descriptor set

This commit is contained in:
Triang3l
2020-11-07 20:43:45 +03:00
parent d7341f9873
commit afe304b328
3 changed files with 88 additions and 13 deletions

View File

@@ -25,6 +25,9 @@ namespace gpu {
// system page size granularity.
class SharedMemory {
public:
static constexpr uint32_t kBufferSizeLog2 = 29;
static constexpr uint32_t kBufferSize = 1 << kBufferSizeLog2;
virtual ~SharedMemory();
// Call in the implementation-specific ClearCache.
virtual void ClearCache();
@@ -98,9 +101,6 @@ class SharedMemory {
// destructor.
void ShutdownCommon();
static constexpr uint32_t kBufferSizeLog2 = 29;
static constexpr uint32_t kBufferSize = 1 << kBufferSizeLog2;
// Sparse allocations are 4 MB, so not too many of them are allocated, but
// also not to waste too much memory for padding (with 16 MB there's too
// much).