Commit graph

9032 commits

Author SHA1 Message Date
Henrik Rydgård
265ae5d0e9 Make the two methods more compatible 2023-03-10 23:28:11 +01:00
Henrik Rydgård
6ece79c3fa Move PopulateLevel and PrepareData next to each other, for later merging 2023-03-10 21:06:33 +01:00
Henrik Rydgård
84c8fee1f2 Interleave calls to Populate / PrepareData 2023-03-10 20:41:43 +01:00
Henrik Rydgård
9b7a1a2ddc Move the "Populate" phase onto the thread 2023-03-10 20:31:37 +01:00
Henrik Rydgård
dad7777b6f Heap-allocate the desc 2023-03-10 20:13:10 +01:00
Henrik Rydgård
ed7947c94b Finish the move of Populate to ReplacedTexture 2023-03-10 17:50:16 +01:00
Henrik Rydgård
9e8e2e41fa Move most of Populate to ReplacedTexture, although not the cpp 2023-03-10 17:43:12 +01:00
Henrik Rydgård
96111537e2 Move PopulateLevel to the texture 2023-03-10 17:26:41 +01:00
Henrik Rydgård
36f78a46c1 Rename PREPARED->POPULATED 2023-03-10 17:21:23 +01:00
Henrik Rydgård
207e2259e7 Cleanup texture saving a bit 2023-03-10 15:39:45 +01:00
Henrik Rydgård
f459a8f71a Fix ini-less texture replacement 2023-03-10 14:58:44 +01:00
Henrik Rydgård
53791b1816 Restore functionality of the allowVideo flag, while preserving the early-out. 2023-03-10 14:18:42 +01:00
Henrik Rydgård
07fc551e4e State fixes, disable logspam 2023-03-10 14:16:14 +01:00
Henrik Rydgård
9f45271730 Tex replacer state machine instead of flags 2023-03-10 13:43:48 +01:00
Henrik Rydgård
06b83115a5 Replacer: Avoid tracking video textures 2023-03-10 12:20:55 +01:00
Henrik Rydgård
654f4bff40 Split out ReplacedTexture into its own file. 2023-03-09 21:19:20 +01:00
Henrik Rydgård
cb10862510 Move texture replacer to GPU/Common.
Add new files ReplacedTexture.cpp/h too.
2023-03-09 21:11:53 +01:00
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ård
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ård
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ård
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ård
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