- 13 Feb, 2021 40 commits
-
-
ReinUsesLisp authored
Allow compilers with our settings inline hot code.
-
Rodrigo Locatti authored
gl_texture_cache: Lazily create non-sRGB texture views for sRGB formats
-
ameerj authored
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>
-
Morph authored
gl_stream_buffer/vk_staging_buffer_pool: Fix size check
-
ReinUsesLisp authored
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
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.
-
LC authored
yuzu: Create screenshot path before capture
-
LC authored
maxwell_to_gl: Remove unused code
-
LC authored
vulkan_device: Require VK_EXT_robustness2
-
ReinUsesLisp authored
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.
-
bunnei authored
video_core: Reimplement the buffer cache
-
ReinUsesLisp authored
This is a better default for most games, yielding better performance and less graphical issues.
-
ReinUsesLisp authored
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
Due to BindBufferRangeNV limitations and poor quality code emission from our side, assembly shaders are currently slower than GLSL. Their build time and feature advantages are still relevant, but they are outweighted by their runtime performance.
-
ReinUsesLisp authored
Remove unused interop code from the OpenGL backend.
-
ReinUsesLisp authored
Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
Allow adding functionality to each function without making CreateBuffer more complex.
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
Fix regression on Pascal on Animal Crossing: New Horizons, fixing a validation error.
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
-
ReinUsesLisp authored
Workaround an issue on Nvidia where creating a Vulkan instance from an active OpenGL thread disables threaded optimization on the driver. This optimization is important to have good performance on Nvidia OpenGL.
-
ReinUsesLisp authored
-
ReinUsesLisp authored
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.
-
ReinUsesLisp authored
Ensure the behavior of the previous commit in tests.
-
ReinUsesLisp authored
Some games usually write memory pages currently used by the GPU, causing rendering issues (e.g. flashing geometry and shadows on Link's Awakening). To workaround this issue, Guest CPU writes are delayed until the command buffer finishes processing, but the pages are updated immediately. The overall behavior is: - CPU writes are cached until they are flushed, they update the page state, but don't change the modification state. Cached writes stop pages from being flushed, in case games have meaningful data in it. - Command processing writes (e.g. push constants) update the page state and are marked to the command processor as dirty. They don't remove the state of cached writes.
-