Commit Graph

837 Commits

Author SHA1 Message Date
Liam
084d7d6b01 common: Change semantics of UNREACHABLE to unconditionally crash 2022-06-13 20:09:00 -04:00
Billy Laws
ea89cf8639 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
Morph
dca63391b6
Merge pull request #8313 from liamwhite/dma-bpp
maxwell_dma: fix bytes_per_pixel
2022-05-11 17:51:02 -04:00
Liam
e7ba9fd7e1 maxwell_dma: use fallback if remapping is enabled 2022-05-10 19:26:48 -04:00
Liam
e158951695 video_core/macro: clear code on upload address assignment 2022-05-10 17:07:21 -04:00
Liam
4f1a2c2562 maxwell_dma: fix bytes per pixel 2022-05-06 18:18:00 -04:00
Morph
99ceb03a1c 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
a24e7ba61b maxwell3d: add small_index_2 register 2022-04-14 09:57:06 -04:00
ameerj
1bc7d61b57 video_core: Reduce unused includes 2022-03-19 15:01:31 -04:00
Fernando S
c3c351e2c2
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
5119a57614 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[]
be0e6a2bb4 Maxwell3D: Link to override constant definition in nouveau 2022-03-14 11:06:25 -04:00
byte[]
364c67e49b Maxwell3D: restore original topology when topology overrides are disabled 2022-03-14 11:00:08 -04:00
Liam
37aa472269 Maxwell3D: Use override constants from nouveau
This fixes some incorrect rendering in Sunshine
2022-03-14 10:11:58 -04:00
Liam
56c646d82c Maxwell3D: Restrict topology override effect to after the register is set 2022-03-11 19:42:12 -05:00
Liam
70e632f153 Maxwell3D: mark index buffers as dirty after updating counts 2022-03-11 08:51:22 -05:00
Liam
f1521183f8 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
Lody
4498908e72 MaxwellDMA: Implement semaphore operations 2022-03-07 13:46:18 +08:00
Fernando Sahmkow
8a6e6465a7 Rasterizer: Refactor inlineToMemory. 2022-02-01 01:47:28 +01:00
Fernando Sahmkow
4258d515e6 Rasterizer: Implement Inline2Memory Acceleration. 2022-01-29 22:53:27 +01:00
Fernando Sahmkow
f54280dafd Inline2Memory: Flush before writting buffer. 2022-01-29 17:42:28 +01:00
Lioncash
a05d9405b9 video_core/macro: Remove unused parameter from Execute()
Simplifies the function interface.
2022-01-25 13:41:38 -05:00
ameerj
5daf3abe65 common/logging: Move Log::Entry declaration to a separate header
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-10-01 20:48:49 -04:00
ameerj
24049591f6 maxwell_dma: Minor refactoring 2021-09-19 20:36:41 -04:00
Feng Chen
0292374807 Fix blend equation enum error 2021-09-07 10:12:09 +08:00
Lioncash
f8964dd89a video_core/engine: Consistently initialize rasterizer pointers
Ensures all of the engines have consistent and deterministic
initialization of the rasterizer pointers.
2021-07-27 07:30:57 -04:00
ReinUsesLisp
fba6bd92d4 vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_state
Workaround potential bug on Nvidia's driver where only updating high
attributes leaves low attributes out dated.
2021-07-22 21:51:39 -04:00
ReinUsesLisp
7dafa96ab5 shader: Rework varyings and implement passthrough geometry shaders
Put all varyings into a single std::bitset with helpers to access it.

Implement passthrough geometry shaders using host's.
2021-07-22 21:51:39 -04:00
ReinUsesLisp
4f052a1f39 vk_graphics_pipeline: Implement conservative rendering 2021-07-22 21:51:39 -04:00
ReinUsesLisp
395bed3a0a shader: Unify shader stage types 2021-07-22 21:51:39 -04:00
ReinUsesLisp
d554778311 vulkan: Use VK_EXT_provoking_vertex when available 2021-07-22 21:51:35 -04:00
FernandoS27
c736b9ffab DMA: Restrict optimised path for BlockToLinear further. 2021-07-22 21:51:34 -04:00
ReinUsesLisp
85cce78583 shader: Primitive Vulkan integration 2021-07-22 21:51:22 -04:00
ReinUsesLisp
c67d64365a shader: Remove old shader management 2021-07-22 21:51:22 -04:00
Fernando Sahmkow
1ae4b684ff Buffer cache: Fixes, Clang and Feedback. 2021-07-15 02:02:08 +02:00
Fernando Sahmkow
495b8e31b5 DMAEngine: Revert flushing from Pitch to BlpockLinear. 2021-07-14 16:44:53 +02:00
Fernando Sahmkow
b780d5b5c5 DMAEngine: Accelerate BufferClear 2021-07-13 03:49:47 +02:00
Fernando Sahmkow
be1a3f7a0f accelerateDMA: Accelerate Buffer Copies. 2021-07-11 01:33:17 +02:00
Feng Chen
c7ad195fd3
Out of bound blit (#6531)
* Fix out of bound blit error

* Fix code read

* Fix ci error

Co-authored-by: Feng Chen <chen.feng@gloritysolutions.com>
2021-07-08 11:06:09 -07:00
Lioncash
be6844c1ed maxwell3d: Add missing return in default SizeInBytes() case
We were returning '1' in ComponentCount()'s default case but were
neglecting to do the same with SizeInBytes().
2021-06-23 11:50:40 -04:00
ameerj
859ba21f6d buffer_cache: Simplify uniform disabling logic 2021-06-01 13:26:58 -04:00
bunnei
de5bf640b7
Merge pull request #6196 from bunnei/asserts-setting
core: settings: Add setting for debug assertions and disable by default.
2021-04-14 17:47:18 -07:00
bunnei
a4c6712a4b common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
Lioncash
31932904c5 engine_interface: Add missing virtual destructor
Eliminates a potential bug vector related to inheritance. Plus, we
should generally be specifying the destructor as virtual within purely
virtual interfaces to begin with.
2021-04-12 09:53:55 -04:00
ReinUsesLisp
82c2601555 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
75ccd9959c 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
80a673a27f maxwell_3d: Silence array bounds warnings 2021-01-24 04:31:41 -03:00
ReinUsesLisp
3ff978aa4f common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
2021-01-15 16:27:28 -03:00
ReinUsesLisp
9764c13d6d video_core: Rewrite the texture cache
The current texture cache has several points that hurt maintainability
and performance. It's easy to break unrelated parts of the cache
when doing minor changes. The cache can easily forget valuable
information about the cached textures by CPU writes or simply by its
normal usage.The current texture cache has several points that hurt
maintainability and performance. It's easy to break unrelated parts
of the cache when doing minor changes. The cache can easily forget
valuable information about the cached textures by CPU writes or simply
by its normal usage.

This commit aims to address those issues.
2020-12-30 03:38:50 -03:00
bunnei
37bec068c2
Merge pull request #5157 from lioncash/array-dirty
maxwell_3d: Remove unused dirty_pointer array
2020-12-15 00:35:47 -08:00