Skip to content

Commit

Permalink
render-test: Add copy-source usage for render targets
Browse files Browse the repository at this point in the history
I found that Slang-RHI/WGPU was not able to copy from render targets to staging buffers.

This helps to address issue shader-slang#4943.
  • Loading branch information
aleino-nv committed Nov 21, 2024
1 parent dbc28b4 commit 7b98e3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/render-test/render-test-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ void RenderTestApp::_initializeRenderPass()
colorBufferDesc.size.depth = 1;
colorBufferDesc.mipLevelCount = 1;
colorBufferDesc.format = Format::R8G8B8A8_UNORM;
colorBufferDesc.usage = TextureUsage::RenderTarget;
colorBufferDesc.usage = TextureUsage::RenderTarget | TextureUsage::CopySource;
colorBufferDesc.defaultState = ResourceState::RenderTarget;
m_colorBuffer = m_device->createTexture(colorBufferDesc, nullptr);
SLANG_ASSERT(m_colorBuffer);
Expand Down

0 comments on commit 7b98e3f

Please sign in to comment.