summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_buffer_cache.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Vulkan, OpenGL: Hook up storage buffer alignment codeBilly Laws2023-01-051-0/+4
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* GC: Address Feedback.Fernando Sahmkow2022-03-251-3/+3
|
* Buffer Cache: Tune to the levels of the new GC.Fernando Sahmkow2022-03-251-0/+12
|
* video_core: Reduce unused includesameerj2022-03-191-2/+0
|
* buffer_cache: Fix copy based uniform bindings trackingReinUsesLisp2021-07-231-5/+7
|
* glasm: Use storage buffers instead of global memory when possibleReinUsesLisp2021-07-231-0/+6
|
* shader: Initial OpenGL implementationReinUsesLisp2021-07-231-3/+37
|
* shader: Interact texture buffers with buffer cacheReinUsesLisp2021-07-231-0/+1
|
* DMAEngine: Accelerate BufferClearFernando Sahmkow2021-07-131-0/+2
|
* renderer_opengl: Remove interopReinUsesLisp2021-02-131-11/+1
| | | | Remove unused interop code from the OpenGL backend.
* gl_buffer_cache: Drop interop based parameter buffer workaroundsReinUsesLisp2021-02-131-10/+10
| | | | | Sacrify runtime performance to avoid generating kernel exceptions on Windows due to our abusive aliasing of interop buffer objects.
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-40/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-3/+5
| | | | | | | | | | | | | | 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.
* video_core: Resolve more variable shadowing scenarios pt.3Lioncash2020-12-051-7/+7
| | | | | Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-1/+2
| | | | | | | | | 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.
* gl_buffer_cache: Copy to buffers created as STREAM_READ before downloadingReinUsesLisp2020-06-261-3/+4
| | | | | | | | After marking buffers as resident, Nvidia's driver seems to take a slow path. To workaround this issue, copy to a STREAM_READ buffer and then call GetNamedBufferSubData on it. This is a temporary solution until we have asynchronous flushing.
* buffer_cache: Use buffer methods instead of cache virtual methodsReinUsesLisp2020-06-241-9/+7
|
* gl_buffer_cache: Mark buffers as residentReinUsesLisp2020-06-241-6/+14
| | | | | | Make stream buffer and cached buffers as resident and query their address. This allows us to use GPU addresses for several proprietary Nvidia extensions.
* Merge pull request #4066 from ReinUsesLisp/shared-ptr-bufRodrigo Locatti2020-06-161-12/+6
|\ | | | | buffer_cache: Avoid passing references of shared pointers and misc style changes
| * buffer_cache: Avoid passing references of shared pointers and misc style changesReinUsesLisp2020-06-091-12/+6
| | | | | | | | | | | | | | | | | | Instead of using as template argument a shared pointer, use the underlying type and manage shared pointers explicitly. This can make removing shared pointers from the cache more easy. While we are at it, make some misc style changes and general improvements (like insert_or_assign instead of operator[] + operator=).
* | rasterizer_cache: Remove files and includesReinUsesLisp2020-06-071-1/+0
|/ | | | | The rasterizer cache is no longer used. Each cache has its own generic implementation optimized for the cached data.
* {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp2020-04-281-2/+0
| | | | | | | | | | | | | Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
* buffer_cache: Return handles instead of pointer to handlesReinUsesLisp2020-04-161-6/+6
| | | | | | | | | | | The original idea of returning pointers is that handles can be moved. The problem is that the implementation didn't take that in mind and made everything harder to work with. This commit drops pointer to handles and returns the handles themselves. While it is still true that handles can be invalidated, this way we get an old handle instead of a dangling pointer. This problem can be solved in the future with sparse buffers.
* Buffer Cache: Use vAddr instead of physical memory.Fernando Sahmkow2020-04-061-2/+2
|
* gl_rasterizer: Upload constant buffers with glNamedBufferSubDataReinUsesLisp2019-11-021-2/+18
| | | | | | | | | | | | | | | | Nvidia's OpenGL driver maps gl(Named)BufferSubData with some requirements to a fast. This path has an extra memcpy but updates the buffer without orphaning or waiting for previous calls. It can be seen as a better model for "push constants" that can upload a whole UBO instead of 256 bytes. This path has some requirements established here: http://on-demand.gputechconf.com/gtc/2014/presentations/S4379-opengl-44-scene-rendering-techniques.pdf#page=24 Instead of using the stream buffer, this commits moves constant buffers uploads to calls of glNamedBufferSubData and from my testing it brings a performance improvement. This is disabled when the vendor is not Nvidia since it brings performance regressions.
* Buffer Cache: Adress Feedback.Fernando Sahmkow2019-08-211-3/+3
|
* Video_Core: Implement a new Buffer CacheFernando Sahmkow2019-08-211-7/+26
|
* gl_rasterizer: Fix nullptr dereference on disabled buffersReinUsesLisp2019-07-061-2/+2
|
* gl_buffer_cache: Implement with generic buffer cacheReinUsesLisp2019-07-061-101/+14
|
* gl_buffer_cache: Remove global system gettersReinUsesLisp2019-07-061-1/+7
|
* gl_buffer_cache: Implement flushingReinUsesLisp2019-07-061-1/+6
|
* gl_rasterizer: Drop gl_global_cache in favor of gl_buffer_cacheReinUsesLisp2019-07-061-2/+2
|
* gl_buffer_cache: Rework to support internalized buffersReinUsesLisp2019-07-061-18/+52
|
* gl_buffer_cache: Store in CachedBufferEntry the used buffer handleReinUsesLisp2019-07-061-7/+13
|
* gl_buffer_cache: Return used buffer from Upload functionReinUsesLisp2019-07-061-8/+8
|
* gl_buffer_cache: Remove unused ReserveMemory methodReinUsesLisp2019-05-301-3/+0
|
* RasterizerCache Redesign: Flush Fernando Sahmkow2019-04-201-3/+3
| | | | | | flushing is now responsability of children caches instead of the cache object. This change will allow the specific cache to pass extra parameters on flushing and will allow more flexibility.
* gpu: Move GPUVAddr definition to common_types.bunnei2019-03-211-1/+1
|
* gpu: Use host address for caching instead of guest address.bunnei2019-03-151-7/+24
|
* gl_rasterizer: Skip VB upload if the state is clean.Markus Wick2018-11-171-1/+1
|
* rasterizer_cache: Remove reliance on the System singletonLioncash2018-11-081-1/+3
| | | | | | Rather than have a transparent dependency, we can make it explicit in the interface. This also gets rid of the need to put the core include in a header.
* rasterizer_cache: Refactor to support in-order flushing.bunnei2018-10-161-4/+4
|
* rasterizer_cache: Reintroduce method for flushing.bunnei2018-10-161-0/+3
|
* gl_rasterizer: Implement quads topologyReinUsesLisp2018-10-041-0/+7
|
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-8/+8
|
* gl_buffer_cache: Default initialize member variablesLioncash2018-09-061-3/+3
| | | | Ensures that the cache always has a deterministic initial state.
* gl_buffer_cache: Make GetHandle() a const member functionLioncash2018-09-061-1/+1
| | | | | GetHandle() internally calls GetHandle() on the stream_buffer instance, which is a const member function, so this can be made const as well.
* gl_buffer_cache: Remove unnecessary includesLioncash2018-09-061-1/+1
|
* gl_buffer_cache: Make constructor explicitLioncash2018-09-061-1/+1
| | | | Implicit conversions during construction isn't desirable here.
* renderer_opengl: Implement a buffer cache.Markus Wick2018-09-051-0/+57
The idea of this cache is to avoid redundant uploads. So we are going to cache the uploaded buffers within the stream_buffer and just reuse the old pointers. The next step is to implement a VBO cache on GPU memory, but for now, I want to check the overhead of the cache management. Fetching the buffer over PCI-E should be quite fast.