2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00
yuzu/src/video_core/renderer_opengl
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
..
gl_arb_decompiler.cpp video_core: Make use of ordered container contains() where applicable 2020-12-07 16:30:39 -05:00
gl_arb_decompiler.h gl_arb_decompiler: Implement an assembly shader decompiler 2020-06-11 22:12:07 -03:00
gl_buffer_cache.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_buffer_cache.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_device.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_device.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_fence_manager.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_fence_manager.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_query_cache.cpp video_core: Resolve more variable shadowing scenarios pt.3 2020-12-05 16:02:23 -05:00
gl_query_cache.h video_core: Resolve more variable shadowing scenarios pt.3 2020-12-05 16:02:23 -05:00
gl_rasterizer.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_rasterizer.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_resource_manager.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_resource_manager.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_shader_cache.cpp renderer_opengl: Avoid precompiled cache and force NV GL cache directory 2021-01-21 00:41:03 -03:00
gl_shader_cache.h video_core: Resolve more variable shadowing scenarios pt.3 2020-12-05 16:02:23 -05:00
gl_shader_decompiler.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_shader_decompiler.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_shader_disk_cache.cpp video_core: Make use of ordered container contains() where applicable 2020-12-07 16:30:39 -05:00
gl_shader_disk_cache.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_shader_manager.cpp video_core: Rewrite the texture cache 2020-12-30 03:38:50 -03:00
gl_shader_manager.h video_core: Rewrite the texture cache 2020-12-30 03:38:50 -03:00
gl_shader_util.cpp gl_shader_util: Use std::string_view instead of star pointer 2020-08-23 21:23:54 -03:00
gl_shader_util.h gl_shader_util: Use std::string_view instead of star pointer 2020-08-23 21:23:54 -03:00
gl_state_tracker.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_state_tracker.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_stream_buffer.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_stream_buffer.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_texture_cache.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
gl_texture_cache.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
maxwell_to_gl.h video_core: Rewrite the texture cache 2020-12-30 03:38:50 -03:00
renderer_opengl.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
renderer_opengl.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
util_shaders.cpp video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00
util_shaders.h video_core: Reimplement the buffer cache 2021-02-13 02:17:22 -03:00