From ad9abad220df96d2155f6825f158b7f6327b7ea8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 10 Jan 2022 13:30:41 -0800 Subject: Various fixes to gfx. (#2074) * Various gfx fixes. * Fixup. Co-authored-by: Yong He --- tools/render-test/render-test-main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/render-test/render-test-main.cpp') 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 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; -- cgit v1.2.3