Commit graph

762 commits

Author SHA1 Message Date
FernandoS27
9189aacfe2 OpenGL: Fix viewport/Scissor scaling on downscaling. 2021-11-16 22:11:33 +01:00
ameerj
93c9eb196f gl_rasterizer: Fix ScissorTest and Clear when scaling 2021-11-16 22:11:32 +01:00
ameerj
31478c6c1b video_core: Misc resolution scaling related refactoring 2021-11-16 22:11:30 +01:00
ReinUsesLisp
4a512d6827 gl_rasterizer: Properly scale viewports and scissors 2021-11-16 22:11:29 +01:00
ameerj
9bc7b04ca5 gl_rasterizer: Fix rescale dirty state checking 2021-11-16 22:11:29 +01:00
ameerj
de66a69ed4 renderer_gl: Resolution scaling fixes 2021-11-16 22:11:27 +01:00
Morph
d607ceacf4 gl_rasterizer: Remove unused includes
This removes unused includes, especially the core includes which were causing this file to be recompiled every time files included by those headers are modified.
2021-10-31 23:57:51 -04:00
yzct12345
5566f3dbc0
texture_cache: Address ameerj's review 2021-08-05 20:46:24 +00: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
395bed3a0a shader: Unify shader stage types 2021-07-22 21:51:39 -04:00
ameerj
74f683787e gl_shader_cache: Implement async shaders 2021-07-22 21:51:38 -04:00
ameerj
6650c4799d gl_rasterizer: Add texture fetch barrier for fragments
Fixes flicker seen in XC2
2021-07-22 21:51:37 -04:00
ReinUsesLisp
b7764c3a79 shader: Handle host exceptions 2021-07-22 21:51:34 -04:00
ReinUsesLisp
adb591a757 glasm: Use storage buffers instead of global memory when possible 2021-07-22 21:51:33 -04:00
ReinUsesLisp
a41b2ed391 gl_shader_cache: Add disk shader cache 2021-07-22 21:51:33 -04:00
ReinUsesLisp
eacf18cce9 gl_shader_cache: Rename Program abstractions into Pipeline 2021-07-22 21:51:33 -04:00
ReinUsesLisp
6bc54e12a0 glasm: Set transform feedback state 2021-07-22 21:51:33 -04:00
ReinUsesLisp
dc02cb92e4 gl_rasterizer: Flush L2 caches before glFlush on GLASM 2021-07-22 21:51:30 -04:00
ReinUsesLisp
d621e96d0d shader: Initial OpenGL implementation 2021-07-22 21:51:30 -04:00
ReinUsesLisp
f4ace63957 shader: Accelerate pipeline transitions and use dirty flags for shaders 2021-07-22 21:51:29 -04:00
ReinUsesLisp
c67d64365a shader: Remove old shader management 2021-07-22 21:51:22 -04: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
Fernando Sahmkow
4a09517336 Fence Manager: remove reference fencing. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow
cf38faee9b Fence Manager: Force ordering on WFI. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow
63915bf2de Fence Manager: Add fences on Reference Count. 2021-07-09 22:20:36 +02:00
Fernando Sahmkow
38165fb7e3 Texture Cache: Initial Implementation of Sparse Textures. 2021-07-04 22:32:03 +02:00
ReinUsesLisp
4009ae1da2 bootmanager: Use std::stop_source for stopping emulation
Use its std::stop_token to abort shader cache loading.

Using std::stop_token instead of std::atomic_bool allows the usage of
other utilities like std::stop_callback.
2021-06-22 00:04:57 -03:00
ameerj
859ba21f6d buffer_cache: Simplify uniform disabling logic 2021-06-01 13:26:58 -04:00
bunnei
2a7eff57a8 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -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
Kelebek1
d31dbb1bc1 Implement glDepthRangeIndexeddNV 2021-02-24 22:26:53 +00:00
LC
6f1ad6aa9f
Merge pull request #5916 from ameerj/maxwell-gl-unused
maxwell_to_gl: Remove unused code
2021-02-13 02:55:59 -05:00
ReinUsesLisp
5b35b01070 video_core: Fix clang build issues 2021-02-13 02:26:47 -03:00
ReinUsesLisp
0b631f22fc renderer_opengl: Remove interop
Remove unused interop code from the OpenGL backend.
2021-02-13 02:18:04 -03: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
ameerj
069afcc633 maxwell_to_gl: Remove unused code
Removes unused declarations in maxwell_to_gl.h
2021-02-12 23:01:09 -05:00
Lioncash
10636d2494 gl_rasterizer: Remove unused variables
Resolves warnings on clang 12
2021-02-09 17:31:37 -05: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
Lioncash
4c5f5c9bf3 video_core: Remove unnecessary enum class casting in logging messages
fmt now automatically prints the numeric value of an enum class member
by default, so we don't need to use casts any more.

Reduces the line noise a bit.
2020-12-07 00:41:50 -05:00
Lioncash
f95602f152 video_core: Resolve more variable shadowing scenarios pt.3
Cleans out the rest of the occurrences of variable shadowing and makes
any further occurrences of shadowing compiler errors.
2020-12-05 16:02:23 -05:00
Morph
e13a91fa9b
Merge pull request #4954 from lioncash/compare
gl_rasterizer: Make floating-point literal a float
2020-11-22 09:55:23 +08:00
ReinUsesLisp
acc14d233f gl_rasterizer: Remove warning of untested alpha test
Alpha test has been proven to only affect the first render target.
2020-11-20 23:17:40 -03:00
Lioncash
8469b76630 gl_rasterizer: Make floating-point literal a float
Gets rid of an unnecessary expansion from float to double.
2020-11-20 04:24:33 -05:00
ReinUsesLisp
f21a189148 gl_arb_decompiler: Implement robust buffer operations
This emulates the behavior we get on GLSL with regular SSBOs with a
pointer + length pair. It aims to be consistent with the crashes we
might get.

Out of bounds stores are ignored. Atomics are ignored and return zero.
Reads return zero.
2020-10-20 03:34:32 -03:00
ReinUsesLisp
9e87193725 video_core: Remove all Core::System references in renderer
Now that the GPU is initialized when video backends are initialized,
it's no longer needed to query components once the game is running: it
can be done when yuzu is booting.

This allows us to pass components between constructors and in the
process remove all Core::System references in the video backend.
2020-09-06 05:28:48 -03:00
ameerj
1b829fbd7a move thread 1/4 count computation into allocate workers method 2020-08-16 12:02:22 -04:00
Morph
e8f22730d1 renderer_opengl: Use 1/4 of all threads for async shader compilation 2020-07-28 05:08:27 -04:00
ReinUsesLisp
a8a2526128 gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders
NV_shader_buffer_{load,store} is a 2010 extension that allows GL applications
to use what in Vulkan is known as physical pointers, this is basically C
pointers. On GLASM these is exposed through the LOAD/STORE/ATOM
instructions.

Up until now, assembly shaders were using NV_shader_storage_buffer_object.
These work fine, but have a (probably unintended) limitation that forces
us to have the limit of a single stage for all shader stages. In contrast,
with NV_shader_buffer_{load,store} we can pass GPU addresses to the
shader through local parameters (GLASM equivalent uniform constants, or
push constants on Vulkan). Local parameters have the advantage of being
per stage, allowing us to generate code without worrying about binding
overlaps.
2020-07-18 01:59:57 -03:00
David Marcec
2ba195aa0d Drop max workers from 8->2 for testing 2020-07-17 14:26:15 +10:00