Commit Graph
9567 Commits
Author SHA1 Message Date
Henrik Rydgård ecf1134494 GL crashfix 2023-03-09 19:12:47 +01:00
Henrik Rydgård b253225815 Fix another replacer lifecycle issue, causing unnecessary texture invalidation. 2023-03-09 15:03:17 +01:00
Henrik Rydgård 44c4e63753 Simplifies and speeds up D3D11 texture uploads. Also, fixes a bug with replacement off 2023-03-09 14:43:59 +01:00
Henrik Rydgård 092bbf5eaa Fix saving of textures 2023-03-09 10:51:15 +01:00
Henrik Rydgård bda09be109 Texture color format doesn't belong as a per-level property, that's not supported.
All levels of a texture must have the same format.
2023-03-09 00:10:46 +01:00
Henrik Rydgård 4ba2001479 Replacer: Make the cache data model texture-centric instead of level-centric 2023-03-09 00:10:46 +01:00
Henrik Rydgård 226197f30f Replace "none_" with nullptr. 2023-03-08 13:17:10 +01:00
Henrik Rydgård 3d5526a175 Allow specifying the VFS when loading INI files.
Will be useful in the tex replacer.
2023-03-07 10:04:10 +01:00
Henrik Rydgård 3b39e9e068 Turn the VFS into a class, to be able to reuse it for other purposes. 2023-03-06 16:42:47 +01:00
Henrik RydgårdandGitHub ebd8a63914 Merge pull request #17032 from hrydgard/cache-framebuffer-copy
Cache framebuffer copies (for self-texturing) until the next TexFlush GPU instruction
2023-03-06 09:03:39 +01:00
Henrik RydgårdandGitHub 74f9b55669 Merge pull request #17055 from unknownbrackets/depth-zero-scale
GPU: Correct depth clip/cull for zero scale
2023-03-05 22:54:24 +01:00
Unknown W. Brackets 9fcc1509e4 GPU: Correct depth clip/cull for zero scale. 2023-03-05 08:51:45 -08:00
Henrik Rydgård cc9c01b1d0 Vulkan texture uploads: Take optimalBufferCopyRowPitchAlignment into account
Might marginally increase texture upload performance on some GPUs, but
mainly just the right thing to do.

For example, on Intel, this is 64.
2023-03-05 17:32:41 +01:00
Unknown W. Brackets 92a18eed01 GPU: Discard framebuffer copy when clearing.
This avoids retaining the framebuffer copy any longer than the current
framebuffer target.
2023-03-01 22:11:20 -08:00
Henrik Rydgård 4d0fbdb96f Add a safety check - don't cache partial copies. 2023-03-01 22:51:23 +01:00
Henrik Rydgård 7a7117f2f7 Cache framebuffer copies (for self-texturing) until the next TexFlush instruction.
Fixes #17030 , or at least improves on it - for optimal performance that
big framebuffer used for bloom should be split like in Killzone, but it's not trivial.

The regression in 1.14 is fixed with this, at least.

I tried it with a few other games with no issues - it seems games are
using TexFlush when needed. But let's see if it really is safe to rely
on that...

There might also be other places we should call DiscardFramebufferCopy
in.
2023-03-01 22:42:22 +01:00
Henrik Rydgård c6352a262d Fix crash in SoftGPU when frameskipping, noticed by sum2012 in Daxter
Fixes #17021
2023-02-28 23:21:36 +01:00
Unknown W. Brackets 9c21184352 vertexjit: Simplify CPU core check.
This also avoids allocating the memory we won't use if it's off.
2023-02-28 07:03:12 -08:00
Henrik Rydgård 970f7993df Android: Make font rendering work even absent support for R4G4B4A4 textures.
This shouldn't normally happen as conforming drivers are required to
support that texture format, but the software driver that we
accidentally choose on Poco C40 (see issue #16391) doesn't.

That we choose that driver will be fixed separately. This fix on its own
at least lets the user comfortably navigate to settings and switch to
OpenGL.
2023-02-28 00:01:29 +01:00
Henrik RydgårdandGitHub bdc271385b Merge pull request #17011 from hrydgard/vulkan-memory-visualizer
Resurrect the Vulkan memory visualizer, but now it's global stats and pushbuffer stats.
2023-02-27 09:46:41 +01:00
Henrik RydgårdandGitHub 86c1d5711a Merge pull request #17017 from unknownbrackets/d3d11-equal-clear
D3D11: Correct equal clear check
2023-02-27 09:18:11 +01:00
Unknown W. Brackets 15f087b71a D3D11: Correct equal clear check. 2023-02-26 23:59:48 -08:00
Henrik Rydgård ef4f17e998 Resurrect the Vulkan memory visualizer, but now it's global stats and pushbuffer stats. 2023-02-27 01:11:11 +01:00
Unknown W. Brackets 9e46a30c13 GPU: Correct some missing override specifiers. 2023-02-26 15:58:58 -08:00
Henrik Rydgård b3ce31c61e Address feedback 2023-02-26 19:54:30 +01:00
Henrik Rydgård 72bed6f2b5 Some DeviceLost/DeviceRestore cleanup 2023-02-26 11:05:52 +01:00
Henrik Rydgård 231f4efbbb Move some more stuff to GPUCommonHW 2023-02-26 10:33:11 +01:00
Henrik Rydgård 3dc47c7fef Unify TextureCache ::StartFrame as much as possible.
Tiny optimization avoiding a Vulkan pool reset on most frames.
2023-02-25 23:20:41 +01:00
Henrik Rydgård 4c45f8a4b0 Pass in draw directly in GPUCommon::DeviceRestore, instead of awkwardly fetching it 2023-02-25 23:04:27 +01:00
Henrik Rydgård af2fd7b038 Move Vulkan clear detection logic into DrawEngine like the other backends. 2023-02-25 19:23:07 +01:00
Henrik Rydgård 526ba74d05 Move the shaderManager_ to GPUCommonHW 2023-02-25 19:23:07 +01:00
Henrik Rydgård c3ceb9bf70 Move assorted debug functions and similar to GPUCommonHW 2023-02-25 19:23:07 +01:00
Henrik Rydgård 807d40e095 Move the matrix loading exec functions too 2023-02-25 19:23:07 +01:00
Henrik Rydgård 8520e1dec5 Move SetDisplayFramebuffer to GPUCommonHW 2023-02-25 19:23:07 +01:00
Henrik Rydgård 71ed265c57 Move sawExactEqualDepth to GPUCommonHW 2023-02-25 19:23:07 +01:00
Henrik Rydgård bcd38bc9e8 Move some more commands to GPUCommonHW. Get rid of ugly cast. 2023-02-25 19:23:07 +01:00
Henrik Rydgård d22a22569a Move the drawing commands to GPUCommonHW 2023-02-25 19:23:07 +01:00
Henrik Rydgård 8fb75e0c12 Unify most of the DebugGetShader* functions 2023-02-25 16:42:09 +01:00
Henrik Rydgård 92ee6e6a75 Remove more redundant functions 2023-02-25 16:33:09 +01:00
Henrik Rydgård c2c479b217 Remove function InitClear. Was only implemented for DX9, and only barely meaningful in non-buffered. 2023-02-25 16:32:50 +01:00
Henrik Rydgård 7bcc21b0e3 Move msaaLevel_ to GPUCommonHW 2023-02-25 16:27:00 +01:00
Henrik Rydgård 8b54a14bf2 Move the big command table to where it belongs, GPUCommonHW 2023-02-25 16:20:34 +01:00
Henrik Rydgård 9d6c3c329e Move CheckGPUFeatures() to GPUCommonHW 2023-02-25 16:13:54 +01:00
Henrik Rydgård 8ba665e258 More unification work 2023-02-25 16:12:24 +01:00
Henrik Rydgård c74f5b2189 Prepare for unifying more stuff 2023-02-25 16:01:32 +01:00
Henrik Rydgård e136ad795a Some slight unification 2023-02-25 15:15:34 +01:00
Henrik Rydgård b6846646af Remove some uses of gfxCtx_ 2023-02-25 15:15:34 +01:00
Henrik Rydgård 9e8f1d3cb3 Make the DoState stuff less ugly 2023-02-25 14:42:15 +01:00
Henrik Rydgård 285ffbaa52 Unify CopyDisplayToOutput 2023-02-25 14:42:15 +01:00
Henrik Rydgård 18999c3687 Create the GPUCommonHW class. 2023-02-25 14:42:10 +01:00