Commit graph

90 commits

Author SHA1 Message Date
Fernando Sahmkow
802fabe3ab OpenGL: Implement Fencing backend. 2020-04-22 11:36:10 -04:00
Fernando Sahmkow
fda21f5a93 GPU: Delay Fences. 2020-04-22 11:36:08 -04:00
Fernando Sahmkow
c689dc6804 GPU: Refactor synchronization on Async GPU 2020-04-22 11:36:06 -04:00
Lioncash
8a37c63b9e dma_pusher: Remove reliance on the global system instance
With this, the video core is now has no calls to the global system
instance at all.
2020-04-19 16:12:08 -04:00
James Rowe
b37d69e5e1 Frontend/GPU: Refactor context management
Changes the GraphicsContext to be managed by the GPU core. This
eliminates the need for the frontends to fool around with tricky
MakeCurrent/DoneCurrent calls that are dependent on the settings (such
as async gpu option).

This also refactors out the need to use QWidget::fromWindowContainer as
that caused issues with focus and input handling. Now we use a regular
QWidget and just access the native windowHandle() directly.

Another change is removing the debug tool setting in FrameMailbox.
Instead of trying to block the frontend until a new frame is ready, the
core will now take over presentation and draw directly to the window if
the renderer detects that its hooked by NSight or RenderDoc

Lastly, since it was in the way, I removed ScopeAcquireWindowContext and
replaced it with a simple subclass in GraphicsContext that achieves the
same result
2020-03-24 21:03:42 -06:00
ReinUsesLisp
30ed1b0702 video_core/gpu: Remove unused functions 2020-02-25 16:53:47 -03:00
bunnei
f382179d47 Revert "video_core: memory_manager: Use GPU interface for cache functions." 2020-02-15 17:47:15 -05:00
Fernando Sahmkow
2dd9d660e3 GPU: Address Feedback. 2020-02-13 18:16:07 -04:00
Fernando Sahmkow
04c3213a01 GPU: Implement GPU Clock correctly. 2020-02-10 10:44:54 -04:00
bunnei
f28ab9626e video_core: memory_manager: Use GPU interface for cache functions. 2020-02-07 22:59:35 -05:00
Markus Wick
4bdaebe33e video_core: Block in WaitFence.
This function is called rarely and blocks quite often for a long time.
So don't waste power and let the CPU sleep.

This might also increase the performance as the other cores might be allowed to clock higher.
2019-12-30 13:04:53 +01:00
bunnei
9e3c8681ce Merge pull request #2912 from FernandoS27/async-fixes
General fixes to Async GPU
2019-10-16 10:34:48 -04:00
Lioncash
6a50c481fd video_core/gpu: Remove use of the global system accessor
We can just make use of the reference member variable instead of
accessing the global system instance.
2019-10-15 16:39:30 -04:00
Fernando Sahmkow
a1b185fa72 AsyncGpu: Address Feedback 2019-10-11 13:41:15 -04:00
Fernando Sahmkow
1df31e4b65 GPU_Async: Correct fences, display events and more.
This commit uses guest fences on vSync event instead of an articial fake 
fence we had.
It also corrects to keep signaling display events while loading the game 
as the OS is suppose to send buffers to vSync during that time.
2019-10-04 19:59:48 -04:00
FearlessTobi
99b280bbf7 video_core: Implement RGBX16F PixelFormat 2019-09-22 02:16:44 +02:00
bunnei
0d49a1d9cd Merge pull request #2793 from ReinUsesLisp/bgr565
renderer_opengl: Implement RGB565 framebuffer format
2019-09-03 22:36:32 -04:00
Rodrigo Locatti
598157a8c9 video_core: Silent miscellaneous warnings (#2820)
* texture_cache/surface_params: Remove unused local variable

* rasterizer_interface: Add missing documentation commentary

* maxwell_dma: Remove unused rasterizer reference

* video_core/gpu: Sort member declaration order to silent -Wreorder warning

* fermi_2d: Remove unused MemoryManager reference

* video_core: Silent unused variable warnings

* buffer_cache: Silent -Wreorder warnings

* kepler_memory: Remove unused MemoryManager reference

* gl_texture_cache: Add missing override

* buffer_cache: Add missing include

* shader/decode: Remove unused variables
2019-08-30 14:08:00 -04:00
ReinUsesLisp
0a9f3a7a43 renderer_opengl: Use VideoCore pixel format 2019-08-21 02:16:40 -03:00
Fernando Sahmkow
e82d641357 GPU: Flush commands on every dma pusher step.
This commit ensures that the host gpu is constantly fed with commands to
work with, while the guest gpu keeps producing the rest of the commands.
This reduces syncing time between host and guest gpu.
2019-07-26 16:54:22 -04:00
bunnei
6b8b59ee75 Merge pull request #2592 from FernandoS27/sync1
Implement GPU Synchronization Mechanisms & Correct NVFlinger
2019-07-26 14:26:44 -04:00
bunnei
6904a38621 Merge pull request #2743 from FernandoS27/surpress-assert
Downgrade and suppress a series of GPU asserts and debug messages.
2019-07-25 12:34:36 -04:00
Fernando Sahmkow
d6e1af6f23 GPU: Add missing puller methods.
This adds some missing puller methods. We don't assert them as these are 
nop operations for us.
2019-07-18 08:54:42 -04:00
ReinUsesLisp
37a3fdc6c6 gl_rasterizer: Implement compute shaders 2019-07-15 17:38:25 -03:00
Michael Scire
ab4a2b5699 prefer system reference over global accessor 2019-07-09 08:11:35 -07:00
Fernando Sahmkow
b8b874005f NVServices: Styling, define constructors as explicit and corrections 2019-07-05 15:49:32 -04:00
Fernando Sahmkow
a156731a9c NVFlinger: Correct GCC compile error 2019-07-05 15:49:31 -04:00
Fernando Sahmkow
9db53b51b6 NVServices: Make NVEvents Automatic according to documentation. 2019-07-05 15:49:29 -04:00
Fernando Sahmkow
604dc3f59b GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardware 2019-07-05 15:49:26 -04:00
Fernando Sahmkow
772d205e8f nv_host_ctrl: Make Sync GPU variant always return synced result. 2019-07-05 15:49:20 -04:00
Fernando Sahmkow
ff34715d92 Gpu: use an std mutex instead of a spin_lock to guard syncpoints 2019-07-05 15:49:18 -04:00
Fernando Sahmkow
095e6b1cd9 Gpu: Mark areas as protected. 2019-07-05 15:49:16 -04:00
Fernando Sahmkow
8c8e96b87c nv_services: Stub CtrlEventSignal 2019-07-05 15:49:15 -04:00
Fernando Sahmkow
1fb8727a9a Gpu: Implement Hardware Interrupt Manager and manage GPU interrupts 2019-07-05 15:49:14 -04:00
Fernando Sahmkow
779c115dbb video_core: Implement GPU side Syncpoints 2019-07-05 15:49:11 -04:00
Fernando Sahmkow
e42bf4f314 Introduce skeleton of the GPU Compute Engine. 2019-04-22 19:05:43 -04:00
Fernando Sahmkow
86e8a9f978 Revamp Kepler Memory to use a subegine to manage uploads 2019-04-22 18:50:56 -04:00
bunnei
2a4a454793 memory_manager: Improved implementation of read/write/copy block.
- Fixes graphical issues with Chocobo's Mystery Dungeon EVERY BUDDY!
- Fixes a crash with Mario Tennis Aces
2019-04-05 23:43:34 -04:00
Lioncash
c34cb4ebcc video_core/gpu: Amend typo in GPU member variable name
smaphore -> semaphore
2019-03-27 12:12:57 -04:00
bunnei
fa405371ee gpu: Rewrite virtual memory manager using PageTable. 2019-03-20 22:36:02 -04:00
bunnei
d3f26c1546 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
2019-03-16 00:38:48 -04:00
bunnei
83079031b3 gpu: Refactor a/synchronous implementations into their own classes. 2019-03-06 21:48:57 -05:00
bunnei
9d1ee628b2 gpu: Move command processing to another thread. 2019-03-06 21:48:57 -05:00
bunnei
edf09ff450 gpu: Refactor command and swap buffers interface for asynch. 2019-03-06 21:09:09 -05:00
bunnei
1e27162275 gpu: Refactor to take RendererBase instead of RasterizerInterface. 2019-03-06 21:09:09 -05:00
Lioncash
12774b7c44 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.
2019-02-15 22:06:23 -05:00
Lioncash
1c3371c921 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.
2019-02-15 21:50:25 -05:00
bunnei
cd40782922 Merge pull request #2099 from greggameplayer/BGRA8-Framebuffer-Real
Implement BGRA8 framebuffer format
2019-02-12 21:44:20 -05:00
bunnei
527f634966 Merge pull request #2110 from lioncash/namespace
core_timing: Rename CoreTiming namespace to Core::Timing
2019-02-12 19:26:37 -05:00
Lioncash
1d2de5c4b5 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.
2019-02-12 12:42:17 -05:00