summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* vk_resource_pool: Load GPU tick once and compare with itGravatar ReinUsesLisp2021-02-132-8/+8
| | | | | Other minor style improvements. Rename free_iterator to hint_iterator, to describe better what it does.
* gl_texture_cache: Lazily create non-sRGB texture views for sRGB formatsGravatar ameerj2021-02-133-7/+41
| | | | | | 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>
* Merge pull request #5919 from ReinUsesLisp/stream-buffer-tragicGravatar Morph2021-02-133-6/+12
|\ | | | | gl_stream_buffer/vk_staging_buffer_pool: Fix size check
| * vk_master_semaphore: Mark gpu_tick atomic operations with relaxed orderGravatar ReinUsesLisp2021-02-131-4/+4
| |
| * vk_staging_buffer_pool: Inline tick testsGravatar ReinUsesLisp2021-02-132-1/+7
| | | | | | | | | | | | 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.
| * gl_stream_buffer/vk_staging_buffer_pool: Fix size checkGravatar ReinUsesLisp2021-02-132-2/+2
| | | | | | | | | | | | 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.
* | Merge pull request #5915 from lat9nq/screenshots-dir-fixGravatar LC2021-02-131-0/+5
|\ \ | | | | | | yuzu: Create screenshot path before capture
| * | yuzu: Create screenshot path before captureGravatar lat9nq2021-02-121-0/+5
| | | | | | | | | | | | | | | Allows screenshots in cases where the screenshots path doesn't already exist.
* | | Merge pull request #5916 from ameerj/maxwell-gl-unusedGravatar LC2021-02-132-36/+3
|\ \ \ | | | | | | | | maxwell_to_gl: Remove unused code
| * | | maxwell_to_gl: Remove unused codeGravatar ameerj2021-02-122-36/+3
| | | | | | | | | | | | | | | | Removes unused declarations in maxwell_to_gl.h
* | | | vulkan_device: Require VK_EXT_robustness2Gravatar ReinUsesLisp2021-02-132-37/+14
| |_|/ |/| | | | | | | | | | | | | | | | | 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.
* | | config: Make high GPU accuracy the defaultGravatar ReinUsesLisp2021-02-132-3/+3
| | | | | | | | | | | | | | | This is a better default for most games, yielding better performance and less graphical issues.
* | | video_core: Fix clang build issuesGravatar ReinUsesLisp2021-02-132-8/+5
| | |
* | | vk_staging_buffer_pool: Fix softlock when stream buffer overflowsGravatar ReinUsesLisp2021-02-132-19/+20
| | | | | | | | | | | | | | | | | | | | | 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.
* | | vk_buffer_cache: Add support for null index buffersGravatar ReinUsesLisp2021-02-132-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | buffer_cache: Add extra bytes to guest SSBOsGravatar ReinUsesLisp2021-02-131-1/+7
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'bytes-to-map-end' into new-bufcache-wipGravatar ReinUsesLisp2021-02-131-0/+2
| | |
* | | vk_staging_buffer_pool: Get a staging buffer instead of waitingGravatar ReinUsesLisp2021-02-132-9/+18
| | | | | | | | | | | | | | | | | | 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.
* | | yuzu/config: Disable assembly shaders by defaultGravatar ReinUsesLisp2021-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | 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.
* | | renderer_opengl: Remove interopGravatar ReinUsesLisp2021-02-138-122/+10
| | | | | | | | | | | | Remove unused interop code from the OpenGL backend.
* | | gl_buffer_cache: Drop interop based parameter buffer workaroundsGravatar ReinUsesLisp2021-02-133-65/+45
| | | | | | | | | | | | | | | Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
* | | buffer_cache: Heuristically detect stream buffersGravatar ReinUsesLisp2021-02-132-6/+33
| | | | | | | | | | | | | | | | | | | | | 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.
* | | buffer_cache: Split CreateBuffer in separate functionsGravatar ReinUsesLisp2021-02-131-29/+52
| | | | | | | | | | | | | | | Allow adding functionality to each function without making CreateBuffer more complex.
* | | buffer_cache: Skip cache on small uploads on VulkanGravatar ReinUsesLisp2021-02-133-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | vk_staging_buffer_pool: Add stream buffer for small uploadsGravatar ReinUsesLisp2021-02-1315-127/+298
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | vulkan_device: Enable robustBufferAccessGravatar ReinUsesLisp2021-02-131-1/+2
| | | | | | | | | | | | | | | Fix regression on Pascal on Animal Crossing: New Horizons, fixing a validation error.
* | | video_core: Reimplement the buffer cacheGravatar ReinUsesLisp2021-02-1367-2607/+2514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | vulkan_common: Expose interop and headless devicesGravatar ReinUsesLisp2021-02-134-21/+100
| | |
* | | vulkan_common: Make interop extensions mandatoryGravatar ReinUsesLisp2021-02-131-0/+6
| | |
* | | vulkan_device: Enable robust buffersGravatar ReinUsesLisp2021-02-131-2/+4
| | |
* | | vulkan_device: Use designated initializers for featuresGravatar ReinUsesLisp2021-02-131-60/+59
| | |
* | | vulkan_wrapper: Add memory barrier pipeline barrier helperGravatar ReinUsesLisp2021-02-131-0/+6
| | |
* | | vulkan_device: Fix formatting of constantsGravatar ReinUsesLisp2021-02-131-10/+6
| | |
* | | vulkan_wrapper: Add interop functionsGravatar ReinUsesLisp2021-02-132-1/+41
| | |
* | | vulkan_instance: Initialize Vulkan instance in a separate threadGravatar ReinUsesLisp2021-02-131-1/+5
| | | | | | | | | | | | | | | | | | | | | 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.
* | | vulkan_wrapper: Pull Windows symbolsGravatar ReinUsesLisp2021-02-132-0/+14
| | |
* | | gpu: Report renderer errors with exceptionsGravatar ReinUsesLisp2021-02-1327-232/+176
| | | | | | | | | | | | | | | | | | 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.
* | | tests/buffer_base: Add cached CPU writes testsGravatar ReinUsesLisp2021-02-131-0/+76
| | | | | | | | | | | | Ensure the behavior of the previous commit in tests.
* | | buffer_base: Add support for cached CPU writesGravatar ReinUsesLisp2021-02-131-61/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | kernel: More accurately reserve and release resourcesGravatar ameerj2021-02-126-14/+42
| | |
* | | kernel: KScopedReservation implementationGravatar ameerj2021-02-126-26/+152
| | | | | | | | | | | | This implements KScopedReservation, allowing resource limit reservations to be more HW accurate, and release upon failure without requiring too many conditionals.
* | | kernel: Unify result codes (#5890)Gravatar Chloe2021-02-1221-256/+223
| |/ |/| | | | | | | | | | | | | | | * kernel: Unify result codes Drop the usage of ERR_NAME convention in kernel for ResultName. Removed seperation between svc_results.h & errors.h as we mainly include both most of the time anyways. * oops * rename errors to svc_results
* | Merge pull request #5902 from lioncash/core-warnGravatar bunnei2021-02-113-4/+7
|\ \ | | | | | | core: Silence various warnings on Clang 12
| * | bsd: Remove usage of optional emplace() with no argumentsGravatar Lioncash2021-02-091-2/+4
| | | | | | | | | | | | Clang 12 currently falls over in the face of this.
| * | am/controller: Remove [[fallthrough]] from unreachable pathGravatar Lioncash2021-02-091-1/+2
| | | | | | | | | | | | | | | Prevents warnings on clang 12. This path is reachable on other variations of the build that disable the unreachable macro.
| * | nfp: Correct uninitialized size being used within GetTagInfo()Gravatar Lioncash2021-02-091-1/+1
| | | | | | | | | | | | | | | We were previously the name of the object being initialized within its own initializer, which results in uninitialized data being read.
* | | Merge pull request #5869 from german77/mousePanningGravatar bunnei2021-02-1111-38/+149
|\ \ \ | | | | | | | | input_common: Add mouse panning
| * | | Add mouse panningGravatar german2021-02-0711-38/+149
| | | |
* | | | software_keyboard: Implement Finalize request commandGravatar Morph2021-02-101-0/+4
| | | |
* | | | Merge pull request #5893 from lioncash/inputGravatar bunnei2021-02-102-113/+131
|\ \ \ \ | | | | | | | | | | configure_input_player_widget: Minor cleanup