Commit graph

191 commits

Author SHA1 Message Date
David Marcec
cb42f51dc1 Mark parameters as const 2020-06-03 16:33:38 +10:00
David Marcec
d9082de7ea Pass by reference instead of copying parameters 2020-06-02 16:37:06 +10:00
David Marcec
05eeb7de3d Implement macro JIT 2020-05-30 11:40:04 +10:00
ReinUsesLisp
d1e0f2095c maxwell_3d: Reduce severity of logs that can be spammed
These logs were killing performance on some games when they were
spammed. Reduce them to Debug severity.
2020-05-28 18:23:25 -03:00
bunnei
4fb531a576 Merge pull request #3885 from ReinUsesLisp/viewport-swizzles
video_core: Implement viewport swizzles with NV_viewport_swizzle
2020-05-08 15:16:53 -04:00
bunnei
a1d3586e60 Merge pull request #3815 from FernandoS27/command-list-2
GPU: More optimizations to GPU Command List Processing and DMA Copy Optimizations
2020-05-05 17:12:42 -04:00
ReinUsesLisp
ff7b0d7329 maxwell_3d: Add viewport swizzles 2020-05-04 17:50:59 -03:00
ReinUsesLisp
8835d40024 {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
Drop MemoryBarrier from the buffer cache and use Maxwell3D's register
WaitForIdle.

To implement this on OpenGL we just call glMemoryBarrier with the
necessary bits.

Vulkan lacks this synchronization primitive, so we set an event and
immediately wait for it. This is not a pretty solution, but it's what
Vulkan can do without submitting the current command buffer to the queue
(which ends up being more expensive on the CPU).
2020-04-28 02:18:12 -03:00
Fernando Sahmkow
b916b58702 VideoCore/Engines: Refactor Engines CallMethod. 2020-04-27 21:47:58 -04:00
Fernando Sahmkow
9311983f3d Maxwell3D: Process Macros on MultiMethod. 2020-04-23 08:52:56 -04:00
Fernando Sahmkow
ef3a0ae64a DMAPusher: Propagate multimethod writes into the engines. 2020-04-23 08:52:55 -04:00
Fernando Sahmkow
af9f901764 FenceManager: Manage syncpoints and rename fences to semaphores. 2020-04-22 11:36:16 -04:00
Fernando Sahmkow
6092308fe4 Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan. 2020-04-22 11:36:14 -04:00
Fernando Sahmkow
2ee68ad8e4 GPU: Fix rebase errors. 2020-04-22 11:36:13 -04:00
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
ReinUsesLisp
4ef04832a8 maxwell_3d: Initialize format attributes constant as one
nouveau expects this to be true but it doesn't set it.
2020-04-16 21:15:07 -03:00
namkazy
fa1b60cc8c apply replay logic to all writes. remove replay from MacroInterpreter::Send (@fincs) 2020-03-22 22:25:44 +07:00
namkazy
30112fcb3c maxwell_3d: init shadow_state 2020-03-22 13:35:11 +07:00
namkazy
e89c5935f4 maxwell_3d: this seem more correct. 2020-03-22 12:02:54 +07:00
namkazy
854fb1ed2b maxwell_3d: update comments for shadow ram usage 2020-03-22 11:35:26 +07:00
Nguyen Dac Nam
771d117869 maxwell_3d: track shadow ram ctrl and hw reg value 2020-03-22 10:53:41 +07:00
ReinUsesLisp
7a93d38e0f const_buffer_engine_interface: Store component types
This is required for Vulkan. Sampling integer textures with float
handles is illegal.
2020-03-09 18:40:53 -03:00
ReinUsesLisp
95596b787e maxwell_3d: Flatten cull and front face registers 2020-02-28 17:56:41 -03:00
ReinUsesLisp
005f5ca883 video_core: Reintroduce dirty flags infrastructure 2020-02-28 17:56:41 -03:00
ReinUsesLisp
c2d3732176 gl_rasterizer: Remove dirty flags 2020-02-28 16:39:27 -03:00
bunnei
5c5b6cf721 Merge pull request #3414 from ReinUsesLisp/maxwell-3d-draw
maxwell_3d: Unify draw methods
2020-02-19 16:13:50 -05:00
ReinUsesLisp
518a6182f9 maxwell_3d: Unify draw methods
Pass instanced state of a draw invocation as an argument instead of
having two separate virtual methods.
2020-02-14 18:09:40 -03:00
ReinUsesLisp
d8a42816d7 gl_query_cache: Optimize query cache
Use a custom cache instead of relying on a ranged cache.
2020-02-14 17:38:27 -03:00
ReinUsesLisp
339a227a5e gl_query_cache: Implement host queries using a deferred cache
Instead of waiting immediately for executed commands, defer the query
until the guest CPU reads it. This way we get closer to what the guest
program is doing.

To archive this we have to build a dependency queue, because host APIs
(like OpenGL and Vulkan) use ranged queries instead of counters like
NVN.

Waiting for queries implicitly uses fences and this requires a command
being queued, otherwise the driver will lock waiting until a timeout. To
fix this when there are no commands queued, we explicitly call glFlush.
2020-02-14 17:33:13 -03:00
ReinUsesLisp
11206f8a28 maxwell_3d: Slow implementation of passed samples (query 21)
Implements GL_SAMPLES_PASSED by waiting immediately for queries.
2020-02-14 17:27:17 -03: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
Fernando Sahmkow
8137fb8981 Maxwell3D: Correct query reporting. 2020-02-10 10:41:43 -04:00
Fernando Sahmkow
5fb7881077 Shader_IR: Allow constant access of guest driver. 2020-01-24 16:43:30 -04:00
Fernando Sahmkow
e9f3264c8d GPU: Implement guest driver profile and deduce texture handler sizes. 2020-01-24 16:43:29 -04:00
ReinUsesLisp
4862fc4970 vk_graphics_pipeline: Set front facing properly
Front face was being forced to a certain value when cull face is
disabled. Set a default value on initialization and drop the forcefully
set front facing value with culling disabled.
2020-01-18 18:50:47 -03:00
ReinUsesLisp
9328c4be0b yuzu: Remove Maxwell debugger
This was carried from Citra and wasn't really used on yuzu. It also adds
some runtime overhead. This commit removes it from yuzu's codebase.
2020-01-02 23:09:44 -03:00
ReinUsesLisp
0eb9f3b107 gl_rasterizer: Implement RASTERIZE_ENABLE
RASTERIZE_ENABLE is the opposite of GL_RASTERIZER_DISCARD. Implement it
naturally using this.

NVN games expect rasterize to be enabled by default, reflect that in our
initial GPU state.
2019-12-18 19:28:23 -03:00
ReinUsesLisp
5f6a589d63 video_core: Unify ProgramType and ShaderStage into ShaderType 2019-11-22 21:28:48 -03:00
ReinUsesLisp
c884dc8af2 texture_cache: Use a table instead of switch for texture formats
Use a large flat array to look up texture formats. This allows us to
properly implement formats with different component types. It should
also be faster.
2019-11-14 20:57:10 -03:00
ReinUsesLisp
905cc250a4 video_core: Silence implicit conversion warnings 2019-11-08 22:48:50 +00:00
ReinUsesLisp
902431adce maxwell_3d/kepler_compute: Remove unused arguments in GetTexture 2019-10-28 00:23:42 -03:00
ReinUsesLisp
cea1214e5a video_core/textures: Remove unused index entry in FullTextureInfo 2019-10-28 00:14:38 -03:00
ReinUsesLisp
cf7206fe7b maxwell_3d: Remove unused method GetStageTextures 2019-10-28 00:14:29 -03:00
ReinUsesLisp
15a52a86bd maxwell_3d: Silence implicit conversion warnings
While we are at it, unify types for dirty reg pointers.
2019-10-27 15:22:17 -03:00
Fernando Sahmkow
4168b287c9 Shader_IR: allow lookup of texture samplers within the shader_ir for instructions that don't provide it 2019-10-25 09:01:30 -04:00
Fernando Sahmkow
d4da704ac5 VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders. 2019-10-25 09:01:29 -04:00
ReinUsesLisp
94d32c3cd2 maxwell_3d: Reduce FlushMMEInlineDraw logging to Trace 2019-10-20 03:43:17 -03:00