aboutsummaryrefslogtreecommitdiff
path: root/src/video_core
AgeCommit message (Collapse)Author
2021-04-11renderer_vulkan: Check return value of AcquireNextImageJoshua Ashton
We can get into a really bad state by ignoring this leading to device loss and using incorrect resources.
2021-04-07video_core: Use a CV for blocking commands.Markus Wick
There is no need for a busy loop here. Let's just use a condition variable to save some power.
2021-04-07video_core/gpu_thread: Keep the write lock for allocating the fence.Markus Wick
Else the fence might get submited out-of-order into the queue, which makes testing them pointless. Overhead should be tiny as the mutex is just moved from the queue to the writing code.
2021-04-07video_core/gpu_thread: Implement a ShutDown method.Markus Wick
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone. This should fix a race condition while removing the other subsystems while the GPU is still active.
2021-04-07common/threadsafe_queue: Provide Wait() method.Markus Wick
It shall block until there is something to consume in the queue. And use it for the GPU emulation instead of the spin loop. This is only in booting the emulator, however in BOTW this is the case for about 1 second.
2021-04-05vp9: Avoid memcpy with null pointerslat9nq
Avoid sending null pointer to memcpy as reported by Undefined Behaviour Sanitizer. Replaces the std::memcpy calls in SpliceVectors with std::copy calls. Opting to replace all the memcpy's with copy's. Co-authored-by: LC <mathew1800@gmail.com>
2021-03-30Merge pull request #5927 from ameerj/astc-computeRodrigo Locatti
video_core: Accelerate ASTC texture decoding using compute shaders
2021-03-30nvdrv: Cleanup CDMA Processor on device closureChloe Marcec
Brings us a step closer to unifying all channels to share a common interface.
2021-03-30vulkan_common: enable OpenGL interop on other UnicesJan Beich
2021-03-25astc_decoder: Refactor for style and more efficient memory useameerj
2021-03-24gl_device: unblock async shaders on other Unix systemsJan Beich
Mesa is the primary OpenGL provider on all FreeDesktop systems. For example, iris is used on Intel GPU + FreeBSD by default.
2021-03-21gl_device: Block async shaders on AMD and Intellat9nq
Currently, the Windows versions of the Intel OpenGL driver and the AMD proprietary OpenGL driver do not properly support (or in fact degrade) when asynchronous shader compilation is enabled. This blocks specifically those drivers from using this feature. This affects AMDGPU-PRO on Linux, and AMD's and Intel's OpenGL drivers on Windows.
2021-03-13astc_decoder: Reimplement LayersRodrigo Locatti
Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
2021-03-13astc_decoder: Fix out of bounds memory accessameerj
resolves a crash with some anamolous textures found in Astral Chain.
2021-03-13renderer_vulkan: Accelerate ASTC decodingameerj
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-03-13host_shaders: Modify shader cmake integration to allow for larger shadersameerj
using a raw string to encapsulate the entire shader code limits us to shaders of size less than 2KB. This change overcomes this limitation.
2021-03-13renderer_opengl: Accelerate ASTC texture decoding with a compute shaderameerj
ASTC texture decoding is currently handled by a CPU decoder for GPU's without native ASTC decoding support (most desktop GPUs). This is the cause for noticeable performance degradation in titles which use the format extensively. This commit adds support to accelerate ASTC decoding using a compute shader on OpenGL for GPUs without native support.
2021-03-12Merge pull request #6028 from bunnei/raster-cachebunnei
video_core: rasterizer_accelerated: Use a flat array instead of interval_map for cached pages.
2021-03-12video_core: rasterizer_accelerated: Fix un/signed mismatch.bunnei
2021-03-09Merge pull request #5891 from ameerj/bgra-oglRodrigo Locatti
renderer_opengl: Use compute shaders to swizzle BGR textures on copy
2021-03-08Merge pull request #6021 from ReinUsesLisp/skip-cache-heuristicbunnei
buffer_cache: Heuristically decide to skip cache on uniform buffers
2021-03-04texture_cache: Blacklist BGRA8 copies and views on OpenGLameerj
In order to force the BGRA8 conversion on Nvidia using OpenGL, we need to forbid texture copies and views with other formats. This commit also adds a boolean relating to this, as this needs to be done only for the OpenGL api, Vulkan must remain unchanged.
2021-03-04renderer_opengl: Swizzle BGR textures on copyameerj
OpenGL does not natively support BGR internal formats, which causes many BGR textures to render incorrectly, with Red and Blue channels swapped. This commit aims to address this by swizzling the blue and red channels on texture copies when a BGR format is encountered.
2021-03-04Merge pull request #5989 from ReinUsesLisp/cmdpoolbunnei
vk_command_pool: Reduce the command pool size from 4096 to 4
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>