-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D3D11 framebuffer readback #9321
Conversation
Also make debug interfaces more consistent.
D3D11_TEXTURE2D_DESC packDesc{}; | ||
packDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; | ||
packDesc.BindFlags = 0; | ||
packDesc.Width = 512; // 512x512 is the maximum size of a framebuffer on the PSP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true. This is the maximum size that can be textured from, but I think drawn can be wider. See #4739. Also some games (I believe Silent Hill?) draw to one big 1024 wide surface, but draw on the left and right sides - see curRTOffsetX.
I do think 512 may be the max height. I've never seen wider than 1024, so that may be the max width.
Also, I don't know about HD remasters. Presumably they draw double the width and height or something?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's right. Probably should just make this adaptive..
} | ||
|
||
// Nobody calls this yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a branch that used this, it improved some issues in Katamari or something, but I think it was slow and had accuracy problems with some GPUs. I was thinking of using it to detect accuracy problems with GPUs on startup, although it feels painful a bit.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. There are potential uses, some silly games like Burnout Dominator read the depth buffer using the CPU for lens flares, so it would be useful for that as well, though with a heavy speed hit (but we could double buffer it making lens flares one frame late).
D3D11: Implements support for framebuffer readback as used by a few games (like God Eater Burst), and screenshots, both normal ones and for save states.
Progress on #9317 .