aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl
AgeCommit message (Collapse)Author
2021-06-24Merge pull request #6496 from ameerj/astc-fixesbunnei
astc: Various robustness enhancements for the gpu decoder
2021-06-24Merge pull request #6519 from Wunkolo/mem-size-literalbunnei
common: Replace common_sizes into user-literals
2021-06-24common: Replace common_sizes into user-literalsWunkolo
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
2021-06-23Merge pull request #6517 from lioncash/fmtlibbunnei
externals: Update fmt to 8.0.0
2021-06-23General: Resolve fmt specifiers to adhere to 8.0.0 API where applicableLioncash
Also removes some deprecated API usages.
2021-06-23Merge pull request #6465 from FernandoS27/sex-on-the-beachMai M
GPU: Implement a garbage collector for GPU Caches (project Reaper+)
2021-06-22bootmanager: Use std::stop_source for stopping emulationReinUsesLisp
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-20gl_device: Expand on Mesa driver nameslat9nq
Makes this list a bit more capable at identifying Mesa drivers. Tries to deal with two of the overloaded vendor strings in a more generic fashion.
2021-06-20video_core: Add GPU vendor name to window title barameerj
2021-06-20Reaper: Guarantee correct deletion.Fernando Sahmkow
2021-06-19util_shaders: Specify ASTC decoder memory barrier bitsameerj
2021-06-19astc_decoder.comp: Remove unnecessary LUT SSBOsameerj
We can move them to instead be compile time constants within the shader.
2021-06-19astc: Various robustness enhancements for the gpu decoderameerj
These changes should help in reducing crashes/drivers panics that may occur due to synchronization issues between the shader completion and later access of the decoded texture.
2021-06-17Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow
2021-06-15configure_graphics: Add Accelerate ASTC decoding settingameerj
2021-06-01buffer_cache: Simplify uniform disabling logicameerj
2021-05-25common: fs: Rework the Common Filesystem interface to make use of ↵Morph
std::filesystem (#6270) * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-05-20Merge pull request #6248 from A-w-x/intelmesabunnei
gl_device: Intel: Disable texture view formats workaround on mesa
2021-05-18Merge pull request #6317 from ameerj/fps-fixbunnei
perf_stats: Rework FPS counter to be more accurate
2021-05-15Merge pull request #6289 from ameerj/oob-blitbunnei
texture_cache: Handle out of bound texture blits
2021-05-15perf_stats: Rework FPS counter to be more accurateameerj
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case. This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics. The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values. The status bar update frequency was also changed from 2 seconds to 500ms.
2021-05-07texture_cache: Handle out of bound texture blitsameerj
Some games interleave a texture blit using regions which are out-of-bounds. This addresses the interleaving to avoid oob reads from the src texture.
2021-05-05hle: kernel: Rename Process to KProcess.bunnei
2021-04-26gl_device: Intel: Disable texture view formats workaround on mesaA-w-x
2021-04-14common: Move settings to common from core.bunnei
- Removes a dependency on core and input_common from common.
2021-03-30Merge pull request #5927 from ameerj/astc-computeRodrigo Locatti
video_core: Accelerate ASTC texture decoding using compute shaders
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-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-09Merge pull request #5891 from ameerj/bgra-oglRodrigo Locatti
renderer_opengl: Use compute shaders to swizzle BGR textures on copy
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-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-24Implement glDepthRangeIndexeddNVKelebek1
2021-02-20gl_disk_shader_cache: Log total shader entries count on game loadMorph
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-13Merge pull request #5919 from ReinUsesLisp/stream-buffer-tragicMorph
gl_stream_buffer/vk_staging_buffer_pool: Fix size check
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-13video_core: Fix clang build issuesReinUsesLisp
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-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-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-13gpu: Report renderer errors with exceptionsReinUsesLisp
Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
2021-02-12maxwell_to_gl: Remove unused codeameerj
Removes unused declarations in maxwell_to_gl.h
2021-02-09gl_rasterizer: Remove unused variablesLioncash
Resolves warnings on clang 12