Commit Graph

427 Commits

Author SHA1 Message Date
Henrik Rydgård 91259aaad7 Always use array textures for framebuffers in Vulkan for simplicity. 2022-10-27 11:05:58 +02:00
Henrik Rydgård 0de12f5ca9 Some refactoring of framebuffer views, layer issues, more work. 2022-10-27 11:05:58 +02:00
Henrik Rydgård fb250c4b29 More multiview work 2022-10-27 11:05:58 +02:00
Henrik Rydgård cafce7365b Vulkan: Fix frame ordering issue with postprocessing shaders
Requested an init command buffer outside the frame, which is dangerous
and caused validation problems with command pool resets.

Would like to assert on insideFrame in GetInitCmd, but we use it from
some init code where it does work correctly. Might clean that up at some
point.
2022-10-21 12:52:21 +02:00
Henrik Rydgård 90d395a10d Remove "attachment" parameter from BindFramebufferAsTexture everywhere.
Not actually useful since our framebuffer objects don't support multiple
color images, and probably won't ever need to.
2022-10-20 10:15:19 +02:00
Henrik Rydgård daca0b2109 Rename gstate_c.Supports to gstate_c.Use 2022-10-17 08:46:37 +02:00
Henrik Rydgård 901f698a10 Merge pull request #16201 from unknownbrackets/gedebugger
GE Debugger: Normalize framebuffer texture preview
2022-10-11 11:33:19 +02:00
Henrik Rydgård 804220afb1 Merge pull request #16198 from unknownbrackets/gles-stencil
Readback stencil buffer for debugger on GLES
2022-10-11 10:55:38 +02:00
Henrik Rydgård baa9451cb7 Warning fixes 2022-10-11 09:55:53 +02:00
Unknown W. Brackets 999055791d D3D9: Remove block transfer code overrides.
We can just use Draw now.  Keep depth, though, since it applies scale.
2022-10-10 21:48:38 -07:00
Unknown W. Brackets fc68cd9457 GLES: Add debug readback of stencil data.
This allows the existing gpu.buffer.renderStencil to snapshot the state.
2022-10-10 17:09:14 -07:00
Unknown W. Brackets 59cc7a8000 GPU: Rename stencil write pipeline. 2022-10-10 16:54:29 -07:00
Henrik Rydgård d56bdcb81e Merge pull request #16196 from hrydgard/improved-render-stats
Improved stats in the Vulkan GPU profiler
2022-10-10 15:40:17 +02:00
Henrik Rydgård 32699da6df Vulkan (trivial): Fix numDraws stat when merging render passes. Shorten a name. 2022-10-10 10:06:30 +02:00
Unknown W. Brackets 1dc35b3ac4 GLES: Simplify, enable debug depth readback. 2022-10-10 01:04:57 -07:00
Unknown W. Brackets f8908c691b GLES: Use Draw for depth readback shader.
Was not working before, since the program was not being used by Draw2D.
2022-10-10 00:54:29 -07:00
Unknown W. Brackets bad4a93d3c D3D11: Correct depth readback. 2022-10-09 15:50:50 -07:00
Unknown W. Brackets 55d5dc3834 GPU: Rename readback and buffer write operations.
Avoid download/upload and pack, which don't have clear directions.
2022-10-09 13:49:41 -07:00
Unknown W. Brackets d83f736b1f D3D9: Correct depth readback. 2022-10-09 13:21:04 -07:00
Henrik Rydgård 28bc45451c Merge pull request #16184 from unknownbrackets/depth-download
GPU: Hook Gods Eater Burst avatar read
2022-10-09 16:37:42 +02:00
Unknown W. Brackets ad3220f857 GLES: Hook up depth download.
Currently, only used by one hook.
2022-10-09 01:08:04 -07:00
Unknown W. Brackets d0eb14ec02 GPU: Correct sizing account on block transfer. 2022-10-09 00:54:59 -07:00
Unknown W. Brackets e7e7528fbc GPU: Consider depth buffers in block transfer.
Right now, only with an explicit flag (not yet used.)
2022-10-09 00:50:45 -07:00
Unknown W. Brackets b2ce4d2c3f GPU: Refuse to set fb_address == z_address.
We don't do it when creating framebufs either, so don't update to
matching values.
2022-10-08 17:50:18 -07:00
Henrik Rydgård 362391b9d8 Fix Kurohyou again. See #9576 2022-10-04 20:56:41 +02:00
Henrik Rydgård b333695cd1 Merge pull request #16160 from unknownbrackets/vram-mirrors
GPU: Use flags to fix triggered upload/download
2022-10-04 08:45:06 +02:00
Unknown W. Brackets 9ac4523fd2 GPU: Skip matching a framebuf for RAM. 2022-10-03 20:22:27 -07:00
Unknown W. Brackets a1efed31b9 GPU: Use flags to fix triggered upload/download.
No longer using mirror hacks.
2022-10-03 20:17:25 -07:00
Henrik Rydgård 973d0435c1 Fix another crash with non-buffered rendering 2022-10-03 19:02:16 +02:00
Henrik Rydgård ed3cd1dc26 Merge pull request #16150 from unknownbrackets/vram-mirrors
GPU: Mask away unused bits in framebuf/zbuf ptr, cleanup
2022-10-03 11:56:24 +02:00
Herman Semenov 29b87e0c0b Merge branch 'master' into master 2022-10-03 07:49:13 +00:00
Unknown W. Brackets 58a4376998 GPU: Normalize framebuf addresses.
In VRAM, always store without mirror.  In RAM, always store without
cache/kernel bits.
2022-10-02 21:28:53 -07:00
Henrik Rydgård ab08db6fca Tighten up some color format checks with displays and copies
Now that we allow multiple color format buffers to overlap, and don't
just take one and change its format during copy for example, we could
use some additional checking.

Additionally, do a simple heuristic to reject "obviously" wrong copies
copies to framebuffers.

Fixes #15959, should also help #16124
2022-10-02 00:10:19 +02:00
Henrik Rydgård 9ec41436d1 ES2 crash fix: Don't draw depth if lacking fragment shader depth write. 2022-10-01 19:28:52 +02:00
lainon c953bf7fc7 Fixed bug and memleaks 2022-09-30 12:32:49 +03:00
Henrik Rydgård bd759790b0 Update the Vulkan debug names when reassigning depth buffers. 2022-09-28 14:09:40 +02:00
Henrik Rydgård de51d067f2 If a framebuffer starts using a different depth buffer than before, re-point.
Fixes depth artifacts in Silent Hill: Origins. See issue #16126
2022-09-28 13:41:41 +02:00
Henrik Rydgård ca5c69d3dd Vulkan: Better debug names for RENDER passes. 2022-09-27 23:41:09 +02:00
Henrik Rydgård 1c0d66aef7 Add compatibility flag for loading pixels on framebuffer create using nearest filtering
Solves the last problem with the speedometers - so we can finally say: Fixes #8509

Render-to-CLUT for speedometers renders on top of an image that just comes from the
underlying memory, so it's been drawn to the framebuffer with DrawPixels. That adds
filtering so at higher resolutions, there's some blurring of the CLUT, causing
artifacts.  We can solve this two ways: either we force on lower-resolution-for-effects
for Ridge Racer games, or we use nearest filtering when doing DrawPixels of the
memory under a framebuffer. For best result, we do the latter.

(The speedometers look even better with nearest filtering, but that's a more
general issue of UI looking better that way).
2022-09-26 20:47:55 +02:00
Unknown W. Brackets 93c909a88e GPU: Upload depth only on first usage.
Fixes various glitches in Kingdom Hearts, etc.
2022-09-23 00:04:14 -07:00
Henrik Rydgård a6d6e0a3cc Texture/Framebuffer match: Ignore stride if texHeight == 1. Fixes Ridge Racer lens flares. 2022-09-22 22:11:16 +02:00
Henrik Rydgård c108db0e71 Merge pull request #16081 from hrydgard/zbuffer-upload-heuristic
Fix green flashes with Burnout Dominator lens flare
2022-09-22 11:02:27 +02:00
Henrik Rydgård a31c5c8239 Cleanup logic 2022-09-22 10:48:45 +02:00
Henrik Rydgård bd196f7a50 Preserve depth buffer on framebuffer resize, if has been used. 2022-09-22 09:59:49 +02:00
Henrik Rydgård 188ab67d6a More lenient heuristic for uploading depth buffers. Still behind compat flag. See #11100 2022-09-22 09:29:33 +02:00
Henrik Rydgård 287e025978 Minor cleanups around dirtying of render state 2022-09-22 09:12:58 +02:00
Henrik Rydgård 94ae0fabfa CLUTs can be loaded from small rectangular textures. Need to linearize.
Fixes #8406, although technically, we should wrap by bufw, not the
texture width.
2022-09-21 18:33:15 +02:00
Unknown W. Brackets bf86f00df8 GPU: Correct display framebuffer reading.
The displayFramebuf_ might not be set yet, but that doesn't mean we want
an INVALID format and zero stride.  We might also be rendering to a
different target, but still want the display.
2022-09-20 14:01:36 -07:00
Henrik Rydgård 662126a0a1 Small simplification 2022-09-15 16:57:03 +02:00
Henrik Rydgård 36c98ab367 Address feedback, change roles of the two dynamic clut fbos to eliminate the need for state (see next commit) 2022-09-15 09:15:02 +02:00