diff options
| author | ZanderMajercik <amajercik@nvidia.com> | 2022-01-04 11:05:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-04 11:05:04 -0800 |
| commit | 9d6c7763334908c78027199a0cb1ca3b9841ebab (patch) | |
| tree | dc75824b08ca23554a0c8e1f98458c103605ebf9 /tools/gfx-unit-test | |
| parent | 1a1b2a0de67dccc1102449b8620830131d569cde (diff) | |
Buffer allocation backend. (#2045)
* removed initialization of upload resource for CPU visible buffers (D3D12, Vulkan)
* reverted slang-gfx.h change
* declared DescBase::hasCpuAccessFlag() const to make backend changes compile under gcc
* commit before checking master branch
* commit before merge
* commit before checking master
* commit before merging upstream
* revert vulkan changes
* commit before testing on master
* commit before merge with master
* reverted bad merge changes
* reverted more bad merge changes in render-d3d12.cpp
* reverted buffer transition in _uploadBufferData
* implemented bufferBarrier() in render-d3d12.cpp
* reverted uneccesary transition in createBuffer
* create staging buffer even when AccessFlag::None passed to D3D11 createBufferResource
* renamed AccessFlags to MemoryType
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/gfx-unit-test')
| -rw-r--r-- | tools/gfx-unit-test/buffer-barrier-test.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/compute-smoke.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/create-buffer-from-handle.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/existing-device-handle-test.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/format-unit-tests.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/get-buffer-resource-handle-test.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/mutable-shader-object.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/root-mutable-shader-object.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/shared-buffers-tests.cpp | 2 | ||||
| -rw-r--r-- | tools/gfx-unit-test/shared-textures-tests.cpp | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/tools/gfx-unit-test/buffer-barrier-test.cpp b/tools/gfx-unit-test/buffer-barrier-test.cpp index f11dd1e5b..0103fda4d 100644 --- a/tools/gfx-unit-test/buffer-barrier-test.cpp +++ b/tools/gfx-unit-test/buffer-barrier-test.cpp @@ -32,7 +32,7 @@ namespace gfx_test bufferDesc.format = gfx::Format::Unknown; bufferDesc.elementSize = sizeof(float); bufferDesc.defaultState = unorderedAccess ? ResourceState::UnorderedAccess : ResourceState::ShaderResource; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; bufferDesc.allowedStates = ResourceStateSet( ResourceState::ShaderResource, ResourceState::CopyDestination, diff --git a/tools/gfx-unit-test/compute-smoke.cpp b/tools/gfx-unit-test/compute-smoke.cpp index 4dc3c685c..dbe22f08b 100644 --- a/tools/gfx-unit-test/compute-smoke.cpp +++ b/tools/gfx-unit-test/compute-smoke.cpp @@ -39,7 +39,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> numbersBuffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( diff --git a/tools/gfx-unit-test/create-buffer-from-handle.cpp b/tools/gfx-unit-test/create-buffer-from-handle.cpp index 71b5f5ca2..f7e9356bc 100644 --- a/tools/gfx-unit-test/create-buffer-from-handle.cpp +++ b/tools/gfx-unit-test/create-buffer-from-handle.cpp @@ -39,7 +39,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> originalNumbersBuffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( diff --git a/tools/gfx-unit-test/existing-device-handle-test.cpp b/tools/gfx-unit-test/existing-device-handle-test.cpp index 257ac1f37..efb21dd0b 100644 --- a/tools/gfx-unit-test/existing-device-handle-test.cpp +++ b/tools/gfx-unit-test/existing-device-handle-test.cpp @@ -39,7 +39,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> numbersBuffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( diff --git a/tools/gfx-unit-test/format-unit-tests.cpp b/tools/gfx-unit-test/format-unit-tests.cpp index d46a074e5..2cba98178 100644 --- a/tools/gfx-unit-test/format-unit-tests.cpp +++ b/tools/gfx-unit-test/format-unit-tests.cpp @@ -137,7 +137,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> outBuffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( diff --git a/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp b/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp index a5fa5e441..047522688 100644 --- a/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp +++ b/tools/gfx-unit-test/get-buffer-resource-handle-test.cpp @@ -27,7 +27,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> buffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( diff --git a/tools/gfx-unit-test/mutable-shader-object.cpp b/tools/gfx-unit-test/mutable-shader-object.cpp index 8e3838620..0880bc2d2 100644 --- a/tools/gfx-unit-test/mutable-shader-object.cpp +++ b/tools/gfx-unit-test/mutable-shader-object.cpp @@ -39,7 +39,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> numbersBuffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( diff --git a/tools/gfx-unit-test/root-mutable-shader-object.cpp b/tools/gfx-unit-test/root-mutable-shader-object.cpp index c20d3aa41..40b57e79d 100644 --- a/tools/gfx-unit-test/root-mutable-shader-object.cpp +++ b/tools/gfx-unit-test/root-mutable-shader-object.cpp @@ -39,7 +39,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> numbersBuffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( diff --git a/tools/gfx-unit-test/shared-buffers-tests.cpp b/tools/gfx-unit-test/shared-buffers-tests.cpp index fe7757083..fc9f88173 100644 --- a/tools/gfx-unit-test/shared-buffers-tests.cpp +++ b/tools/gfx-unit-test/shared-buffers-tests.cpp @@ -25,7 +25,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; bufferDesc.isShared = true; ComPtr<IBufferResource> srcBuffer; diff --git a/tools/gfx-unit-test/shared-textures-tests.cpp b/tools/gfx-unit-test/shared-textures-tests.cpp index d32a8493e..b2944b6e7 100644 --- a/tools/gfx-unit-test/shared-textures-tests.cpp +++ b/tools/gfx-unit-test/shared-textures-tests.cpp @@ -114,7 +114,7 @@ namespace gfx_test ResourceState::CopyDestination, ResourceState::CopySource); bufferDesc.defaultState = ResourceState::UnorderedAccess; - bufferDesc.cpuAccessFlags = AccessFlag::Write | AccessFlag::Read; + bufferDesc.cpuAccessFlags = MemoryType::GpuOnly; ComPtr<IBufferResource> outBuffer; GFX_CHECK_CALL_ABORT(device->createBufferResource( |
