[GAME STATUS]: Jusant #1636

Closed
opened 2026-11-26 10:02:19 +00:00 by github-bot · 4 comments
Owner

@⁠Ekt0re on GitHub · 2026-10-18 11:11 UTC · original

Game title

Jusant

Game ID / serial

PPSA10264

KytyPS5 version

KytyPS5-2026-10-18-37df7f3

Compatibility status

Main menu

Last working build / first broken build

No response

Result details

An initial test confirmed that the game loads textures correctly and the regression has been resolved. In a second test, the game failed to launch due to the following error:

--- Error ---
[Vulkan][E][2]: vkCmdCopyImage(): pRegions[0].dstOffset.x (0) + extent.width (60) exceeds miplevel 0 which has a width of 54.
srcImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_B10G11R11_UFLOAT_PACK32 and an extent of [width = 60, height = 33, depth = 26]
dstImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_B10G11R11_UFLOAT_PACK32 and an extent of [width = 54, height = 33, depth = 26]
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:/Progetti/KytyPS5/src/graphics/presentation/window/vulkanWindow.cpp:816

Steps to reproduce the result

  1. Open KytyOS5
  2. Run the Game
  3. Play

Expected behavior

The game was starting up and attempting to load the saved pipeline. However, it crashes due to a Vulkan error. This exception is expected to be handled.

OS

Windows 11 Pro 25H2

CPU

13th Gen Intel(R) Core(TM) i7-13700K (3.40 GHz)

GPU

NVIDIA GeForce RTX 4070 Ti (12 GB), 617.42

RAM / VRAM

32 GB DDR5 RAM / 12 GB VRAM

Log file upload

_kyty.txt

Screenshots/video

Image

Extra notes

No response

**@⁠Ekt0re** on GitHub · 2026-10-18 11:11 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1636) ### Game title Jusant ### Game ID / serial PPSA10264 ### KytyPS5 version KytyPS5-2026-10-18-37df7f3 ### Compatibility status Main menu ### Last working build / first broken build _No response_ ### Result details An initial test confirmed that the game loads textures correctly and the regression has been resolved. In a second test, the game failed to launch due to the following error: > > --- Error --- > [Vulkan][E][2]: vkCmdCopyImage(): pRegions[0].dstOffset.x (0) + extent.width (60) exceeds miplevel 0 which has a width of 54. > srcImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_B10G11R11_UFLOAT_PACK32 and an extent of [width = 60, height = 33, depth = 26] > dstImage: The VK_IMAGE_TYPE_3D VkImage was created with format VK_FORMAT_B10G11R11_UFLOAT_PACK32 and an extent of [width = 54, height = 33, depth = 26] > 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:/Progetti/KytyPS5/src/graphics/presentation/window/vulkanWindow.cpp:816 > ### Steps to reproduce the result 1. Open KytyOS5 2. Run the Game 3. Play ### Expected behavior The game was starting up and attempting to load the saved pipeline. However, it crashes due to a Vulkan error. This exception is expected to be handled. ### OS Windows 11 Pro 25H2 ### CPU 13th Gen Intel(R) Core(TM) i7-13700K (3.40 GHz) ### GPU NVIDIA GeForce RTX 4070 Ti (12 GB), 617.42 ### RAM / VRAM 32 GB DDR5 RAM / 12 GB VRAM ### Log file upload [_kyty.txt](https://github.com/user-attachments/files/33626799/_kyty.txt) ### Screenshots/video <img width="1242" height="752" alt="Image" src="https://github.com/user-attachments/assets/511d34d7-903c-41d3-b4a0-0fefad7e0ce7" /> ### Extra notes _No response_
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:02:19 +00:00
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-18 15:31 UTC · original

Of the six vkCmdCopyImage call sites at 37df7f3, only Image::CopyImage (src/graphics/host_gpu/renderer/image/image.cpp) takes a color copy's width and height from the source image alone, so the copy comes from there. The others copy depth/stencil only, take the size from the destination or from the smaller image, or need 2D or R32 images. The texture cache calls Image::CopyImage when it replaces or expands a cached image and direct_copy holds (same color transform, compatible image types, and the same format or two non-depth formats of the same block size). For each mip it takes the width and height from the source (std::max(source.backing.extent.width >> level, 1u)), and for two 3D images it limits only the depth to the smaller image. Here both images are 3D with the same format, the source is 60x33x26 and the destination 54x33x26, so mip 0 copies 60 texels into a 54-wide image. Image::CopyImageWithBuffer, the fallback (after CopyD16) for copies that can't be direct, also takes width and height from the source, so it would write past the destination the same way (through vkCmdCopyBufferToImage).

A local test on my RX 9070 XT and Ryzen 7600X iGPU, in which the texture cache copies a 60x33x26 3D B10G11R11 image into a 54x33x26 one, gives the same validation error, word for word.

Limiting each mip's width and height to the smaller image, as is already done for depth here and for width and height in Presenter::Frame::CopyFrom, would keep the copy inside both images: with that change in Image::CopyImage, the same test gives no validation message, and the destination's last texel, (53, 32, 25), holds the source's texel at that position. When one of the two formats is block-compressed, the limits would have to be compared in blocks and follow the block-size rules of vkCmdCopyImage. That stops the error; whether the copied texels are the right ones depends on why the game uses this memory with two widths, which the log doesn't show.

Written with Claude Code (AI): it traced the error to this function and wrote and ran the local test on my PC; I read this before posting.

**@⁠Nawid3333** on GitHub · 2026-10-18 15:31 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1636#issuecomment-6251715452) Of the six `vkCmdCopyImage` call sites at 37df7f3, only `Image::CopyImage` (src/graphics/host_gpu/renderer/image/image.cpp) takes a color copy's width and height from the source image alone, so the copy comes from there. The others copy depth/stencil only, take the size from the destination or from the smaller image, or need 2D or R32 images. The texture cache calls `Image::CopyImage` when it replaces or expands a cached image and `direct_copy` holds (same color transform, compatible image types, and the same format or two non-depth formats of the same block size). For each mip it takes the width and height from the source (`std::max(source.backing.extent.width >> level, 1u)`), and for two 3D images it limits only the depth to the smaller image. Here both images are 3D with the same format, the source is 60x33x26 and the destination 54x33x26, so mip 0 copies 60 texels into a 54-wide image. `Image::CopyImageWithBuffer`, the fallback (after `CopyD16`) for copies that can't be direct, also takes width and height from the source, so it would write past the destination the same way (through `vkCmdCopyBufferToImage`). A local test on my RX 9070 XT and Ryzen 7600X iGPU, in which the texture cache copies a 60x33x26 3D B10G11R11 image into a 54x33x26 one, gives the same validation error, word for word. Limiting each mip's width and height to the smaller image, as is already done for depth here and for width and height in `Presenter::Frame::CopyFrom`, would keep the copy inside both images: with that change in `Image::CopyImage`, the same test gives no validation message, and the destination's last texel, (53, 32, 25), holds the source's texel at that position. When one of the two formats is block-compressed, the limits would have to be compared in blocks and follow the block-size rules of vkCmdCopyImage. That stops the error; whether the copied texels are the right ones depends on why the game uses this memory with two widths, which the log doesn't show. Written with Claude Code (AI): it traced the error to this function and wrote and ran the local test on my PC; I read this before posting.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-18 19:07 UTC · original

#1176 removes this validation error in my test, where the texture cache copies a 60x33x26 3D B10G11R11 image into a 54x33x26 one (RX 9070 XT and Ryzen 7600X iGPU); I haven't run Jusant itself. The results are in #1176.

**@⁠Nawid3333** on GitHub · 2026-10-18 19:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1636#issuecomment-6253929466) #1176 removes this validation error in my test, where the texture cache copies a 60x33x26 3D B10G11R11 image into a 54x33x26 one (RX 9070 XT and Ryzen 7600X iGPU); I haven't run Jusant itself. The results are in #1176.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-19 12:30 UTC · original

Main now has 440245f6 (Pixeluted, today), which limits this copy to the smaller of the two images in Image::CopyImage. In the same test as above, the copy of the 60x33x26 image into the 54x33x26 one gives no validation error on main e5f0ee7f, and the texel read back is right (RX 9070 XT and Ryzen 7600X iGPU).

So Jusant may get past this point on a build that contains 440245f6. A log from such a build would show it. If it then stops at a vkCmdCopyBufferToImage error instead, that is the texture cache's other copy path (CopyImageWithBuffer), which still copies the full source size: 10 validation errors for the same two images in my test. #1176 covers that path too.

**@⁠Nawid3333** on GitHub · 2026-10-19 12:30 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1636#issuecomment-6267254742) Main now has 440245f6 (Pixeluted, today), which limits this copy to the smaller of the two images in `Image::CopyImage`. In the same test as above, the copy of the 60x33x26 image into the 54x33x26 one gives no validation error on main e5f0ee7f, and the texel read back is right (RX 9070 XT and Ryzen 7600X iGPU). So Jusant may get past this point on a build that contains 440245f6. A log from such a build would show it. If it then stops at a `vkCmdCopyBufferToImage` error instead, that is the texture cache's other copy path (`CopyImageWithBuffer`), which still copies the full source size: 10 validation errors for the same two images in my test. #1176 covers that path too.
Author
Owner

@⁠theantipopau on GitHub · 2026-10-20 00:47 UTC · original

Follow-up: 440245f6 fixed the direct CopyImage path, but the buffer-staged path had the same bug — CopyImageWithBuffer reused the source extent for the copyBufferToImage upload, so the 60x33x26 source still writes 6 texels past the 54-wide destination. Fixed in #1742 (clamp width/height per level like CopyImage, pin the source stride via bufferRowLength/bufferImageHeight; no change when the destination covers the source). Please re-test Jusant on a build containing #1742 and report whether the vkCmdCopyBufferToImage error is gone.

**@⁠theantipopau** on GitHub · 2026-10-20 00:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1636#issuecomment-6280664211) Follow-up: 440245f6 fixed the direct CopyImage path, but the buffer-staged path had the same bug — CopyImageWithBuffer reused the source extent for the copyBufferToImage upload, so the 60x33x26 source still writes 6 texels past the 54-wide destination. Fixed in #1742 (clamp width/height per level like CopyImage, pin the source stride via bufferRowLength/bufferImageHeight; no change when the destination covers the source). Please re-test Jusant on a build containing #1742 and report whether the vkCmdCopyBufferToImage error is gone.
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#1636
No description provided.