aboutsummaryrefslogtreecommitdiff
path: root/src/video_core
AgeCommit message (Collapse)Author
2021-03-02video_core: rasterizer_accelerated: Fix delta check ordering.bunnei
2021-03-02video_core: rasterizer_accelerated: Improve error handling & fix implicit ↵bunnei
conversion.
2021-03-02video_core: rasterizer_accelerated: Use a flat array instead of interval_map ↵bunnei
for cached pages. - Uses a fixed 64MB for the cache instead of an ever growing map. - Slightly faster by using atomics instead of a single mutex for access. - Thanks for Rodrigo for the idea.
2021-03-02buffer_cache: Heuristically decide to skip cache on uniform buffersReinUsesLisp
Some games benefit from skipping caches (Pokémon Sword), and others don't (Animal Crossing: New Horizons). Add an heuristic to decide this at runtime. The cache hit ratio has to be ~98% or better to not skip the cache. There are 16 frames of buffer.
2021-02-28gpu_thread: Remove Async NVDEC placeholdersameerj
This commit removes early placeholders for an implementation of async nvdec. With recent changes to the source code, the placeholders are no longer accurate, and can cause a nullptr dereference due to the nature of the cdma_pusher lifetime.
2021-02-27Merge pull request #5984 from jbeich/gcc-freebsdbunnei
common,video-core: unbreak GCC 11 build on FreeBSD 13
2021-02-27Merge pull request #5953 from bunnei/memory-refactor-1bunnei
Kernel Rework: Memory updates and refactoring (Part 1)
2021-02-24Implement glDepthRangeIndexeddNVKelebek1
2021-02-23vk_command_pool: Reduce the command pool size from 4096 to 4ReinUsesLisp
This allows drivers to reuse memory more easily and preallocate less. The optimal number has been measured booting Pokémon Sword.
2021-02-23video_core: add missing header after 468bd9c1b0f9Jan Beich
src/video_core/shader_notify.cpp: In member function 'void VideoCore::ShaderNotify::MarkShaderComplete()': src/video_core/shader_notify.cpp:33:10: error: 'unique_lock' is not a member of 'std' 33 | std::unique_lock lock{mutex}; | ^~~~~~~~~~~ src/video_core/shader_notify.cpp:6:1: note: 'std::unique_lock' is defined in header '<mutex>'; did you forget to '#include <mutex>'? 5 | #include "video_core/shader_notify.h" +++ |+#include <mutex> 6 | src/video_core/shader_notify.cpp: In member function 'void VideoCore::ShaderNotify::MarkSharderBuilding()': src/video_core/shader_notify.cpp:38:10: error: 'unique_lock' is not a member of 'std' 38 | std::unique_lock lock{mutex}; | ^~~~~~~~~~~ src/video_core/shader_notify.cpp:38:10: note: 'std::unique_lock' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
2021-02-21Merge pull request #5936 from Kelebek1/Offsetsbunnei
Offsets for TexelFetch and TextureGather in Vulkan
2021-02-20gl_disk_shader_cache: Log total shader entries count on game loadMorph
2021-02-19Merge pull request #5924 from ReinUsesLisp/inline-bindingsbunnei
vk_update_descriptor: Inline and improve code for binding buffers
2021-02-18hle: kernel: Migrate PageHeap/PageTable to KPageHeap/KPageTable.bunnei
2021-02-18Merge pull request #4973 from ameerj/nvdec-optbunnei
nvdec: Reuse allocated buffers and general cleanup
2021-02-15vk_rasterizer: Fix loading shader addresses twiceReinUsesLisp
This was recently introduced on a wrongly rebased commit.
2021-02-15Merge pull request #5923 from ReinUsesLisp/vk-dirty-pipelinebunnei
fixed_pipeline_cache: Use dirty flags to lazily update key
2021-02-15Review 1Kelebek1
2021-02-15Implement texture offset support for TexelFetch and TextureGather and add ↵Kelebek1
offsets for Tlds Formatting
2021-02-14yuzu: Various frontend improvements to avoid crashes and improve experience ↵bunnei
on Linux.
2021-02-13vk_resource_pool: Load GPU tick once and compare with itReinUsesLisp
Other minor style improvements. Rename free_iterator to hint_iterator, to describe better what it does.
2021-02-13vk_update_descriptor: Inline and improve code for binding buffersReinUsesLisp
Allow compilers with our settings inline hot code.
2021-02-13fixed_pipeline_cache: Use dirty flags to lazily update keyReinUsesLisp
Use dirty flags to avoid building pipeline key from scratch on each draw call. This saves a bit of unnecesary work on each draw call.
2021-02-13gl_texture_cache: Lazily create non-sRGB texture views for sRGB formatsameerj
This creates non-sRGB texture views for sRGB texture formats to allow for interfacing with these views in compute shaders using imageLoad and imageStore. Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-02-13 rebase, fix name shadowing, more constameerj
2021-02-13Address PR feedbackameerj
Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2021-02-13 streamline cdma_pusher/command_classesameerj
2021-02-13 streamline cdma_pusher/command_classesameerj
2021-02-13nvdec cleanupameerj
2021-02-13Merge pull request #5919 from ReinUsesLisp/stream-buffer-tragicMorph
gl_stream_buffer/vk_staging_buffer_pool: Fix size check
2021-02-13vk_master_semaphore: Mark gpu_tick atomic operations with relaxed orderReinUsesLisp
2021-02-13vk_staging_buffer_pool: Inline tick testsReinUsesLisp
Load the current tick to a local variable, moving it out of an atomic and allowing us to compare the value without going through a pointer each time. This should make the loop more optimizable.
2021-02-13gl_stream_buffer/vk_staging_buffer_pool: Fix size checkReinUsesLisp
Fix a tragic off-by-one condition that causes Vulkan's stream buffer to think it's always full, using fallback memory. The OpenGL was also affected by this bug to a lesser extent.
2021-02-13Merge pull request #5916 from ameerj/maxwell-gl-unusedLC
maxwell_to_gl: Remove unused code
2021-02-13vulkan_device: Require VK_EXT_robustness2ReinUsesLisp
We are already using robustness2 features without requiring it explicitly, causing potential crashes on drivers without the extension. Requiring this at boot allows better diagnostics for it and formalizes our usage on the extension.
2021-02-13video_core: Fix clang build issuesReinUsesLisp
2021-02-13vk_staging_buffer_pool: Fix softlock when stream buffer overflowsReinUsesLisp
There was still a code path that could wait on a timeline semaphore tick that would never be signalled. While we are at it, make use of more STL algorithms.
2021-02-13vk_buffer_cache: Add support for null index buffersReinUsesLisp
Games can bind a null index buffer (size=0) where all indices are evaluated as zero. VK_EXT_robustness2 doesn't support this and all drivers segfault when a null index buffer is passed to vkCmdBindIndexBuffer. Workaround this by creating a 4 byte buffer and filling it with zeroes. If it's read out of bounds, robustness takes care of returning zeroes as indices.
2021-02-13buffer_cache: Add extra bytes to guest SSBOsReinUsesLisp
Bind extra bytes beyond the guest API's bound range. This is due to some games like Astral Chain operating out of bounds. Binding the whole map range would be technically correct, but games have large maps that make this approach unaffordable for now.
2021-02-13Merge branch 'bytes-to-map-end' into new-bufcache-wipReinUsesLisp
2021-02-13vk_staging_buffer_pool: Get a staging buffer instead of waitingReinUsesLisp
Avoids waiting idle while the GPU finishes to do work, and fixes an issue where we'd wait forever if a single command buffer (logic tick) all the data.
2021-02-13renderer_opengl: Remove interopReinUsesLisp
Remove unused interop code from the OpenGL backend.
2021-02-13gl_buffer_cache: Drop interop based parameter buffer workaroundsReinUsesLisp
Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
2021-02-13buffer_cache: Heuristically detect stream buffersReinUsesLisp
Detect when a memory region has been joined several times and increase the size of the created buffer on those instances. The buffer is assumed to be a "stream buffer", increasing its size should stop us from constantly recreating it and fragmenting memory.
2021-02-13buffer_cache: Split CreateBuffer in separate functionsReinUsesLisp
Allow adding functionality to each function without making CreateBuffer more complex.
2021-02-13buffer_cache: Skip cache on small uploads on VulkanReinUsesLisp
Ports from OpenGL the optimization to skip small 3D uniform buffer uploads. This will take advantage of the previously introduced stream buffer. Fixes instances where the staging buffer offset was being ignored.
2021-02-13vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp
This uses a ring buffer similar to OpenGL's stream buffer for small uploads. This stops us from allocating several small buffers, reducing memory fragmentation and cache locality. It uses dedicated allocations when possible.
2021-02-13vulkan_device: Enable robustBufferAccessReinUsesLisp
Fix regression on Pascal on Animal Crossing: New Horizons, fixing a validation error.
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp
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-13vulkan_common: Expose interop and headless devicesReinUsesLisp