Commit graph

255 commits

Author SHA1 Message Date
Fernando Sahmkow
d2643a61c3 Revert Buffer cache changes and setup additional macros. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
12a76465b9 MacroHLE: Reduce massive calculations on sizing estimation. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
7842543573 MacroHLE: Add HLE replacement for base vertex and base instance. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
209ce46a9f MacroHLE: Add Index Buffer size estimation. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
b4fcb0b2b2 MacroHLE: Refactor MacroHLE system. 2023-01-01 16:43:57 -05:00
Fernando Sahmkow
b5b0ec9429 MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect. 2023-01-01 16:43:57 -05:00
Fernando S
b9ebc10680 Merge pull request #9401 from vonchenplus/draw_manager
video_core: Implement maxwell3d draw manager and split draw logic
2022-12-08 12:41:39 +01:00
Feng Chen
ad05d9fe1e video_core: Implement maxwell3d draw manager and split draw logic 2022-12-08 10:12:19 +08:00
liamwhite
22c925b1b4 Merge pull request #9360 from Kelebek1/R-E-S-P-E-C-T
Respect render mode override
2022-12-05 22:17:22 -05:00
liamwhite
dc25fddedb Merge pull request #9353 from vonchenplus/draw_indexed
video_core: Fine tuning the index drawing judgment logic
2022-12-03 10:43:34 -05:00
Feng Chen
f7e82d2fd6 video_core: Fine tuning the index drawing judgment logic 2022-12-01 19:14:58 +08:00
Kelebek1
bb10e5e6eb Respect render mode override 2022-11-30 01:43:36 +00:00
Lioncash
0d9c723df4 engines: Remove unnecessary casts
In a few cases we have some casts that can be trivially removed.
2022-11-29 08:38:46 -05:00
liamwhite
0f9aee1f8a Merge pull request #9288 from vonchenplus/deferred_draw
video_core: Fine tune maxwell drawing trigger mechanism
2022-11-26 09:35:45 -05:00
Fernando Sahmkow
b3708b0a5b GPU: Fix buffer cache issue, engine upload not inlining memory in multiline and pessismistic invalidation. 2022-11-24 20:57:16 +01:00
FengChen
607a965c57 video_core: Optimize maxwell drawing trigger mechanism 2022-11-22 17:53:26 +08:00
Liam
e219606128 maxwell3d: full HLE for multi-layer clears 2022-11-17 08:31:43 -05:00
Kelebek1
a5b76126e1 Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation reg 2022-11-11 04:04:36 +00:00
FengChen
3e0cc4fd75 video_core: Fix drawing trigger mechanism regression 2022-10-31 21:57:38 +08:00
FengChen
2636c9f876 video_core: Fix drawing trigger mechanism regression 2022-10-27 13:26:52 +08:00
liamwhite
d8c264af1e Merge pull request #9112 from vonchenplus/deferred_draw
video_core: Reimplementing the maxwell drawing trigger mechanism
2022-10-25 09:42:59 -04:00
Fernando S
99cefb62fd Merge pull request #9095 from FernandoS27/meat-good-vegetable-bad
Maxwell3D/Puller: Fix regressions and syncing issues.
2022-10-22 13:06:03 +02:00
FengChen
f9f995c56a video_core: Implement maxwell inline_index method 2022-10-22 16:58:23 +08:00
FengChen
8eed4e7ee5 video_coare: Reimplementing the maxwell drawing trigger mechanism 2022-10-21 17:09:22 +08:00
Fernando Sahmkow
6118d0d042 Maxwell3D/Puller: Fix regressions and syncing issues. 2022-10-19 06:21:51 +02:00
Kelebek1
bc29a3a188 Fix stencil func registers, make clip control equivalent to how it was before, but surely wrong. 2022-10-10 20:59:57 +01:00
Kelebek1
37845e1228 Update 3D regs 2022-10-07 14:13:45 +01:00
Fernando Sahmkow
4124fa18e3 NVDRV: Further improvements. 2022-10-06 21:00:53 +02:00
bunnei
616e83dd94 DMA & InlineToMemory Engines Rework. 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
4c8b983c3a Maxwell3D: Add small_index_2 2022-10-06 21:00:53 +02:00
Fernando Sahmkow
42ef10060a VideoCore: Refactor fencing system. 2022-10-06 21:00:52 +02:00
Billy Laws
a1216cfeee Maxwell3D: Fix 3D semaphore counter type 0 handling
Counter type 0 actually releases the semaphore payload rather than a constant zero as was previously thought. This is required by Skyrim.
2022-06-02 21:46:38 +01:00
Liam
fa2047970e video_core/macro: clear code on upload address assignment 2022-05-10 17:07:21 -04:00
Morph
2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
Liam
3bffb0464b maxwell3d: add small_index_2 register 2022-04-14 09:57:06 -04:00
Fernando S
387c4c4dee Merge pull request #8023 from ameerj/kirby-pop-in
maxwell_3d: Implement a safer CB data upload
2022-03-16 12:14:08 +01:00
ameerj
fc50392101 maxwell_3d: Implement a safer CB data upload
This makes constant buffer uploads safer and more accurate by updating the GPU memory as soon as the CB Data method is invoked. The previous implementation was deferring the updates until a different maxwell 3d method was detected, then writing all CB data at once.
2022-03-14 19:18:36 -04:00
byte[]
2f745c6c00 Maxwell3D: restore original topology when topology overrides are disabled 2022-03-14 11:00:08 -04:00
Liam
6202688c91 Maxwell3D: Use override constants from nouveau
This fixes some incorrect rendering in Sunshine
2022-03-14 10:11:58 -04:00
Liam
db6b7f70b7 Maxwell3D: Restrict topology override effect to after the register is set 2022-03-11 19:42:12 -05:00
Liam
61e810ba10 Maxwell3D: mark index buffers as dirty after updating counts 2022-03-11 08:51:22 -05:00
Liam
de42319556 Maxwell3D: read small-index draw and primitive topology override registers
This allows Galaxy and Sunshine to render for the first time.
2022-03-10 19:21:04 -05:00
Fernando Sahmkow
19270ae4e6 Rasterizer: Implement Inline2Memory Acceleration. 2022-01-29 22:53:27 +01:00
Lioncash
65e617754f video_core/macro: Remove unused parameter from Execute()
Simplifies the function interface.
2022-01-25 13:41:38 -05:00
ReinUsesLisp
c0705f79b8 shader: Unify shader stage types 2021-07-22 21:51:39 -04:00
ReinUsesLisp
65069df8aa shader: Remove old shader management 2021-07-22 21:51:22 -04:00
ameerj
2a0dbf9b79 buffer_cache: Simplify uniform disabling logic 2021-06-01 13:26:58 -04:00
ReinUsesLisp
2dfce2fca6 video_core: Reimplement the buffer cache
Reimplement the buffer cache using cached bindings and page level
granularity for modification tracking. This also drops the usage of
shared pointers and virtual functions from the cache.

- Bindings are cached, allowing to skip work when the game changes few
  bits between draws.
- OpenGL Assembly shaders no longer copy when a region has been modified
  from the GPU to emulate constant buffers, instead GL_EXT_memory_object
  is used to alias sub-buffers within the same allocation.
- OpenGL Assembly shaders stream constant buffer data using
  glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In
  theory this should save one hash table resolve inside the driver
  compared to glBufferSubData.
- A new OpenGL stream buffer is implemented based on fences for drivers
  that are not Nvidia's proprietary, due to their low performance on
  partial glBufferSubData calls synchronized with 3D rendering (that
  some games use a lot).
- Most optimizations are shared between APIs now, allowing Vulkan to
  cache more bindings than before, skipping unnecesarry work.

This commit adds the necessary infrastructure to use Vulkan object from
OpenGL. Overall, it improves performance and fixes some bugs present on
the old cache. There are still some edge cases hit by some games that
harm performance on some vendors, this are planned to be fixed in later
commits.
2021-02-13 02:17:22 -03:00
ReinUsesLisp
70b3c29534 gpu: Report renderer errors with exceptions
Instead of using a two step initialization to report errors, initialize
the GPU renderer and rasterizer on the constructor and report errors
through std::runtime_error.
2021-02-13 02:16:19 -03:00
ReinUsesLisp
928831c1cc maxwell_3d: Silence array bounds warnings 2021-01-24 04:31:41 -03:00