Commit Graph

4783 Commits

Author SHA1 Message Date
c38c76abad Refactor to remove virtual from RenderXFBToScreen
Slightly simplifies the upcoming refactor
2023-01-31 18:29:47 +13:00
a01d5283ec TextureCache: Add content locking
Texture cache occasionally mutates textures for efficiency.
Which is awkward if we want to borrow those textures from texture cache
to do something else, such as a graphics debugger, or async presentation
on another thread.

Content locking provides a way to signal that the contents of a texture
cache entry should not change. Texture cache will be forced to use
alternative strategies.
2023-01-31 18:29:47 +13:00
606c18210d TextureCache: Refactor with smart pointers
The whole ownership model was getting a bit of a mess, with a some
of special cases to deal with. And I'm planning to make it even more
complex in the future.
So here is some upfront work to convert it over to reference counted
pointers.
2023-01-31 18:29:47 +13:00
c1fd4a2013 Move TCacheEntry out of TextureCacheBase
Allows for fowards declaration
2023-01-31 18:29:47 +13:00
600ad5f498 VideoCommon: Better logic op invert approximation 2023-01-30 14:04:37 -06:00
a2f4606d33 Merge pull request #11205 from TellowKrinkle/AutoPresent
VideoBackends:Metal: Default to presentDrawable when vsync is on
2023-01-30 09:01:18 +01:00
6d7303993c Merge pull request #11509 from Sam-Belliveau/improved-speed-counter
Tie Speed to CPU Speed and not VPS
2023-01-30 20:41:03 +13:00
1119a9ba32 VideoCommon: Don't create pipelines with no render targets
Some backends don't like it when you do that
2023-01-29 14:35:23 -06:00
ebf114aef5 Tie Speed to CPU Speed and not VPS 2023-01-29 13:33:48 -05:00
7bea39b39e VideoBackends: add a way to load data into a specific level AND layer, default to layer 0 2023-01-27 18:46:53 -06:00
0a343007cb PowerPC: Parametrize LR macro. 2023-01-27 15:22:43 +01:00
be8d0b76ca PowerPC: Remove PC macro. 2023-01-27 15:22:41 +01:00
9c9310bf44 Merge pull request #11208 from TellowKrinkle/CPUCull
Cull vertices on the CPU
2023-01-26 23:15:23 +01:00
a0e6d7c173 VideoCommon: Explicitly disable fp_contract for CPUCull 2023-01-25 02:21:56 -06:00
1be0149146 VideoCommon: Cull vertices on the CPU 2023-01-25 02:21:56 -06:00
b170ef9651 VideoCommon: Add class for quickly transforming and culling vertices on the CPU 2023-01-25 02:21:56 -06:00
8d5edb13a9 Merge pull request #11367 from Sam-Belliveau/lagbegone
VideoCommon: VI Skip
2023-01-19 01:20:01 +01:00
a7d1683149 Merge pull request #11432 from Pokechu22/generic-vertex-loader-test-error
VertexLoader: Fix loading tangent/binormal caches with NormalIndex3
2023-01-17 23:30:29 +01:00
23ad07b368 Add VISkip 2023-01-14 01:56:37 -05:00
3910bdd68b VertexLoader: Don't write position_cache if vertex is skipped
This is the behavior in the x64 and ARM64 vertex loaders. I don't know if it makes sense (the whole skipped vertex system seems jank, but several games behave incorrectly without it).
2023-01-13 15:38:00 -08:00
16c0593a52 VertexLoader: Fix loading tangent/binormal caches with NormalIndex3 2023-01-13 15:38:00 -08:00
2d53b73643 VertexLoaderTester: Add assertions for position/binormal/tangent caches 2023-01-13 15:38:00 -08:00
c681d96d46 VertexLoaderTester: Use asserts instead of logs
Logs don't show up in unit tests, and since this is debugging functionality (though not enabled for tests by default) it's better to do it this way.
2023-01-13 15:38:00 -08:00
bc1cc9eeb4 CoreTiming: Throttle Before Every Event Using Chrono 2023-01-06 17:21:17 -05:00
588a72a4fc PerformanceTracker: Add ownership of m_log_name. 2023-01-06 20:27:25 +01:00
bc46089ab0 PerformanceTracker: Use shared_mutex instead of mutex so multiple threads can read at the same time. 2023-01-06 20:27:25 +01:00
9143eb00fb PerformanceMetrics: Fix Line Width Issue on Non HiDPI Screens 2023-01-06 20:27:17 +01:00
Mai
cc14d60bbb Merge pull request #11402 from Pokechu22/too-many-indices
IndexGenerator: Fix off-by-one in GetRemainingIndices
2023-01-05 15:15:09 +00:00
cefcd9c93c IndexGenerator: Fix off-by-one in GetRemainingIndices
Fixes https://bugs.dolphin-emu.org/issues/13136.
2023-01-04 10:42:00 -08:00
6c58ba353c IndexGenerator: Add assertion for overflow in GetRemainingIndices
This assertion is currently triggered by Pocoyo Racing (https://bugs.dolphin-emu.org/issues/13136).
2023-01-04 10:41:14 -08:00
2fdaf0a86e HW/ProcessorInterface: Rename member variables to fit naming convention. 2023-01-04 03:17:26 +01:00
74e1577a2c HW/ProcessorInterface: Refactor to class, move to Core::System. 2023-01-04 03:00:10 +01:00
d91f340c86 VertexManagerBase: Move free space check to after the buffer is reset
Fixes incorrect logspam when the buffer needed to be reset on flushes (which we already were doing, but 52feed04db moved it to after the check was made). This is https://bugs.dolphin-emu.org/issues/10312.

I also converted it to an assert, as if this does happen, things are going to render incorrectly, so we want to make it obvious.
2023-01-03 17:06:51 -08:00
ed9915308b Merge pull request #11386 from Pokechu22/manual-texture-sampling-stereoscopic-layer-bounds-check
PixelShaderGen: Clamp texture layer when using manual texture sampling with stereoscopic 3D
2023-01-03 18:07:06 +01:00
cb0a603c72 VideoCommon: De-globalize GeometryShaderManager class. 2022-12-29 15:33:19 +01:00
7e55cc9e90 VideoCommon/VertexShaderManager: Rename private variables. 2022-12-28 16:00:15 +01:00
50625728e0 VideoCommon: De-globalize VertexShaderManager class. 2022-12-28 15:52:29 +01:00
f3df3a7727 PixelShaderGen: Clamp texture layer when using manual texture sampling with stereoscopic 3D
Otherwise, texelFetch() will use an out-of-bounds layer for game textures (that have 1 layer; EFB copies have 2 layers in stereoscopic 3D mode), which is undefined behavior (often resulting in a black image). The fast texture sampling path uses texture(), which always clamps (see https://www.khronos.org/opengl/wiki/Array_Texture#Access_in_shaders), so it was unaffected by this difference.
2022-12-27 13:45:13 -08:00
4549fb4acb VideoCommon/PixelShaderManager: Rename s_ variables. 2022-12-27 20:20:27 +01:00
725bd64ec2 VideoCommon: De-globalize PixelShaderManager class. 2022-12-27 20:13:24 +01:00
6052a5ca9b Fix Speed Counter Sample Size 2022-12-26 16:47:12 -05:00
e1d078ada6 Remove Redundant Access Specifiers 2022-12-23 20:13:01 -05:00
673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
05bebee802 Replace BitUtils with C++20: Counting Zeroes
With the upgrade to C++20, std::countl_zero and std::countr_zero can replace these home-spun implementations from the BitUtil.h library.
2022-12-21 04:17:00 -06:00
547d956278 Common: Use C++20 <bit> header in BitSet.h 2022-12-18 16:51:32 +01:00
c486baffe6 VideoCommon/PixelEngine: Pass Core::System to methods. 2022-12-11 21:57:30 +01:00
ec8aaf1f30 VideoCommon/PixelEngine: Refactor to class, move to Core::System. 2022-12-11 21:57:19 +01:00
ceae4242fc VideoCommon/Fifo: Pass Core::System to methods. 2022-12-10 17:16:26 +01:00
5624dd6d39 VideoCommon/Fifo: Refactor to class, move to Core::System. 2022-12-10 17:16:19 +01:00
8a3b8a925e Core: Add option to force linear texture filtering. 2022-12-09 02:02:16 +01:00