Don't crash on bigger than recommended image

This commit is contained in:
Patrick Nicolas
2025-06-09 16:26:56 +02:00
parent b3f3c1c7fc
commit 18d1619d20
+7
View File
@@ -882,6 +882,13 @@ void scenes::stream::render(const XrFrameState & frame_state)
// defoveate the image
auto extents = reprojector->reproject(command_buffer, foveation, image_index);
for (size_t i = 0; i < view_count; ++i)
{
extents[i] = {
.width = std::min(extents[i].width, swapchain.width()),
.height = std::min(extents[i].height, swapchain.height()),
};
}
command_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, *query_pool, 2);