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/platform | |
| parent | 0ac19741937e007ebb45791f53d413d21055feda (diff) | |
Various fixes to gfx. (#2074)
* Various gfx fixes.
* Fixup.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/platform')
| -rw-r--r-- | tools/platform/gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/platform/gui.cpp b/tools/platform/gui.cpp index 5f7992abd..37e69114a 100644 --- a/tools/platform/gui.cpp +++ b/tools/platform/gui.cpp @@ -217,7 +217,7 @@ void GUI::endFrame(ITransientResourceHeap* transientHeap, IFramebuffer* framebuf vertexBufferDesc.allowedStates = ResourceStateSet(ResourceState::VertexBuffer, ResourceState::CopyDestination); vertexBufferDesc.sizeInBytes = vertexCount * sizeof(ImDrawVert); - vertexBufferDesc.cpuAccessFlags = MemoryType::CpuWrite; + vertexBufferDesc.memoryType = MemoryType::Upload; auto vertexBuffer = device->createBufferResource(vertexBufferDesc); gfx::IBufferResource::Desc indexBufferDesc; @@ -226,7 +226,7 @@ void GUI::endFrame(ITransientResourceHeap* transientHeap, IFramebuffer* framebuf indexBufferDesc.allowedStates = ResourceStateSet(ResourceState::IndexBuffer, ResourceState::CopyDestination); indexBufferDesc.defaultState = ResourceState::IndexBuffer; - indexBufferDesc.cpuAccessFlags = MemoryType::CpuWrite; + indexBufferDesc.memoryType = MemoryType::Upload; auto indexBuffer = device->createBufferResource(indexBufferDesc); auto cmdBuf = transientHeap->createCommandBuffer(); auto encoder = cmdBuf->encodeResourceCommands(); @@ -254,7 +254,7 @@ void GUI::endFrame(ITransientResourceHeap* transientHeap, IFramebuffer* framebuf ResourceStateSet(ResourceState::ConstantBuffer, ResourceState::CopyDestination); constantBufferDesc.defaultState = ResourceState::ConstantBuffer; constantBufferDesc.sizeInBytes = sizeof(glm::mat4x4); - constantBufferDesc.cpuAccessFlags = MemoryType::CpuWrite; + constantBufferDesc.memoryType = MemoryType::Upload; auto constantBuffer = device->createBufferResource(constantBufferDesc); { |
