[ERROR]: Vulkan - - CHECK SOLUTION DEV PLEASE! #1153

Closed
opened 2026-11-26 09:45:15 +00:00 by github-bot · 2 comments
Owner

@⁠perxys-star on GitHub · 2026-10-07 17:25 UTC · original

Hi everyone, I'm testing the emulator—specifically with the game The Adventure of Elliot. I was getting a different error before, but now that I've installed the Vulkan SDKs, it's providing more information. I'm sharing this in case a dev wants to take a look. Just a clarification: this error occurs when running it in windowed mode; it doesn't happen in full-screen mode, though the game crashes with a different error there.

--- Build ---
Official build KytyPS5-2026-10-07-d2413fc
--- Error ---
[Vulkan][E][2]: vkCmdCopyImage(): pRegions[0].dstOffset.x (0) + extent.width (475) exceeds miplevel 0 which has a width of 455.
srcImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_B10G11R11_UFLOAT_PACK32 and an extent of [width = 475, height = 5, depth = 5]
dstImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_R8G8B8A8_UNORM and an extent of [width = 455, height = 5, depth = 5]
The Vulkan spec states: For each element of pRegions, dstOffset.x and (extent.width + dstOffset.x), where extent is adjusted for size-compatibility, must both be greater than or equal to 0 and less than or equal to the width of the specified dstSubresource of dstImage (https://docs.vulkan.org/spec/latest/chapters/copies.html#VUID-vkCmdCopyImage-dstOffset-00150)
in D:\a\KytyPS5\KytyPS5\src\graphics\presentation\window\vulkanWindow.cpp:781

According to the AI, it is a format issue... here is the answer:

Mismatch between formats and GPU architecture:

The source uses VK_FORMAT_B10G11R11_UFLOAT_PACK32 (a packed floating-point color format), while the destination uses VK_FORMAT_R8G8B8A8_UNORM.

The internal presentation emulation logic in vulkanWindow.cpp is not correctly calculating the scaling or pitch/stride conversion when mapping the console's framebuffer memory to the PC renderer.
Image
**@⁠perxys-star** on GitHub · 2026-10-07 17:25 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1153) Hi everyone, I'm testing the emulator—specifically with the game *The Adventure of Elliot*. I was getting a different error before, but now that I've installed the Vulkan SDKs, it's providing more information. I'm sharing this in case a dev wants to take a look. Just a clarification: this error occurs when running it in windowed mode; it doesn't happen in full-screen mode, though the game crashes with a different error there. --- Build --- Official build KytyPS5-2026-10-07-d2413fc --- Error --- [Vulkan][E][2]: vkCmdCopyImage(): pRegions[0].dstOffset.x (0) + extent.width (475) exceeds miplevel 0 which has a width of 455. srcImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_B10G11R11_UFLOAT_PACK32 and an extent of [width = 475, height = 5, depth = 5] dstImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_R8G8B8A8_UNORM and an extent of [width = 455, height = 5, depth = 5] The Vulkan spec states: For each element of pRegions, dstOffset.x and (extent.width + dstOffset.x), where extent is adjusted for size-compatibility, must both be greater than or equal to 0 and less than or equal to the width of the specified dstSubresource of dstImage (https://docs.vulkan.org/spec/latest/chapters/copies.html#VUID-vkCmdCopyImage-dstOffset-00150) in D:\a\KytyPS5\KytyPS5\src\graphics\presentation\window\vulkanWindow.cpp:781 According to the AI, it is a format issue... here is the answer: Mismatch between formats and GPU architecture: The source uses VK_FORMAT_B10G11R11_UFLOAT_PACK32 (a packed floating-point color format), while the destination uses VK_FORMAT_R8G8B8A8_UNORM. The internal presentation emulation logic in vulkanWindow.cpp is not correctly calculating the scaling or pitch/stride conversion when mapping the console's framebuffer memory to the PC renderer. <img width="1097" height="377" alt="Image" src="https://github.com/user-attachments/assets/f087cf01-ff73-41db-b8b3-eaaf8acc151c" />
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:45:16 +00:00
Author
Owner

@⁠unknownindividualpersonnel on GitHub · 2026-10-07 18:02 UTC · original

check game compatibility status.

**@⁠unknownindividualpersonnel** on GitHub · 2026-10-07 18:02 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1153#issuecomment-6043803556) check game compatibility status.
Author
Owner

@⁠perxys-star on GitHub · 2026-10-07 18:23 UTC · original

Possible Source Code-Level Solutions

If you have access to the source code or are modifying the project, the fix involves replacing vkCmdCopyImage with a render pass or a blit operation that includes conversion:

Option A: Replace `vkCmdCopyImage` with `vkCmdBlitImage`
`vkCmdBlitImage` supports region rescaling (extent mismatch) and automatic conversion between certain compatible color formats.
C++

VkImageBlit blitRegion{};
blitRegion.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1};
blitRegion.srcOffsets[0] = {0, 0, 0};
blitRegion.srcOffsets[1] = {475, 5, 5}; // Source extent

blitRegion.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1};
blitRegion.dstOffsets[0] = {0, 0, 0};
blitRegion.dstOffsets[1] = {455, 5, 5}; // Clamp to destination extent

vkCmdBlitImage(
    cmdBuffer,
    srcImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
    dstImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
    1, &blitRegion, VK_FILTER_LINEAR
);

void Image::CopyImage(Image& source) { EXIT_IF(source.backing.samples != backing.samples); m_scheduler.EndRendering(); // ... código que usa vk::ImageBlit en lugar de vk::ImageCopy command.blitImage(source.backing.image, vk::ImageLayout::eTransferSrcOptimal, backing.image, vk::ImageLayout::eTransferDstOptimal, static_cast<uint32_t>(blits.size()), blits.data(), vk::Filter::eLinear); // ... }

image.cpp

**@⁠perxys-star** on GitHub · 2026-10-07 18:23 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1153#issuecomment-6044153283) Possible Source Code-Level Solutions If you have access to the source code or are modifying the project, the fix involves replacing `vkCmdCopyImage` with a render pass or a blit operation that includes conversion: Option A: Replace `vkCmdCopyImage` with `vkCmdBlitImage` `vkCmdBlitImage` supports region rescaling (extent mismatch) and automatic conversion between certain compatible color formats. C++ VkImageBlit blitRegion{}; blitRegion.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; blitRegion.srcOffsets[0] = {0, 0, 0}; blitRegion.srcOffsets[1] = {475, 5, 5}; // Source extent blitRegion.dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}; blitRegion.dstOffsets[0] = {0, 0, 0}; blitRegion.dstOffsets[1] = {455, 5, 5}; // Clamp to destination extent vkCmdBlitImage( cmdBuffer, srcImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, dstImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &blitRegion, VK_FILTER_LINEAR ); `void Image::CopyImage(Image& source) { EXIT_IF(source.backing.samples != backing.samples); m_scheduler.EndRendering(); // ... código que usa vk::ImageBlit en lugar de vk::ImageCopy command.blitImage(source.backing.image, vk::ImageLayout::eTransferSrcOptimal, backing.image, vk::ImageLayout::eTransferDstOptimal, static_cast<uint32_t>(blits.size()), blits.data(), vk::Filter::eLinear); // ... }` [image.cpp](https://github.com/user-attachments/files/33170686/image.cpp)
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#1153
No description provided.