summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_rasterizer.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-01-31video_core: simplify accelerated surface fetch and crop handling between APIsLiam1-7/+7
2024-01-19Core: Clang format and other small issues.Fernando Sahmkow1-3/+2
2024-01-19SMMU: Initial adaptation to video_core.Fernando Sahmkow1-16/+22
2023-11-10Revert "renderer_vulkan: add locks to avoid scheduler flushes from CPU"Fernando Sahmkow1-4/+0
This reverts commit d9dde7e6f3a90f58d642808900ddd558da21f762.
2023-10-17renderer_vulkan: add locks to avoid scheduler flushes from CPULiam1-0/+4
2023-09-23Query Cache: address issuesFernando Sahmkow1-1/+2
2023-09-23Query Cachge: Fully rework Vulkan's query cacheFernando Sahmkow1-7/+6
2023-08-02vulkan: centralize configAlexandre Bouvier1-1/+2
2023-06-28Memory Tracking: Optimize tracking to only use atomic writes when contested with the host GPUFernando Sahmkow1-1/+2
2023-05-10renderer_vulkan: separate guest and host compute descriptor queuesLiam1-1/+2
2023-05-07GPU: Add Reactive flushingFernando Sahmkow1-0/+1
2023-03-07Refactor AccelerateDMA codeameerj1-0/+5
2023-03-05Engines: Implement Accelerate DMA Texture.Fernando Sahmkow1-1/+10
2023-01-05video_core: Cache GPU internal writes.Fernando Sahmkow1-0/+1
2023-01-05video_core: Implement opengl/vulkan draw_textureFeng Chen1-0/+1
2023-01-01MacroHLE: Final cleanup and fixes.Fernando Sahmkow1-2/+1
2023-01-01Rasterizer: Setup skeleton for Host Conditional renderingFernando Sahmkow1-0/+1
2023-01-01RasterizerMemory: Add filtering for flushing/invalidation operations.Fernando Sahmkow1-4/+9
2023-01-01Vulkan: Implement Dynamic State 3Fernando Sahmkow1-0/+3
2023-01-01Vulkan Implement Dynamic State 2 LogicOp and PatchVerticesFernando Sahmkow1-0/+1
2023-01-01Vulkan: Implement Dynamic States 2Fernando Sahmkow1-0/+3
2023-01-01MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect.Fernando Sahmkow1-1/+1
2023-01-01MacroHLE: Add MultidrawIndirect HLE Macro.Fernando Sahmkow1-0/+4
2022-11-17maxwell3d: full HLE for multi-layer clearsLiam1-1/+1
2022-11-15video_core: Reimplement inline index buffer bindingFeng Chen1-2/+0
2022-10-22video_core: Implement maxwell inline_index methodFengChen1-0/+2
2022-10-21video_coare: Reimplementing the maxwell drawing trigger mechanismFengChen1-1/+1
2022-10-20video_core: don't build ASTC decoder shader unless requestedLiam1-1/+0
2022-10-06DMA & InlineToMemory Engines Rework.bunnei1-1/+1
2022-10-06VideoCore: Refactor fencing system.Fernando Sahmkow1-2/+3
2022-10-06Texture cache: Fix the remaining issues with memory mnagement and unmapping.Fernando Sahmkow1-1/+1
2022-10-06VideoCore: implement channels on gpu caches.Fernando Sahmkow1-8/+12
2022-06-27video_core: Replace VKUpdateDescriptorQueue with UpdateDescriptorQueuegerman771-1/+1
2022-06-27video_core: Replace VKQueryCache with QueryCachegerman771-1/+1
2022-06-27video_core: Replace VKScheduler with Schedulergerman771-5/+5
2022-06-27video_core: Replace VKFenceManager with FenceManagergerman771-1/+1
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-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.
2022-03-19video_core: Reduce unused includesameerj1-6/+0
2022-02-01Rasterizer: Refactor inlineToMemory.Fernando Sahmkow1-1/+2
2022-01-29Rasterizer: Implement Inline2Memory Acceleration.Fernando Sahmkow1-0/+1
2021-07-23vk_graphics_pipeline: Implement line widthReinUsesLisp1-0/+1
2021-07-23vulkan: Add VK_EXT_vertex_input_dynamic_state supportReinUsesLisp1-0/+2
Reduces the number of total pipelines generated on Vulkan. Tested on Super Smash Bros. Ultimate.
2021-07-23vulkan: Rework descriptor allocation algorithmReinUsesLisp1-1/+1
Create multiple descriptor pools on demand. There are some degrees of freedom what is considered a compatible pool to avoid wasting large pools on small descriptors.
2021-07-23vk_pipeline_cache: Add pipeline cacheReinUsesLisp1-0/+2
2021-07-23shader: Add partial rasterizer integrationReinUsesLisp1-0/+2
2021-07-23shader: Primitive Vulkan integrationReinUsesLisp1-3/+0
2021-07-23shader: Remove old shader managementReinUsesLisp1-45/+2
2021-07-13DMAEngine: Accelerate BufferClearFernando Sahmkow1-0/+2
2021-07-12accelerateDMA: Fixes and feedback.Fernando Sahmkow1-4/+5
2021-07-11accelerateDMA: Accelerate Buffer Copies.Fernando Sahmkow1-0/+12
2021-07-09Fence Manager: Add fences on Reference Count.Fernando Sahmkow1-0/+1
2021-07-04Texture Cache: Initial Implementation of Sparse Textures.Fernando Sahmkow1-0/+1
2021-06-01buffer_cache: Simplify uniform disabling logicameerj1-0/+1
2021-03-13renderer_vulkan: Accelerate ASTC decodingameerj1-0/+1
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-02-13fixed_pipeline_cache: Use dirty flags to lazily update keyReinUsesLisp1-0/+3
Use dirty flags to avoid building pipeline key from scratch on each draw call. This saves a bit of unnecesary work on each draw call.
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp1-59/+5
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-01-15vulkan_common: Move allocator to the common directoryReinUsesLisp1-1/+1
Allow using the abstraction from the OpenGL backend.
2021-01-15renderer_vulkan: Rename Vulkan memory manager to memory allocatorReinUsesLisp1-2/+2
"Memory manager" collides with the guest GPU memory manager, and a memory allocator sounds closer to what the abstraction aims to be.
2021-01-15vk_memory_manager: Improve memory manager and its APIReinUsesLisp1-2/+2
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.
2021-01-03renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp1-2/+2
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.
2020-12-31vulkan_common: Rename renderer_vulkan/wrapper.h to vulkan_common/vulkan_wrapper.hReinUsesLisp1-1/+1
Allows sharing Vulkan wrapper code between different rendering backends.
2020-12-30video_core: Rewrite the texture cacheReinUsesLisp1-104/+27
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-05video_core: Resolve more variable shadowing scenarios pt.3Lioncash1-5/+5
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.2Lioncash1-5/+7
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-13vk_graphics_pipeline: Manage primitive topology as fixed stateReinUsesLisp1-1/+0
Vulkan has requirements for primitive topologies that don't play nicely with yuzu's. Since it's only 4 bits, we can move it to fixed state without changing the size of the pipeline key. - Fixes a regression on recent Nvidia drivers on Fire Emblem: Three Houses.
2020-09-19renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp1-4/+2
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.
2020-09-06video_core: Remove all Core::System references in rendererReinUsesLisp1-5/+8
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-16Address feedback. Bruteforce delete duplicatesameerj1-1/+1
2020-08-16Vk Async pipeline compilationameerj1-0/+10
2020-06-27vk_rasterizer: Use VK_EXT_extended_dynamic_stateReinUsesLisp1-0/+10
2020-06-27fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_stateReinUsesLisp1-2/+1
This moves dynamic state present in VK_EXT_extended_dynamic_state to a separate structure in FixedPipelineState. This is structure is at the bottom allowing us to hash and memcmp only when the extension is not supported.
2020-06-18vk_rasterizer: Don't preserve contents on full screen clearsReinUsesLisp1-1/+4
There's no need to load contents from the CPU when a clear resets all the contents of the underlying memory. This is already implemented on OpenGL and the texture cache.
2020-06-07vk_pipeline_cache: Use generic shader cacheReinUsesLisp1-1/+1
Trivial port the generic shader cache to Vulkan.
2020-06-02vk_rasterizer: Implement storage texelsReinUsesLisp1-4/+12
This is the equivalent of an image buffer on OpenGL. - Used by Octopath Traveler
2020-04-29vulkan: Remove unnecessary includesLioncash1-1/+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.
2020-04-28{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp1-0/+2
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).
2020-04-22vk_fence_manager: Initial implementationReinUsesLisp1-0/+2
2020-04-22FenceManager: Manage syncpoints and rename fences to semaphores.Fernando Sahmkow1-1/+2
2020-04-22Rasterizer: Document SignalFence & ReleaseFences and setup skeletons on Vulkan.Fernando Sahmkow1-0/+2
2020-04-22ThreadManager: Sync async reads on accurate gpu.Fernando Sahmkow1-0/+1
2020-04-22GPU: Refactor synchronization on Async GPUFernando Sahmkow1-0/+2
2020-04-22vk_rasterizer: Add lazy default buffer maker and use it for empty buffersReinUsesLisp1-0/+6
Introduce a default buffer getter that lazily constructs an empty buffer. This is intended to match OpenGL's buffer 0. Use this for disabled vertex and uniform buffers. While we are at it, include vertex buffer usages for staging buffers to silence validation errors.
2020-04-17vk_compute_pass: Implement indexed quadsReinUsesLisp1-0/+1
Implement indexed quads (GL_QUADS used with glDrawElements*) with a compute pass conversion. The compute shader converts from uint8/uint16/uint32 indices to uint32. The format is passed through push constants to avoid having different variants of the same shader. - Used by Fast RMX - Used by Xenoblade Chronicles 2 (it still has graphical due to synchronization issues on Vulkan)
2020-04-11renderer_vulkan: Drop Vulkan-HppReinUsesLisp1-8/+7
2020-04-06GPU: Setup Flush/Invalidate to use VAddr instead of CacheAddrFernando Sahmkow1-3/+3
2020-03-15vk_rasterizer: Reimplement clears with vkCmdClearAttachmentsReinUsesLisp1-0/+1
2020-03-13vk_rasterizer: Implement transform feedback binding zeroReinUsesLisp1-0/+4
2020-02-28vk_rasterizer: Pass Maxwell registers to dynamic updatesReinUsesLisp1-6/+6
2020-02-28vk_state_tracker: Initial implementationReinUsesLisp1-1/+4
Add support for render targets and viewports.
2020-02-16texture_cache: Implement layered framebuffer attachmentsReinUsesLisp1-2/+8
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.
2020-02-14maxwell_3d: Unify draw methodsReinUsesLisp1-4/+1
Pass instanced state of a draw invocation as an argument instead of having two separate virtual methods.
2020-02-14vk_query_cache: Implement generic query cache on VulkanReinUsesLisp1-1/+5
2020-01-18vk_rasterizer: Address feedbackReinUsesLisp1-3/+4
2020-01-17vk_rasterizer: Implement Vulkan's rasterizerReinUsesLisp1-1/+250
This abstraction is Vulkan's equivalent to OpenGL's rasterizer. It takes care of joining all parts of the backend and rendering accordingly on demand.
2020-01-07vk_rasterizer: Add placeholderReinUsesLisp1-0/+13