summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorskallweitNV <64953474+skallweitNV@users.noreply.github.com>2024-04-22 18:19:37 +0200
committerGitHub <noreply@github.com>2024-04-22 09:19:37 -0700
commit22fbca520f73007e2b8625bfe7eb1c77d528f301 (patch)
treefd610d181193187d5c2d834adfcce3fde644084b /tools
parent923ef7af304f2f118b0aee153bd50e054ebc50c9 (diff)
create empty vulkan framebuffer with max dimensions (#3996)
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/vulkan/vk-framebuffer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gfx/vulkan/vk-framebuffer.cpp b/tools/gfx/vulkan/vk-framebuffer.cpp
index e3e28816e..7f91b0d19 100644
--- a/tools/gfx/vulkan/vk-framebuffer.cpp
+++ b/tools/gfx/vulkan/vk-framebuffer.cpp
@@ -146,8 +146,10 @@ Result FramebufferImpl::init(DeviceImpl* renderer, const IFramebuffer::Desc& des
}
else
{
- m_width = 1;
- m_height = 1;
+ // In case we create an "empty" framebuffer, use the maximum viewport dimensions.
+ // This to allow arbitrary viewport sizes when rendering to the empty framebuffer.
+ m_width = m_renderer->m_api.m_deviceProperties.limits.maxViewportDimensions[0];
+ m_height = m_renderer->m_api.m_deviceProperties.limits.maxViewportDimensions[1];
layerCount = 1;
}
if (layerCount == 0)