Commit Graph

17316 Commits (9ca5e52f0713bf394cae09fdd522133227860a94)
 

Author SHA1 Message Date
ReinUsesLisp 35df1d1864 vk_staging_buffer_pool: Add stream buffer for small uploads
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.
4 years ago
ReinUsesLisp 8fd518ec40 vulkan_device: Enable robustBufferAccess
Fix regression on Pascal on Animal Crossing: New Horizons, fixing a
validation error.
4 years ago
ReinUsesLisp 82c2601555 video_core: Reimplement the buffer cache
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.
4 years ago
ReinUsesLisp a39d9c5194 vulkan_common: Expose interop and headless devices 4 years ago
ReinUsesLisp 47d5ec6cfc vulkan_common: Make interop extensions mandatory 4 years ago
ReinUsesLisp 40ed0cb920 vulkan_device: Enable robust buffers 4 years ago
ReinUsesLisp 1a987054c5 vulkan_device: Use designated initializers for features 4 years ago
ReinUsesLisp 79afdeaf08 vulkan_wrapper: Add memory barrier pipeline barrier helper 4 years ago
ReinUsesLisp 004a8d6a7a vulkan_device: Fix formatting of constants 4 years ago
ReinUsesLisp 16f97ded21 vulkan_wrapper: Add interop functions 4 years ago
ReinUsesLisp 9735c34f5d vulkan_instance: Initialize Vulkan instance in a separate thread
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.
4 years ago
ReinUsesLisp dde19e7d75 vulkan_wrapper: Pull Windows symbols 4 years ago
ReinUsesLisp 75ccd9959c gpu: Report renderer errors with exceptions
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.
4 years ago
ReinUsesLisp 19156292a3 tests/buffer_base: Add cached CPU writes tests
Ensure the behavior of the previous commit in tests.
4 years ago
ReinUsesLisp 9d8ca6cc4a buffer_base: Add support for cached CPU writes
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.
4 years ago
ameerj 069afcc633 maxwell_to_gl: Remove unused code
Removes unused declarations in maxwell_to_gl.h
4 years ago
Chloe Marcec 7ad63ea542 revert to std::sin and std::cos 4 years ago
Chloe Marcec d28b942458 address issues 4 years ago
Chloe Marcec 4a7fd91857 audren: Implement I3dl2Reverb
Most notable fix is the voices in Fire Emblem Three Houses
4 years ago
bunnei c86d770af9
Merge pull request #5877 from ameerj/res-limit-usage
kernel: More accurately utilize resource_limit
4 years ago
ameerj ec9b6641b1 kernel: More accurately reserve and release resources 4 years ago
ameerj 5fa6b15215 kernel: KScopedReservation implementation
This implements KScopedReservation, allowing resource limit reservations to be more HW accurate, and release upon failure without requiring too many conditionals.
4 years ago
Chloe 37939482fb
kernel: Unify result codes (#5890)
* 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
4 years ago
lat9nq dcc0617cc2 yuzu: Create screenshot path before capture
Allows screenshots in cases where the screenshots path doesn't already
exist.
4 years ago
bunnei a0379c2db5
Merge pull request #5902 from lioncash/core-warn
core: Silence various warnings on Clang 12
4 years ago
bunnei e53b6ecc76
Merge pull request #5869 from german77/mousePanning
input_common: Add mouse panning
4 years ago
bunnei f06c3f4907
Merge pull request #5908 from Morph1984/swkbd-finalize
software_keyboard: Implement Finalize request command
4 years ago
Morph 886043a6d2 software_keyboard: Implement Finalize request command 4 years ago
bunnei 3e6e0d8f13
Merge pull request #5893 from lioncash/input
configure_input_player_widget: Minor cleanup
4 years ago
LC dee133ab3d
Merge pull request #5904 from lat9nq/common-sized-dealloc
common: Add -fsized-deallocation as a Clang flag
4 years ago
LC 3c22ce035b
Merge pull request #5905 from lat9nq/core-sized-dealloc
core: Add -fsized-dealloction as a Clang flag
4 years ago
LC a5e184e948
Merge pull request #5903 from lat9nq/config-silence-warns
configure_input_player_widget: Silence unused variable warnings
4 years ago
lat9nq 0e004269a9 configure_input_player_widget: Silence unused variable warnings
Prevents clang 11 from throwing an error since these variables are
unused.
4 years ago
lat9nq a58086ae0d common: Add -fsized-deallocation as a Clang flag
Prevents an operator delete error when compiling with Clang 11.
4 years ago
lat9nq 68f718943e core: Add -fsized-dealloction as a Clang flag
Prevents a operator delete error when compiling with Clang 11.
4 years ago
Ameer J 70db238f80
Merge pull request #5901 from lioncash/input-warn
udp: Silence warnings on Clang 12
4 years ago
bunnei 245d60bfff
Merge pull request #5900 from lioncash/unused-func
video_core: Remove unused functions and variables
4 years ago
Lioncash 0cd40fb523 bsd: Remove usage of optional emplace() with no arguments
Clang 12 currently falls over in the face of this.
4 years ago
Lioncash 1dab8acf5f am/controller: Remove [[fallthrough]] from unreachable path
Prevents warnings on clang 12. This path is reachable on other
variations of the build that disable the unreachable macro.
4 years ago
Lioncash d64ba58759 nfp: Correct uninitialized size being used within GetTagInfo()
We were previously the name of the object being initialized within its
own initializer, which results in uninitialized data being read.
4 years ago
Lioncash a352f34462 udp: Silence unused member variable warnings
Simply mark them as unused for now.
4 years ago
Lioncash cda24b8eb1 udp/client: Define ClientData constructor/destructor in cpp file
Prevents compilation errors on clang 12 due to incomplete types within a
unique_ptr member.
4 years ago
Lioncash 10636d2494 gl_rasterizer: Remove unused variables
Resolves warnings on clang 12
4 years ago
Lioncash 783dc9e112 texture_cache/util: Remove unused functions
Silences a few warnings on clang 12.
4 years ago
Lioncash 864762cac9 configure_input_player_widget: Reduce duplication of array accessors where applicable
Reduces the amount of code to read in expressions a little bit by
separating constituents out a little.
4 years ago
Lioncash 5c7c212f61 configure_input_player_widget: Avoid nontrivial copies where applicable
Previously a function was copying an array of 20 std::string instances
by value.
4 years ago
german bcd4e4f650 Use GC image 4 years ago
Jatoxo 2e32ab4e0b
Settings: Add depth to Joysticks on Pro Controller preview (#5894)
* Add some depth to ProJoysticks

* address comments

* clang

* address nits

* fix wrong inner_offset when offset.x was 0
4 years ago
Morph b6736db324
Merge pull request #5899 from ameerj/ffmpeg-revert
cmake: Revert FFmpeg 4.3.1 update for Windows builds
4 years ago
ameerj d6ebb5c171 cmake: Revert FFmpeg 4.3.1 update for Windows builds
The new 4.3.1 externals build seems to not be compatible with yuzu. This also fixes an oversight when renaming CMake variables.
4 years ago