You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kyty: Grand Theft Auto V draws its whole picture at about a quarter size in the top-left of the display buffer, black elsewhere #298
area: renderingWrong or missing pixels: render targets, depth, sampling, formatsbugSomething isn't workingmediumA few days of work; needs some knowledge of the codeneeds: gameNeeds a PS5 title you dumped yourself, to reproduce or to test
Every frame of Grand Theft Auto V shows the complete picture shrunk to roughly a quarter of the window (about half the width and half the height) in the top-left corner, with the rest black.
Title, test or build step
Grand Theft Auto V, PPSA38500 01.002.001
AnyPS5 commit
AnyKyty 7de61e3451 with #295 and #296 (now merged).
Convert with relinker --windows, run with APS5_NO_WGI=1. The picture is in the corner from the first frames until the run stops (about 30 s, at #294).
Log
[dbg-attr] register set=0 start=0 num=2 1920x1080 pitch=0 tiling=0 option=0x0
[mouse] video driver windows: guest 1920x1080 presented at 1109x624, delta scale 1.7313 x 1.7308
(The first line is a temporary log added to sceVideoOutRegisterBuffers2 and sceVideoOutSubmitChangeBufferAttribute2; it is not in the tree.)
What was checked
VideoOut: the title registers one set of two linear 1920x1080 buffers and never calls sceVideoOutSubmitChangeBufferAttribute2, so there is no attribute change to a smaller size that the presenter could be ignoring. The window scales the 1920x1080 buffer correctly.
PSSR: scePsmlMfsr2Init is refused as on a base console (the modelled console has no PSSR), so the title takes its own path rather than the system upscaler.
So the last pass that writes the display buffer only covers about its top-left quarter: either a draw whose viewport or scissor comes out at half size, or a dispatch sized from a half-resolution value, possibly the title's own dynamic-resolution upscale that does not run or reads the wrong scale.
Not yet checked: the viewport, scissor and dispatch dimensions of the passes that write the display buffer address. AnyKyty has no frame capture; a pointer to the quickest way to read those (a [kyty-*] log or a setting) would help.
@Ryongen thanks, very clear report. We're checking right now whether this title shows the same quarter-size picture under Linux at 1920x1080 on our side, which tells us whether it's a Kyty translation issue or something specific to Windows or to the 01.002.001 build. We'll come back here with the result and the quickest way to dump the viewport, scissor and dispatch sizes of the passes that write the display buffer.
Thanks for the very clear report and for ruling out VideoOut and PSSR first.
We can't reproduce it, but our run doesn't take your code path. We ran current AnyKyty (441382ef20, which includes #295 and #296)
on Linux (RTX 4080 SUPER) with a 1920x1080 display and the output status forced to 1080p (APS5_OUTPUT_RESOLUTION=1920x1080).
From the logos to gameplay, every frame fills the window. But our copy of this title is the launch version, and with a 1080p
output it still registers 3840x2160 display buffers ([mouse] … guest 3840x2160 presented at 1152x648); it has never registered
a 1920x1080 buffer in any of our runs. Yours registers 1920x1080 buffers, so your newer version takes a 1080p display path that the
launch version doesn't have. Your version also calls into the PSSR library, which the launch version doesn't import at all, so the
update reworked the resolution and upscaling chain. Our guess is that the difference comes from the title version, not from Windows.
Quickest check: run once with APS5_OUTPUT_RESOLUTION=3840x2160. It only changes what sceVideoOutGetOutputStatus reports
(2160p class instead of 1080p); the title still chooses its own buffer and render sizes. If the title then registers 3840x2160
buffers and the picture fills the window, the bug is confined to its 1080p output path, and you have a workaround in the meantime.
Reading viewports, scissors and dispatch sizes. AnyKyty has no frame capture (the RenderDoc hook from KytyPS5 isn't built into
AnyKyty, and we haven't tried injecting RenderDoc from outside), but the Kyty core can log every draw and every direct dispatch:
(PowerShell: $env:KYTY_GRAPHICS_DEBUG_DUMP="1", and so on.)
Each draw (indirect draws included) prints a RenderTraget: block with base.addr and attrib2.width / attrib2.height
(size minus one), then a ScreenViewport: block with vp[0].xscale, vp[0].xoffset, vp[0].yscale, vp[0].yoffset, the
viewport scissor, the screen, window and generic scissors, and window_offset_x/y. A viewport that covers the whole target has xscale = xoffset = width / 2, yscale = -height / 2, yoffset = height / 2.
Each direct dispatch prints GraphicsRenderDispatchDirect: frame=N … groups=XxYxZ … local=AxBxC …, followed by one CS texture[i]: … usage=read-write … addr=0x… extent=WxH line per image it writes. Indirect dispatches are not logged.
Addresses are guest virtual addresses in bytes, the same values you pass to sceVideoOutRegisterBuffers2, so print the buffer
addresses in your temporary log and look for them.
It's very verbose and slow, and it also turns the shader store off: in our test it wrote about 360 MB in 40 s (about 36,000 draws
into the three display buffers, up to the title screen). Let it run 10-20 s past the first frames, then stop the game.
For reference, at 3840x2160 every draw into our display buffers has xscale=1920 xoffset=1920 yscale=-1080 yoffset=1080 and
scissors 0..3840 x 0..2160. For the last pass that writes your 1920x1080 display buffer, there are three possible outcomes:
xscale/yscale around 480/-270, or a scissor that stops at about 960x540: the title itself asked for a half-size region.
Then the next question is which value it computed that from.
A full-size viewport and scissor (xscale=960): the pass samples a texture that already holds the shrunk picture. Go back one
pass to whatever wrote that texture (a render target or a CS texture with usage=read-write).
A dispatch that writes the buffer with groups × local covering only about 960x540: its size comes from a half-resolution value.
This filter (Python 3) prints, for every draw or direct dispatch that writes a given address, its size, viewport and scissors, or
its group counts: python writers.py kyty.txt 0x<display buffer address> > writers.txt
If you can post the result of the 3840x2160 run, and writers.txt (or the relevant part of kyty.txt) for a couple of frames at
1080p with the two buffer addresses, we'll take it from there.
Thanks, that narrowed it a lot. Both runs on 441382ef20, Windows, RTX 2070 SUPER.
APS5_OUTPUT_RESOLUTION=3840x2160: the title registers 3840x2160 buffers (guest 3840x2160 presented at 1109x624) and the picture fills the window, so the bug is confined to the 1080p path and that setting is a workaround. It then stops at the compute shader from #294 (0x95b4ea51e43c1825, pc 0x5514).
1080p with KYTY_GRAPHICS_DEBUG_DUMP=1 (80 MB, about 14,400 draws and 4,600 direct dispatches before the #294 stop). The display buffers are 0x1055c20000 and 0x10564a0000 (1920x1080, linear). Your filter gives only draws into them, all identical:
So it's your case 2: a full-size pass that samples a texture that already holds the shrunk picture. No direct dispatch writes the display buffers.
Going back, every frame has the same chain of render targets (run-length per target, in order):
3 x RT 0xfbf61c0000 1920x1080
1 x RT 0xb404000000 3840x2160 full viewport: xscale=1920 xoffset=1920 yscale=-1080 yoffset=1080, scissors 3840x2160
1 x RT 0xfbf61c0000 1920x1080
1 x RT 0x1055c20000 1920x1080 display buffer (or 0x10564a0000)
1 x CS 0x106a280000 33x33x33
So with a 1080p output the title still renders into a 3840x2160 target, then goes back down to 1080p. A shrunk, complete picture with black around it would come out of this if the 1920x1080 to 3840x2160 draw reads its 1920x1080 source as if it were 3840x2160 (by pixel position, or with a T# that says 3840x2160 over the 1080p data). The picture would then sit 1:1 in the top-left quarter of the 4K target, with black elsewhere, and the full-texture downsample to 0xfbf61c0000 would leave it at a quarter of the frame. The dump doesn't list the textures a draw reads (only CS texture[i] lines), so I can't confirm which T# that 4K draw uses. Is there a setting that logs the pixel shader's T#s per draw?
One step further, with a temporary log in RenderExecutor::ResolveTexture (T# address, extent, pitch, tiling, per shader) at the default 1080p output:
shader=0x9610322441735e79 addr=0xfbf61c0000 extent=1920x1080 pitch=1920 tile=27 fmt=56 (the draw into the 3840x2160 target 0xb404000000)
shader=0x67e171285a5122c0 addr=0xb404000000 extent=3840x2160 pitch=3840 tile=27 fmt=130 (the draw back into 0xfbf61c0000)
Both T#s describe their surfaces correctly, so it is not a T# that claims the wrong size. The 1080p to 4K pass is a plain textured quad:
So the UV comes straight from the vertex shader and the shrink has to be in the quad's geometry: the title draws the 1920x1080 picture as a 1920x1080-pixel rectangle inside a 3840x2160 target with a full viewport. In other words it lays the frame out for a 1080p screen but composes into a 4K target, which looks like two size answers that disagree (the 1080p class from sceVideoOutGetOutputStatus, and something that still says 4K). I haven't dumped that quad's vertex shader or its constants yet; if you know which query this version uses for its composition target size, that is probably the one to check.
@Ryongen excellent analysis, thanks. We're now going through every query that reports a screen or output size to the title, to find the one that still answers 4K when the output is 1080p, and we'll add the per-draw T# log you asked for (graphics stages, not only CS texture[i]) to the same dump. Back here soon.
Thanks, that narrows it a lot, and your ResolveTexture log already rules out a T# that lies about its size.
Which size queries exist, and what they answer at 1080p. These are all the calls in 441382ef20 that give a title a display size or a display capability. "At 1080p" means a 1080p desktop or APS5_OUTPUT_RESOLUTION=1920x1080; both give the same answers.
stop the game (not implemented), so your run doesn't call them
sceSystemServiceGetDisplaySafeAreaInfo
1n37q1Bvc5Y
ratio 1.0, no size
sceAgcGetIsTrinityMode, sceKernelIsTrinityMode
BfBDZGbti7A, tU5e3f9gSiU
base console
scePsmlMfsr2Init
o+NM86gEwFE
unsupported console; no PSSR call returns a size
sceSystemServiceParamGetInt and sceAppContentAppParamGetInt have no display parameter, the AvControl monitor-info calls answer "not initialized" and write nothing, and the mouse virtual screen and IME panel sizes only echo what the title set.
So only two answers can say 4K while the output status says 1080p:
sceVideoOutGetResolutionStatus, if the title registered or flipped a 3840x2160 buffer on that port before asking (for example a 4K buffer set registered at start-up). It also disagreed the other way: on a 4K display it said 1920x1080 until a buffer was registered, while the output status said 2160p.
sceVideoOutIsOutputSupported / sceVideoOutConfigureOutput for an output mode AnyPS5 doesn't know, which always gets the 4K TV's answer.
Our copy is the launch version: of all these calls it imports only sceVideoOutGetOutputStatus, and it registers 3840x2160 buffers whatever the class. So we can't see which one your version reads. You can check which ones it imports: NIDs are plain text in the decrypted eboot.bin, so findstr /c:"6kPnj51T62Y#" eboot.bin prints something only if that call is imported (repeat with Nv8c-Kb+DUM# and w0hLuNarQxY#).
Fix for the first one. AnyKyty 2133762e89 makes sceVideoOutGetResolutionStatus report the output, as a console does: 1920x1080 when the output status says 1080p, 3840x2160 when it says 2160p, whatever buffers the title registers. It only changes your 1080p run if your version imports 6kPnj51T62Y and had a 3840x2160 buffer on that port when it asked.
Test for the second one, no rebuild needed. Run the 1080p case once more with ANYPS5_VIDEO_OUT_MAX_WIDTH=1920 and ANYPS5_VIDEO_OUT_MAX_HEIGHT=1080. With both set below 4K, an output mode AnyPS5 doesn't know is answered as unsupported (0) instead of 0x8029001E. If the picture then fills the window, your version chooses its composition size from an output-mode probe, and that answer is what we have to get right on a 1080p display.
T#s per draw. AnyKyty 8bf7cc52cf adds them to KYTY_GRAPHICS_DEBUG_DUMP. After each draw's RenderTraget:, ScreenViewport: and Parameters: blocks, every texture that each stage of the draw binds gets one line:
The prefix is VS, LS, HS, DS or MS for the stages before the pixel shader. hash is the stage's shader_hash, the same field the GraphicsRenderDispatchDirect lines print as hash=. addr, fmt, extent and tile come straight from the T#; pitch is derived from width, format and tile mode, the same way the texture cache derives it. A texture read through a descriptor heap or a descriptor table prints heap or table instead of its fields, since the draw has no single T# for it. These lines come after the blocks your filter reads, so the filter still works: the texture lines of a draw are the ones between its ClipControl: block and the next draw.
Since both T#s of the 1080p-to-4K pass are right, the shrink has to come from the quad's positions, so the next thing to look at is the constants its vertex shader reads. Comparing the same quad at 1080p and at APS5_OUTPUT_RESOLUTION=3840x2160 should show which value goes from 3840x2160 to 1920x1080.
area: renderingWrong or missing pixels: render targets, depth, sampling, formatsbugSomething isn't workingmediumA few days of work; needs some knowledge of the codeneeds: gameNeeds a PS5 title you dumped yourself, to reproduce or to test
Activity
simnJS commentedon Nov 25, 2026
@Ryongen thanks, very clear report. We're checking right now whether this title shows the same quarter-size picture under Linux at 1920x1080 on our side, which tells us whether it's a Kyty translation issue or something specific to Windows or to the 01.002.001 build. We'll come back here with the result and the quickest way to dump the viewport, scissor and dispatch sizes of the passes that write the display buffer.
simnJS commentedon Nov 25, 2026
Thanks for the very clear report and for ruling out VideoOut and PSSR first.
We can't reproduce it, but our run doesn't take your code path. We ran current AnyKyty (
441382ef20, which includes #295 and #296)on Linux (RTX 4080 SUPER) with a 1920x1080 display and the output status forced to 1080p (
APS5_OUTPUT_RESOLUTION=1920x1080).From the logos to gameplay, every frame fills the window. But our copy of this title is the launch version, and with a 1080p
output it still registers 3840x2160 display buffers (
[mouse] … guest 3840x2160 presented at 1152x648); it has never registereda 1920x1080 buffer in any of our runs. Yours registers 1920x1080 buffers, so your newer version takes a 1080p display path that the
launch version doesn't have. Your version also calls into the PSSR library, which the launch version doesn't import at all, so the
update reworked the resolution and upscaling chain. Our guess is that the difference comes from the title version, not from Windows.
Quickest check: run once with
APS5_OUTPUT_RESOLUTION=3840x2160. It only changes whatsceVideoOutGetOutputStatusreports(2160p class instead of 1080p); the title still chooses its own buffer and render sizes. If the title then registers 3840x2160
buffers and the picture fills the window, the bug is confined to its 1080p output path, and you have a workaround in the meantime.
Reading viewports, scissors and dispatch sizes. AnyKyty has no frame capture (the RenderDoc hook from KytyPS5 isn't built into
AnyKyty, and we haven't tried injecting RenderDoc from outside), but the Kyty core can log every draw and every direct dispatch:
(PowerShell:
$env:KYTY_GRAPHICS_DEBUG_DUMP="1", and so on.)RenderTraget:block withbase.addrandattrib2.width/attrib2.height(size minus one), then a
ScreenViewport:block withvp[0].xscale,vp[0].xoffset,vp[0].yscale,vp[0].yoffset, theviewport scissor, the screen, window and generic scissors, and
window_offset_x/y. A viewport that covers the whole target hasxscale = xoffset = width / 2,yscale = -height / 2,yoffset = height / 2.GraphicsRenderDispatchDirect: frame=N … groups=XxYxZ … local=AxBxC …, followed by oneCS texture[i]: … usage=read-write … addr=0x… extent=WxHline per image it writes. Indirect dispatches are not logged.sceVideoOutRegisterBuffers2, so print the bufferaddresses in your temporary log and look for them.
into the three display buffers, up to the title screen). Let it run 10-20 s past the first frames, then stop the game.
For reference, at 3840x2160 every draw into our display buffers has
xscale=1920 xoffset=1920 yscale=-1080 yoffset=1080andscissors 0..3840 x 0..2160. For the last pass that writes your 1920x1080 display buffer, there are three possible outcomes:
xscale/yscalearound 480/-270, or a scissor that stops at about 960x540: the title itself asked for a half-size region.Then the next question is which value it computed that from.
xscale=960): the pass samples a texture that already holds the shrunk picture. Go back onepass to whatever wrote that texture (a render target or a
CS texturewithusage=read-write).groups×localcovering only about 960x540: its size comes from a half-resolution value.This filter (Python 3) prints, for every draw or direct dispatch that writes a given address, its size, viewport and scissors, or
its group counts:
python writers.py kyty.txt 0x<display buffer address> > writers.txtIf you can post the result of the 3840x2160 run, and
writers.txt(or the relevant part ofkyty.txt) for a couple of frames at1080p with the two buffer addresses, we'll take it from there.
Ryongen commentedon Nov 25, 2026
Thanks, that narrowed it a lot. Both runs on
441382ef20, Windows, RTX 2070 SUPER.APS5_OUTPUT_RESOLUTION=3840x2160: the title registers3840x2160buffers (guest 3840x2160 presented at 1109x624) and the picture fills the window, so the bug is confined to the 1080p path and that setting is a workaround. It then stops at the compute shader from #294 (0x95b4ea51e43c1825, pc0x5514).1080p with
KYTY_GRAPHICS_DEBUG_DUMP=1(80 MB, about 14,400 draws and 4,600 direct dispatches before the #294 stop). The display buffers are0x1055c20000and0x10564a0000(1920x1080, linear). Your filter gives only draws into them, all identical:So it's your case 2: a full-size pass that samples a texture that already holds the shrunk picture. No direct dispatch writes the display buffers.
Going back, every frame has the same chain of render targets (run-length per target, in order):
So with a 1080p output the title still renders into a 3840x2160 target, then goes back down to 1080p. A shrunk, complete picture with black around it would come out of this if the 1920x1080 to 3840x2160 draw reads its 1920x1080 source as if it were 3840x2160 (by pixel position, or with a T# that says 3840x2160 over the 1080p data). The picture would then sit 1:1 in the top-left quarter of the 4K target, with black elsewhere, and the full-texture downsample to
0xfbf61c0000would leave it at a quarter of the frame. The dump doesn't list the textures a draw reads (onlyCS texture[i]lines), so I can't confirm which T# that 4K draw uses. Is there a setting that logs the pixel shader's T#s per draw?Ryongen commentedon Nov 25, 2026
One step further, with a temporary log in
RenderExecutor::ResolveTexture(T# address, extent, pitch, tiling, per shader) at the default 1080p output:Both T#s describe their surfaces correctly, so it is not a T# that claims the wrong size. The 1080p to 4K pass is a plain textured quad:
So the UV comes straight from the vertex shader and the shrink has to be in the quad's geometry: the title draws the 1920x1080 picture as a 1920x1080-pixel rectangle inside a 3840x2160 target with a full viewport. In other words it lays the frame out for a 1080p screen but composes into a 4K target, which looks like two size answers that disagree (the 1080p class from
sceVideoOutGetOutputStatus, and something that still says 4K). I haven't dumped that quad's vertex shader or its constants yet; if you know which query this version uses for its composition target size, that is probably the one to check.simnJS commentedon Nov 25, 2026
@Ryongen excellent analysis, thanks. We're now going through every query that reports a screen or output size to the title, to find the one that still answers 4K when the output is 1080p, and we'll add the per-draw T# log you asked for (graphics stages, not only
CS texture[i]) to the same dump. Back here soon.simnJS commentedon Nov 25, 2026
Thanks, that narrows it a lot, and your
ResolveTexturelog already rules out a T# that lies about its size.Which size queries exist, and what they answer at 1080p. These are all the calls in
441382ef20that give a title a display size or a display capability. "At 1080p" means a 1080p desktop orAPS5_OUTPUT_RESOLUTION=1920x1080; both give the same answers.441382ef20sceVideoOutGetOutputStatus,sceVideoOutGetOutputStatusWithVrrutPrVdxio-8,gWT7X8H0bYsresolution1 (1080p class)sceVideoOutGetResolutionStatus6kPnj51T62YsceVideoOutIsOutputSupported,sceVideoOutConfigureOutputNv8c-Kb+DUM,w0hLuNarQxY0x8029001E, the answer a console gave on a 4K TV, whatever the displaysceVideoOutAllowOutputResolutionWqhdDetectionw7Ipp9Xl7hgsceVideoOutGetCurrentOutputMode_W0iQAbGaTBg0x80290018, nothing writtensceVideoOutGetDeviceInfoEx_,sceVideoOutConfigureOutputMode_k6JLQGuPEYA,N1bEoJ4SRw4sceSystemServiceGetDisplaySafeAreaInfo1n37q1Bvc5YsceAgcGetIsTrinityMode,sceKernelIsTrinityModeBfBDZGbti7A,tU5e3f9gSiUscePsmlMfsr2Inito+NM86gEwFEsceSystemServiceParamGetIntandsceAppContentAppParamGetInthave no display parameter, the AvControl monitor-info calls answer "not initialized" and write nothing, and the mouse virtual screen and IME panel sizes only echo what the title set.So only two answers can say 4K while the output status says 1080p:
sceVideoOutGetResolutionStatus, if the title registered or flipped a 3840x2160 buffer on that port before asking (for example a 4K buffer set registered at start-up). It also disagreed the other way: on a 4K display it said 1920x1080 until a buffer was registered, while the output status said 2160p.sceVideoOutIsOutputSupported/sceVideoOutConfigureOutputfor an output mode AnyPS5 doesn't know, which always gets the 4K TV's answer.Our copy is the launch version: of all these calls it imports only
sceVideoOutGetOutputStatus, and it registers 3840x2160 buffers whatever the class. So we can't see which one your version reads. You can check which ones it imports: NIDs are plain text in the decryptedeboot.bin, sofindstr /c:"6kPnj51T62Y#" eboot.binprints something only if that call is imported (repeat withNv8c-Kb+DUM#andw0hLuNarQxY#).Fix for the first one. AnyKyty
2133762e89makessceVideoOutGetResolutionStatusreport the output, as a console does: 1920x1080 when the output status says 1080p, 3840x2160 when it says 2160p, whatever buffers the title registers. It only changes your 1080p run if your version imports6kPnj51T62Yand had a 3840x2160 buffer on that port when it asked.Test for the second one, no rebuild needed. Run the 1080p case once more with
ANYPS5_VIDEO_OUT_MAX_WIDTH=1920andANYPS5_VIDEO_OUT_MAX_HEIGHT=1080. With both set below 4K, an output mode AnyPS5 doesn't know is answered as unsupported (0) instead of0x8029001E. If the picture then fills the window, your version chooses its composition size from an output-mode probe, and that answer is what we have to get right on a 1080p display.T#s per draw. AnyKyty
8bf7cc52cfadds them toKYTY_GRAPHICS_DEBUG_DUMP. After each draw'sRenderTraget:,ScreenViewport:andParameters:blocks, every texture that each stage of the draw binds gets one line:The prefix is
VS,LS,HS,DSorMSfor the stages before the pixel shader.hashis the stage'sshader_hash, the same field theGraphicsRenderDispatchDirectlines print ashash=.addr,fmt,extentandtilecome straight from the T#;pitchis derived from width, format and tile mode, the same way the texture cache derives it. A texture read through a descriptor heap or a descriptor table printsheaportableinstead of its fields, since the draw has no single T# for it. These lines come after the blocks your filter reads, so the filter still works: the texture lines of a draw are the ones between itsClipControl:block and the next draw.Since both T#s of the 1080p-to-4K pass are right, the shrink has to come from the quad's positions, so the next thing to look at is the constants its vertex shader reads. Comparing the same quad at 1080p and at
APS5_OUTPUT_RESOLUTION=3840x2160should show which value goes from 3840x2160 to 1920x1080.