summaryrefslogtreecommitdiffstats
path: root/tools/render-test
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-11-18 11:14:29 -0800
committerGitHub <noreply@github.com>2021-11-18 11:14:29 -0800
commitb482844b689eb109ee1d70c527e098400ac6d409 (patch)
treef40e332e366b2dd2193d817c0c7d0bdc95455c90 /tools/render-test
parentefebfada38cd5252da62f7618c7f95e3ab180fbd (diff)
gfx: add coverage for more resource commands. (#2020)
* gfx: specify SubresourceRange for resource view creation. * Add gfx method for `resolveResource`. * Fix compile error. * `copyTextureToBuffer` and `textureSubresourceBarrier`. * Fix vulkan bug. * Fix test cras;h. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/render-test')
-rw-r--r--tools/render-test/render-test-main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp
index a3cde1c0a..1cb25bebb 100644
--- a/tools/render-test/render-test-main.cpp
+++ b/tools/render-test/render-test-main.cpp
@@ -202,7 +202,7 @@ struct AssignValsFromLayoutContext
ComPtr<IBufferResource> bufferResource;
SLANG_RETURN_ON_FAIL(ShaderRendererUtil::createBufferResource(srcBuffer, /*entry.isOutput,*/ bufferSize, bufferData.getBuffer(), device, bufferResource));
- IResourceView::Desc viewDesc;
+ IResourceView::Desc viewDesc = {};
viewDesc.type = IResourceView::Type::UnorderedAccess;
viewDesc.format = srcBuffer.format;
auto bufferView = device->createBufferView(
@@ -225,7 +225,7 @@ struct AssignValsFromLayoutContext
auto sampler = _createSamplerState(device, samplerEntry->samplerDesc);
- IResourceView::Desc viewDesc;
+ IResourceView::Desc viewDesc = {};
viewDesc.type = IResourceView::Type::ShaderResource;
auto textureView = device->createTextureView(
texture,
@@ -252,7 +252,7 @@ struct AssignValsFromLayoutContext
SLANG_RETURN_ON_FAIL(ShaderRendererUtil::generateTextureResource(
srcVal->textureDesc, defaultState, device, texture));
- IResourceView::Desc viewDesc;
+ IResourceView::Desc viewDesc = {};
viewDesc.type = viewType;
viewDesc.format = texture->getDesc()->format;
auto textureView = device->createTextureView(
@@ -618,7 +618,7 @@ void RenderTestApp::_initializeRenderPass()
colorBufferDesc.allowedStates = ResourceState::RenderTarget;
m_colorBuffer = m_device->createTextureResource(colorBufferDesc, nullptr);
- gfx::IResourceView::Desc colorBufferViewDesc;
+ gfx::IResourceView::Desc colorBufferViewDesc = {};
memset(&colorBufferViewDesc, 0, sizeof(colorBufferViewDesc));
colorBufferViewDesc.format = gfx::Format::R8G8B8A8_UNORM;
colorBufferViewDesc.renderTarget.shape = gfx::IResource::Type::Texture2D;
@@ -626,7 +626,7 @@ void RenderTestApp::_initializeRenderPass()
ComPtr<gfx::IResourceView> rtv =
m_device->createTextureView(m_colorBuffer.get(), colorBufferViewDesc);
- gfx::IResourceView::Desc depthBufferViewDesc;
+ gfx::IResourceView::Desc depthBufferViewDesc = {};
memset(&depthBufferViewDesc, 0, sizeof(depthBufferViewDesc));
depthBufferViewDesc.format = gfx::Format::D32_FLOAT;
depthBufferViewDesc.renderTarget.shape = gfx::IResource::Type::Texture2D;