summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_resource_manager.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* chore: make yuzu REUSE compliantAndrea Pappacoda2022-07-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
* general: Replace NonCopyable struct with equivalentsLioncash2022-02-021-13/+37
|
* gl_shader_util: Move shader utility code to a separate fileReinUsesLisp2021-07-231-14/+0
|
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gl_shader_util: Use std::string_view instead of star pointerReinUsesLisp2020-08-241-1/+2
| | | | | This allows us passing any type of string and hinting the length of the string to the OpenGL driver.
* async shadersDavid Marcec2020-07-171-0/+6
|
* renderer_opengl: Add assembly program code pathsReinUsesLisp2020-05-191-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code required to use OpenGL assembly programs based on NV_gpu_program5. Decompilation for ARB programs is intended to be added in a follow up commit. This does **not** include ARB decompilation and it's not in an usable state. The intention behind assembly programs is to reduce shader stutter significantly on drivers supporting NV_gpu_program5 (and other required extensions). Currently only Nvidia's proprietary driver supports these extensions. Add a UI option hidden for now to avoid people enabling this option accidentally. This code path has some limitations that OpenGL compatibility doesn't have: - NV_shader_storage_buffer_object is limited to 16 entries for a single OpenGL context state (I don't know if this is an intended limitation, an specification issue or I am missing something). Currently causes issues on The Legend of Zelda: Link's Awakening. - NV_parameter_buffer_object can't bind buffers using an offset different to zero. The used workaround is to copy to a temporary buffer (this doesn't happen often so it's not an issue). On the other hand, it has the following advantages: - Shaders build a lot faster. - We have control over how floating point rounding is done over individual instructions (SPIR-V on Vulkan can't do this). - Operations on shared memory can be unsigned and signed. - Transform feedbacks are dynamic state (not yet implemented). - Parameter buffers (uniform buffers) are per stage, matching NVN and hardware's behavior. - The API to bind and create assembly programs makes sense, unlike ARB_separate_shader_objects.
* gl_state: Remove VAO cache and trackingReinUsesLisp2020-02-281-25/+0
|
* renderer_opengl: Add OGLRenderbuffer to resource/state management.bunnei2020-02-261-0/+25
|
* gl_resource_manager: Add managed query classReinUsesLisp2020-02-141-0/+25
|
* gl_resource_manager: Correct MakeStreamCopyFernando Sahmkow2019-06-251-1/+1
|
* gl_texture_cache: Use Stream Buffers instead of Persistant for Buffer Copies.Fernando Sahmkow2019-06-211-1/+1
|
* texture_cache: Implement Buffer Copy and detect Turing GPUs Image CopiesFernando Sahmkow2019-06-211-0/+3
|
* Add OGLTextureViewFernando Sahmkow2019-06-211-0/+25
|
* gl_shader_util: Add parameter to handle retrievable programsReinUsesLisp2019-02-071-3/+3
|
* gl_rasterizer: Use DSA for texturesReinUsesLisp2019-01-301-1/+1
|
* gl_resource_manager: Split implementations in .cpp file.Markus Wick2018-11-061-114/+18
| | | | | Those implementations are quite costly, so there is no need to inline them to the caller. Ressource deletion is often a performance bug, so in this way, we support to add breakpoints to them.
* renderer_opengl: Namespace OpenGL codeLioncash2018-08-221-0/+4
| | | | | | | Namespaces all OpenGL code under the OpenGL namespace. Prevents polluting the global namespace and allows clear distinction between other renderers' code in the future.
* gl_state: Fix state management for texture swizzle.bunnei2018-06-261-1/+1
|
* gl_resource_manager: Add missing noexcept specifiers to move constructors and assignment operatorsLioncash2018-04-211-20/+19
| | | | | | | | Standard library containers may use std::move_if_noexcept to perform move operations. If a move cannot be performed under these circumstances, then a copy is attempted. Given we only intend for these types to be move-only this can be somewhat problematic. By defining these to be noexcept we prevent cases where copies may be attempted.
* shaders: Fix GCC and clang build issues.bunnei2018-04-141-1/+1
|
* gl_resource_manager: Grab latest upstream.bunnei2018-04-141-30/+86
|
* gl_resource_manager: Sync latest version with Citra.bunnei2018-03-201-8/+77
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-3/+0
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-30/+84
|
* renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups.bunnei2015-10-221-1/+1
|
* OpenGL: Add support for Sampler Objects to state trackerYuri Kunde Schlesner2015-09-031-0/+24
|
* Replace the previous OpenGL loader with a glad-generated 3.3 oneYuri Kunde Schlesner2015-08-301-1/+2
| | | | | | The main advantage of switching to glad from glLoadGen is that, apart from being actively maintained, it supports a customizable entrypoint loader function, which makes it possible to also support OpenGL ES.
* OpenGL: Fix state tracking in situations with reused object handlesYuri Kunde Schlesner2015-08-061-0/+6
| | | | | | | | | | | | If an OpenGL object is created, bound to a binding using the state tracker, and then destroyed, a newly created object can be assigned the same numeric handle by OpenGL. However, even though it is a new object, and thus needs to be bound to the binding again, the state tracker compared the current and previous handles and concluded that no change needed to be made, leading to failure to bind objects in certain cases. This manifested as broken text in VVVVVV, which this commit fixes along with similar texturing problems in other games.
* OpenGL: Make OpenGL object resource wrappers fully inlineYuri Kunde Schlesner2015-07-261-31/+79
| | | | | The functions are so simple that having them separate only bloats the code and hinders optimization.
* OpenGL renderertfarley2015-05-231-0/+79