summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan/render-vk.cpp
diff options
context:
space:
mode:
authorlucy96chen <47800040+lucy96chen@users.noreply.github.com>2022-04-07 11:11:45 -0700
committerGitHub <noreply@github.com>2022-04-07 11:11:45 -0700
commit2aac3700741f47caa6e8d674872979e2cdc251ab (patch)
tree02e750f77fa40f4f397e4698f06e05e15e38be16 /tools/gfx/vulkan/render-vk.cpp
parent86221ff4757ee504307f3537b34acb05117ce272 (diff)
Texture views/shapes tests part 1 (#2179)
* Framework for texture views testing working; Small tweaks to texture testing utils; Changed D3D12 readTextureResource to account for non-1 depth * Basic framework for texture views tests working; Test file needs a rename at some point * 1D, 2D, and 3D textures working for ShaderResource, UnorderedAccess, and RenderTarget tests; Fixed some small issues with handling the depth field of 3D textures in Vulkan causing incorrectly cleared textures
Diffstat (limited to 'tools/gfx/vulkan/render-vk.cpp')
-rw-r--r--tools/gfx/vulkan/render-vk.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gfx/vulkan/render-vk.cpp b/tools/gfx/vulkan/render-vk.cpp
index 5d4f046b2..f9faddf3d 100644
--- a/tools/gfx/vulkan/render-vk.cpp
+++ b/tools/gfx/vulkan/render-vk.cpp
@@ -3187,7 +3187,7 @@ Result FramebufferImpl::init(DeviceImpl* renderer, const IFramebuffer::Desc& des
auto size = resourceDesc->size;
m_width = getMipLevelSize(viewDesc->subresourceRange.mipLevel, size.width);
m_height = getMipLevelSize(viewDesc->subresourceRange.mipLevel, size.height);
- layerCount = viewDesc->subresourceRange.layerCount;
+ layerCount = (resourceDesc->type == IResource::Type::Texture3D) ? size.depth : viewDesc->subresourceRange.layerCount;
}
else
{