diff options
| author | Yong He <yonghe@outlook.com> | 2022-01-10 13:30:41 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-10 13:30:41 -0800 |
| commit | ad9abad220df96d2155f6825f158b7f6327b7ea8 (patch) | |
| tree | 12b146961910c1b4aa6a68b3063ec3e68d2ce23d /tools/render-test/render-test-main.cpp | |
| parent | 0ac19741937e007ebb45791f53d413d21055feda (diff) | |
Various fixes to gfx. (#2074)
* Various gfx fixes.
* Fixup.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp index f3e3dbccf..3f5544ccd 100644 --- a/tools/render-test/render-test-main.cpp +++ b/tools/render-test/render-test-main.cpp @@ -558,7 +558,7 @@ SlangResult RenderTestApp::initialize( IBufferResource::Desc vertexBufferDesc; vertexBufferDesc.type = IResource::Type::Buffer; vertexBufferDesc.sizeInBytes = kVertexCount * sizeof(Vertex); - vertexBufferDesc.cpuAccessFlags = MemoryType::CpuWrite; + vertexBufferDesc.memoryType = MemoryType::Upload; vertexBufferDesc.defaultState = ResourceState::VertexBuffer; vertexBufferDesc.allowedStates = ResourceStateSet(ResourceState::VertexBuffer); @@ -908,7 +908,7 @@ Result RenderTestApp::writeBindingOutput(const String& fileName) const size_t bufferSize = bufferDesc.sizeInBytes; ComPtr<ISlangBlob> blob; - if(bufferDesc.cpuAccessFlags & MemoryType::CpuRead) + if(bufferDesc.memoryType == MemoryType::ReadBack) { // The buffer is already allocated for CPU access, so we can read it back directly. // @@ -919,7 +919,7 @@ Result RenderTestApp::writeBindingOutput(const String& fileName) // The buffer is not CPU-readable, so we will copy it using a staging buffer. auto stagingBufferDesc = bufferDesc; - stagingBufferDesc.cpuAccessFlags = MemoryType::CpuRead; + stagingBufferDesc.memoryType = MemoryType::ReadBack; stagingBufferDesc.allowedStates = ResourceStateSet(ResourceState::CopyDestination, ResourceState::CopySource); stagingBufferDesc.defaultState = ResourceState::CopyDestination; |
