Commit Graph

101 Commits (c2fee0e5195bcde6c7c603788145496f520f1316)

Author SHA1 Message Date
ReinUsesLisp ddcb711ee8 maxwell_3d: Reduce severity of ProcessSyncPoint 6 years ago
bunnei 864280fabc
Merge pull request #2317 from FernandoS27/sync
Implement SyncPoint Register in the GPU.
6 years ago
Fernando Sahmkow fc91e21206 Implement SyncPoint Register in the GPU. 6 years ago
Lioncash 22f02076c6 video_core/engines: Make memory manager members private
These aren't used externally by anything, so they can be made private
data members.
6 years ago
Lioncash 26223f8124 video_core/engines: Remove unnecessary inclusions where applicable
Replaces header inclusions with forward declarations where applicable
and also removes unused headers within the cpp file. This reduces a few
more dependencies on core/memory.h
6 years ago
bunnei 22d3dfbcd4 gpu: Rewrite virtual memory manager using PageTable. 6 years ago
bunnei 574e89d924 video_core: Refactor to use MemoryManager interface for all memory access.
# Conflicts:
#	src/video_core/engines/kepler_memory.cpp
#	src/video_core/engines/maxwell_3d.cpp
#	src/video_core/morton.cpp
#	src/video_core/morton.h
#	src/video_core/renderer_opengl/gl_global_cache.cpp
#	src/video_core/renderer_opengl/gl_global_cache.h
#	src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
6 years ago
bunnei 2eaf6c41a4 gpu: Use host address for caching instead of guest address. 6 years ago
ReinUsesLisp 5219edd715 maxwell_3d: Use std::bitset to manage dirty flags 6 years ago
Lioncash a8fa5019b5 video_core: Remove usages of System::GetInstance() within the engines
Avoids the use of the global accessor in favor of explicitly making the
system a dependency within the interface.
6 years ago
Lioncash bd983414f6 core_timing: Convert core timing into a class
Gets rid of the largest set of mutable global state within the core.
This also paves a way for eliminating usages of GetInstance() on the
System class as a follow-up.

Note that no behavioral changes have been made, and this simply extracts
the functionality into a class. This also has the benefit of making
dependencies on the core timing functionality explicit within the
relevant interfaces.
6 years ago
Lioncash 48d9d66dc5 core_timing: Rename CoreTiming namespace to Core::Timing
Places all of the timing-related functionality under the existing Core
namespace to keep things consistent, rather than having the timing
utilities sitting in its own completely separate namespace.
6 years ago
ReinUsesLisp 2bdbb90af7 video_core: Assert on invalid GPU to CPU address queries 6 years ago
ReinUsesLisp 04e68e9738 maxwell_3d: Allow sampler handles with TSC id zero 6 years ago
ReinUsesLisp 390721a561 maxwell_3d: Allow texture handles with TIC id zero
Also remove "enabled" field from Tegra::Texture::FullTextureInfo because
it would become unused.
6 years ago
ReinUsesLisp 9a82dec74a maxwell_3d: Set rt_separate_frag_data to 1 by default
Commercial games assume that this value is 1 but they never set it. On
the other hand nouveau manually sets this register. On
ConfigureFramebuffers we were asserting for what we are actually
implementing (according to envytools).
6 years ago
ReinUsesLisp b683e41fca gl_rasterizer_cache: Use dirty flags for the depth buffer 6 years ago
ReinUsesLisp 179ee963db gl_rasterizer_cache: Use dirty flags for color buffers 6 years ago
ReinUsesLisp 0ab17ab406 gl_shader_cache: Use dirty flags for shaders 6 years ago
bunnei abea6fa90c gpu: Rewrite GPU command list processing with DmaPusher class.
- More accurate impl., fixes Undertale (among other games).
6 years ago
bunnei 67a154e23d
Merge pull request #1723 from degasus/dirty_flags
gl_rasterizer: Skip VB upload if the state is clean.
6 years ago
bunnei 1a543723ab maxwell_3d: Initialize rasterizer color mask registers as enabled.
- Fixes rendering regression with Sonic Mania.
6 years ago
Rodolfo Bogado 6a2aa6dbdb set default value for point size register 6 years ago
Rodolfo Bogado 1881e86c43 fix viewport and scissor behavior 6 years ago
Markus Wick 97f5c4ffd3 gl_rasterizer: Skip VB upload if the state is clean. 6 years ago
Frederic L ab362aa7e5
gl_rasterizer: Minor cleanup
Minor code cleanup from unaddressed feedback in #1654
6 years ago
Rodolfo Bogado 4a6eff3b7b Try to fix problems with stencil test in some games, relax translation to opengl enums to avoid crashing and only generate logs of the errors. 6 years ago
bunnei 8ea6261547
Merge pull request #1654 from degasus/dirty_flags
gl_rasterizer: Skip VAO binding if the state is clean.
6 years ago
Markus Wick 359db6a673 gl_rasterizer: Skip VAO binding if the state is clean. 6 years ago
Rodolfo Bogado 145ae36963 Implement multi-target viewports and blending 6 years ago
bunnei de0ab806df maxwell_3d: Restructure macro upload to use a single macro code memory.
- Fixes an issue where macros could be skipped.
- Fixes rendering of distant objects in Super Mario Odyssey.
7 years ago
Frederic L 7a5eda5914 global: Use std::optional instead of boost::optional (#1578)
* get rid of boost::optional

* Remove optional references

* Use std::reference_wrapper for optional references

* Fix clang format

* Fix clang format part 2

* Adressed feedback

* Fix clang format and MacOS build
7 years ago
bunnei 949d9a7136 maxwell_3d: Add code for initializing register defaults. 7 years ago
Lioncash a97cdb5eb4
maxwell_3d: Remove unused variable within ProcessQueryGet() 7 years ago
Lioncash c1e5525fc6 engines/maxwell_*: Use nested namespace specifiers where applicable
These three source files are the only ones within the engines directory
that don't use nested namespaces. We may as well change these over to
keep things consistent.
7 years ago
fearlessTobi 63c2e32e20 Port #4182 from Citra: "Prefix all size_t with std::" 7 years ago
Markus Wick c560043581 rasterizer: Drop unused handler.
This virtual function is called in a very hot spot, and it does nothing.

If this kind of feature is required, please be more specific and add callbacks
in the switch statement within Maxwell3D::WriteReg. There is no point in having
another switch statement within the rasterizer.
7 years ago
bunnei fdd5c97a14 maxwell_3d: Remove assert that no longer applies. 7 years ago
Zach Hilman f32e28c7b8 maxwell_3d: Use CoreTiming for query timestamp 7 years ago
Lioncash 4a587b81b2 core/core: Replace includes with forward declarations where applicable
The follow-up to e2457418da, which
replaces most of the includes in the core header with forward declarations.

This makes it so that if any of the headers the core header was
previously including change, then no one will need to rebuild the bulk
of the core, due to core.h being quite a prevalent inclusion.

This should make turnaround for changes much faster for developers.
7 years ago
Lioncash 20800f2df7 maxwell3d: Move FinishedPrimitiveBatch event after AcceleratedDrawBatch()
The start and finish events should likely not be right after one another
like this, otherwise the batch will appear to complete immediately
7 years ago
Subv c5284efd4f Rasterizer: Implemented instanced rendering.
We keep track of the current instance and update an uniform in the shaders to let them know which instance they are.

Instanced vertex arrays are not yet implemented.
7 years ago
bunnei efe6b473c5 maxwell_3d: Ignore macros that have not been uploaded yet.
- Used by Super Mario Odyssey (in game).
7 years ago
bunnei 57982df105 maxwell_3d: Use correct const buffer size and check bounds.
- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
7 years ago
bunnei 904d7eaa94 maxwell_3d: Remove outdated assert. 7 years ago
Lioncash 6030c5ce41 video_core: Eliminate the g_renderer global variable
We move the initialization of the renderer to the core class, while
keeping the creation of it and any other specifics in video_core. This
way we can ensure that the renderer is initialized and doesn't give
unfettered access to the renderer. This also makes dependencies on types
more explicit.

For example, the GPU class doesn't need to depend on the
existence of a renderer, it only needs to care about whether or not it
has a rasterizer, but since it was accessing the global variable, it was
also making the renderer a part of its dependency chain. By adjusting
the interface, we can get rid of this dependency.
7 years ago
Subv 8f2c4191ab GPU: Remove the assert that required the CODE_ADDRESS to be 0.
Games usually just leave it at 0 but nouveau sets it to something else. This already works fine, the assert is useless.
7 years ago
Lioncash 8b08f82dc7 maxwell_3d: Remove unused variable within GetStageTextures() 7 years ago
bunnei 8aeff9cf8e gl_rasterizer: Fix check for if a shader stage is enabled. 7 years ago
bunnei c996787d84
Merge pull request #609 from Subv/clear_buffers
GPU: Implemented the CLEAR_BUFFERS register.
7 years ago