GE Debugger: Normalize framebuffer texture preview #16201
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's long been confusing that the texture preview shows framebuffers at their actual size, even though the area it textures from is different (especially confusing if it's using an offset.) This also screwed up the texture preview source coordinates, since they were [0, 1] based on the correct size.
To fix this:
Since I was messing around with this, I also cleaned up the calls and made it use GL 3.3+ where available, mainly so RenderDoc will stop giving up on life if I open the GE debugger while it's attached.
It's nice to remove a bunch of lines of code every once and again. This no longer caches offscreen surfaces, which I'm no longer convinced was ever a good idea - I quickly searched and saw ANGLE, etc. don't do that. I think we (I?) just assumed because we were caching framebufs, caching offscreen surfaces was a good idea.
Because this normalizes a bunch of D3D9 code, it may fix some D3D9 bugs but I'm not specifically aware of any. Hopefully it doesn't create any either...
-[Unknown]