aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
AgeCommit message (Collapse)Author
2021-07-06Merge pull request #6497 from FernandoS27/scotty-doesnt-knowbunnei
GPU Memory Manager - Correct handling of non continuous backing memory.
2021-07-05Merge pull request #6537 from Morph1984/warningsbunnei
general: Enforce multiple warnings in MSVC
2021-07-04Texture Cache: Fix collision with multiple overlaps of the same sparse texture.Fernando Sahmkow
2021-07-04Texture Cache: Fix GCC & Clang.Fernando Sahmkow
2021-07-04Texture Cache: Address feedback.Fernando Sahmkow
2021-07-04Texture Cache: Improve accuracy of sparse texture detection.Fernando Sahmkow
2021-07-04Texture Cache: Initial Implementation of Sparse Textures.Fernando Sahmkow
2021-07-03TextureCache: Fix 1D to 2D overlapps.Fernando Sahmkow
2021-06-28video_core: Silence signed/unsigned mismatch warningsMorph
2021-06-26buffer_cache/texture_cache: Make GC functions privateReinUsesLisp
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 #6465 from FernandoS27/sex-on-the-beachMai M
GPU: Implement a garbage collector for GPU Caches (project Reaper+)
2021-06-22Reaper: Set minimum cleaning limit on OGL.Fernando Sahmkow
2021-06-20Reaper: Guarantee correct deletion.Fernando Sahmkow
2021-06-16Merge pull request #6469 from ReinUsesLisp/blit-view-compatAmeer J
texture_cache/util: Avoid relaxed image views on different bytes per block
2021-06-17Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow
2021-06-16Reaper: Address Feedback.Fernando Sahmkow
2021-06-16Reaper: Setup settings and final tuning.Fernando Sahmkow
2021-06-16Reaper: Tune it up to be an smart GC.Fernando Sahmkow
2021-06-16Initial Reaper SetupReinUsesLisp
WIP
2021-06-15textures: Reintroduce CPU ASTC decoderameerj
Users may want to fall back to the CPU ASTC texture decoder due to hangs and crashes that may be caused by keeping the GPU under compute heavy loads for extended periods of time. This is especially the case in games such as Astral Chain which make extensive use of ASTC textures.
2021-06-14texture_cache/util: Avoid relaxed image views on different bytes per pixelReinUsesLisp
Avoids API usage errors on UE4 titles leading to crashes.
2021-06-10Fix GCC undefined behavior sanitizer.Markus Wick
* Wrong alignment in u64 LOG_DEBUG -> memcpy. * Huge shift exponent in stride calculation for linear buffer, unused result -> skipped. * Large shift in buffer cache if word = 0, skip checking for set bits. Non of those were critical, so this should not change any behavior. At least with the assumption, that the last one used masking behavior, which always yield continuous_bits = 0.
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-04-19texture_cache/util: Fix src being used instead of dst within DeduceBlitImagesLioncash
This line can only ever be reached if src is null, so dereferencing it here is a logic bug that slipped through. Instead, we dereference dst instead which is guaranteed to be valid.
2021-04-14common: Move settings to common from core.bunnei
- Removes a dependency on core and input_common from common.
2021-04-12texure_cache/util: Resolve implicit sign conversions with std::reduceLioncash
Amends implicit sign conversions occurring with usages of std::reduce and also relocates it to its own utility function to reduce verbosity a little bit.
2021-03-25astc_decoder: Refactor for style and more efficient memory useameerj
2021-03-13renderer_vulkan: Accelerate ASTC decodingameerj
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
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-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-09texture_cache/util: Remove unused functionsLioncash
Silences a few warnings on clang 12.
2021-01-24video_core: Silence -Wmissing-field-initializers warningsReinUsesLisp
2021-01-17texture_cache/util: Resolve -Wsign-compare warningLioncash
Resolves a -Wsign-compare warning on Clang.
2021-01-15common/alignment: Rename AlignBits to AlignUpLog2ReinUsesLisp
AlignUpLog2 describes what the function does better than AlignBits.
2021-01-07texture_cache: Replace PAGE_SHIFT with PAGE_BITSMerryMage
PAGE_SHIFT is a #define in system headers that leaks into user code on some systems
2021-01-04gl_texture_cache: Avoid format views on Intel and AMDReinUsesLisp
Intel and AMD proprietary drivers are incapable of rendering to texture views of different formats than the original texture. Avoid creating these at a cache level. This will consume more memory, emulating them with copies.
2020-12-30video_core: Rewrite the texture cacheReinUsesLisp
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
2020-12-07video_core: Remove unnecessary enum class casting in logging messagesLioncash
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more. Reduces the line noise a bit.
2020-12-05video_core: Resolve more variable shadowing scenarios pt.3Lioncash
Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
2020-12-05video_core: Resolve more variable shadowing scenarios pt.2Lioncash
Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
2020-10-29General: Resolve a few missing initializer warningsLioncash
Resolves a few -Wmissing-initializer warnings.
2020-09-22General: Make use of std::nullopt where applicableLioncash
Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
2020-09-06video_core: Remove all Core::System references in rendererReinUsesLisp
Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
2020-08-07Merge pull request #4389 from ogniK5377/redundant-format-typebunnei
video_core: Remove redundant pixel format type
2020-07-29Merge pull request #4396 from lioncash/commabunnei
surface_params: Replace questionable usages of the comma operator with semicolons
2020-07-23Merge pull request #4394 from lioncash/unused6bunnei
video_core: Remove unused variables
2020-07-21surface_params: Make use of designated initializers where applicableLioncash
Provides a convenient way to avoid unnecessary zero initializing.
2020-07-21surface_params: Remove redundant assignmentLioncash
This is a redundant assignment that can be removed.