summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_texture_cache.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Refactor AccelerateDMA codeameerj2023-03-071-0/+6
|
* remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistencyarades792023-02-141-1/+1
| | | | Signed-off-by: arades79 <scravers@protonmail.com>
* texture_cache: OpenGL: Implement MSAA uploads and copiesameerj2023-02-111-0/+7
|
* Texture Cache: Implement async texture downloads.Fernando Sahmkow2023-01-041-1/+5
|
* video_core: don't build ASTC decoder shader unless requestedLiam2022-10-201-4/+7
|
* Vulkan Texture Cache: Limit render area to the max width/height of the targets.Fernando Sahmkow2022-10-061-2/+3
|
* video_core: Replace VKScheduler with Schedulergerman772022-06-271-4/+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.
* Garbage Collection: Redesign the algorithm to do a better use of memory.Fernando Sahmkow2022-03-251-0/+4
|
* Merge pull request #7624 from ameerj/intel-msaa-scaleFernando S2022-01-031-0/+2
|\ | | | | vk_texture_cache: Use 3D scale helpers for MSAA texture scaling on Intel Windows drivers
| * vk_texture_cache: Use 3D scale helpers for MSAA texture scaling on Intel Windows driversameerj2021-12-241-0/+2
| | | | | | | | Fixes a crash when scaling MSAA textures in titles such as Sonic Colors Ultimate.
* | vk_texture_cache: Fix invalidated pointer accessameerj2021-12-241-1/+4
|/ | | | | The vulkan ImageView held a reference to its source image for rescale status checking. This pointer is sometimes invalidated when the texture cache slot_images container is resized. To avoid an invalid pointer dereference, the ImageView now holds a reference to the container itself.
* blit_image: Refactor upscale factors usageameerj2021-12-051-3/+3
| | | | The image view itself can be queried to see if it is being rescaled or not, removing the need to pass the upscale/down shift factors from the texture cache.
* vk_texture_cache: Add a function to ImageView to check if src image is rescaledameerj2021-12-051-0/+6
|
* TextureCache: Simplify blitting of D24S8 formats and fix bugs.Fernando Sahmkow2021-11-221-0/+3
|
* TextureCache: Implement buffer copies on Vulkan.Fernando Sahmkow2021-11-201-1/+10
|
* texture_cache: Use pixel format conversion when supported by the runtimeameerj2021-11-171-0/+1
|
* TextureCache: Fix OGL cleaningFernando Sahmkow2021-11-171-0/+16
|
* vk_texture_cache: Refactor 3D scaling helpersameerj2021-11-161-0/+2
|
* Texture Cache: fix memory managment and optimize scaled downloads, uploads.Fernando Sahmkow2021-11-161-2/+2
|
* Texture Cache: Fix downscaling and correct memory comsumption.Fernando Sahmkow2021-11-161-0/+3
|
* Texture Cache: Rescale conversions between depth and colorFernandoS272021-11-161-1/+1
|
* vk_texture_cache: Use 3D to scale images when blit is unsupportedameerj2021-11-161-1/+10
|
* video_core: Misc resolution scaling related refactoringameerj2021-11-161-2/+5
|
* vk_texture_cache: Simplify scaled image managementameerj2021-11-161-20/+10
|
* vk_texture_cache: Minor cleanupameerj2021-11-161-1/+0
|
* texture_cache: Simplify image view queries and blacklistingReinUsesLisp2021-11-161-16/+25
|
* Texture Cache: Implement Vulkan UpScaling & DownScalingFernando Sahmkow2021-11-161-3/+7
|
* VideoCore: Initial Setup for the Resolution Scaler.Fernando Sahmkow2021-11-161-0/+19
|
* gpu: Migrate implementation to the cpp fileameerj2021-10-031-1/+1
|
* vk_rasterizer: Only clear depth and stencil buffers when set in attachment aspect maskameerj2021-08-211-0/+14
| | | | Silences validation errors for clearing the depth/stencil buffers of framebuffer attachments that were not specified to have depth/stencil usage.
* texture_cache: Address ameerj's reviewyzct123452021-08-051-1/+1
|
* shader: Implement SULD and SUSTReinUsesLisp2021-07-231-9/+14
|
* shader: Interact texture buffers with buffer cacheReinUsesLisp2021-07-231-15/+15
|
* shader: Add partial rasterizer integrationReinUsesLisp2021-07-231-27/+2
|
* Reaper: Guarantee correct deletion.Fernando Sahmkow2021-06-201-0/+8
|
* Reaper: Change memory restrictions on TC depending on host memory on VK.Fernando Sahmkow2021-06-171-0/+3
|
* texture_cache: Handle out of bound texture blitsameerj2021-05-081-3/+2
| | | | 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.
* astc_decoder: Reimplement LayersRodrigo Locatti2021-03-131-4/+9
| | | | Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
* renderer_vulkan: Accelerate ASTC decodingameerj2021-03-131-3/+9
| | | | Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
* texture_cache: Blacklist BGRA8 copies and views on OpenGLameerj2021-03-041-0/+5
| | | | | | 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.
* vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp2021-02-131-5/+4
| | | | | | | | 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.
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Silence -Wmissing-field-initializers warningsReinUsesLisp2021-01-241-1/+1
|
* vk_texture_cache: Use Download memory types for texture flushesReinUsesLisp2021-01-151-4/+1
| | | | Use the Download memory type where it matters.
* vulkan_common: Move allocator to the common directoryReinUsesLisp2021-01-151-1/+1
| | | | Allow using the abstraction from the OpenGL backend.
* renderer_vulkan: Rename Vulkan memory manager to memory allocatorReinUsesLisp2021-01-151-1/+1
| | | | | "Memory manager" collides with the guest GPU memory manager, and a memory allocator sounds closer to what the abstraction aims to be.
* vk_memory_manager: Improve memory manager and its APIReinUsesLisp2021-01-151-7/+6
| | | | | | | | | Fix a bug where the memory allocator could leave gaps between commits. To fix this the allocation algorithm was reworked, although it's still short in number of lines of code. Rework the allocation API to self-contained movable objects instead of naively using an unique_ptr to do the job for us. Remove the VK prefix.
* Merge pull request #5288 from ReinUsesLisp/workaround-garbageMorph2021-01-061-0/+5
|\ | | | | gl_texture_cache: Avoid format views on Intel and AMD
| * gl_texture_cache: Avoid format views on Intel and AMDReinUsesLisp2021-01-041-0/+5
| | | | | | | | | | | | | | 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.
* | renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp2021-01-031-3/+3
|/ | | | | | | The "VK" prefix predates the "Vulkan" namespace. It was carried around the codebase for consistency. "VKDevice" currently is a bad alias with "VkDevice" (only an upcase character of difference) that can cause confusion. Rename all instances of it.
* vulkan_common: Rename renderer_vulkan/wrapper.h to vulkan_common/vulkan_wrapper.hReinUsesLisp2020-12-311-1/+1
| | | | Allows sharing Vulkan wrapper code between different rendering backends.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-140/+188
| | | | | | | | | | | | | | 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.
* Merge pull request #5152 from comex/xx-overrideLC2020-12-071-1/+1
|\ | | | | renderer_vulkan: Add missing `override` specifier
| * renderer_vulkan: Add missing `override` specifiercomex2020-12-071-1/+1
| |
* | video_core: Resolve more variable shadowing scenarios pt.3Lioncash2020-12-051-4/+5
|/ | | | | Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
* video_core: Resolve more variable shadowing scenarios pt.2Lioncash2020-12-051-9/+9
| | | | | | | Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
* renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp2020-09-191-10/+5
| | | | | | | | | | | | | | | | | | | | | | | This reworks how host<->device synchronization works on the Vulkan backend. Instead of "protecting" resources with a fence and signalling these as free when the fence is known to be signalled by the host GPU, use timeline semaphores. Vulkan timeline semaphores allow use to work on a subset of D3D12 fences. As far as we are concerned, timeline semaphores are a value set by the host or the device that can be waited by either of them. Taking advantange of this, we can have a monolithically increasing atomic value for each submission to the graphics queue. Instead of protecting resources with a fence, we simply store the current logical tick (the atomic value stored in CPU memory). When we want to know if a resource is free, it can be compared to the current GPU tick. This greatly simplifies resource management code and the free status of resources should have less false negatives. To workaround bugs in validation layers, when these are attached there's a thread waiting for timeline semaphores.
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-10/+6
| | | | | | | | | 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.
* texture_cache: Implement rendering to 3D texturesReinUsesLisp2020-06-081-21/+12
| | | | | | | | | | | | | | This allows rendering to 3D textures with more than one slice. Applications are allowed to render to more than one slice of a texture using gl_Layer from a VTG shader. This also requires reworking how 3D texture collisions are handled, for now, this commit allows rendering to slices but not to miplevels. When a render target attempts to write to a mipmap, we fallback to the previous implementation (copying or flushing as needed). - Fixes color correction 3D textures on UE4 games (rainbow effects). - Allows Xenoblade games to render to 3D textures directly.
* vulkan: Remove unnecessary includesLioncash2020-04-291-6/+0
| | | | | | | Reduces some header churn and reduces rebuilds when some header internals change. While we're at it we can also resolve a missing include in buffer_cache.
* renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-111-32/+32
|
* texture_cache: Implement layered framebuffer attachmentsReinUsesLisp2020-02-161-0/+4
| | | | | | Layered framebuffer attachments is a feature that allows applications to write attach layered textures to a single attachment. What layer the fragments are written to is decided from the shader using gl_Layer.
* vk_texture_cache: Address feedbackReinUsesLisp2020-01-161-9/+4
|
* vk_texture_cache: Implement generic texture cache on VulkanReinUsesLisp2020-01-141-0/+244
It currently ignores PBO linearizations since these should be dropped as soon as possible on OpenGL.