summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Vulkan: Implement Alpha coverageFernando Sahmkow2022-12-051-2/+2
|
* vulkan_common: clean up extension usageLiam2022-12-041-1/+1
|
* Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation regKelebek12022-11-111-0/+12
|
* video_core: Fix scaling graphical regressions for multiple gamesFengChen2022-11-051-4/+4
|
* video_core: Fix SNORM texture buffer emulating error (#9001)Feng Chen2022-11-041-2/+2
|
* Merge pull request #8858 from vonchenplus/mipmapbunnei2022-11-041-4/+20
|\ | | | | video_core: Generate mipmap texture by drawing
| * video_core: Generate mipmap texture by drawingFengChen2022-09-201-4/+20
| |
* | Update 3D regsKelebek12022-10-071-13/+1
| |
* | Shader Decompiler: Check for shift when deriving composite samplers.Fernando Sahmkow2022-10-061-2/+3
| |
* | VideoCore: Fix channels with disk pipeline/shader cache.Fernando Sahmkow2022-10-061-9/+8
|/
* renderer_vulkan: add format fallbacks for R16G16B16_SFLOAT, R16G16B16_SSCALED, R8G8B8_SSCALEDLiam2022-08-031-1/+1
|
* video_core: Replace VKUpdateDescriptorQueue with UpdateDescriptorQueuegerman772022-06-271-1/+1
|
* video_core: Replace VKScheduler with Schedulergerman772022-06-271-2/+2
|
* 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.
* video_core: Replace lock_guard with scoped_lockMerry2022-04-071-1/+1
|
* Vulkan: Fix the checks for primitive restart extension.Fernando Sahmkow2021-12-181-2/+5
|
* Vulkan: implement Logical Operations.Fernando Sahmkow2021-12-181-2/+2
|
* Vulkan: Implement VK_EXT_primitive_topology_list_restartFernando Sahmkow2021-12-181-2/+2
|
* vulkan: Fix rescaling push constant usageameerj2021-11-161-6/+9
|
* emit_spirv: Fix RescalingLayout alignmentameerj2021-11-161-2/+3
|
* emit_spirv: Fix RescalingLayout alignmentameerj2021-11-161-1/+1
|
* shader: Properly blacklist and scale image loadsReinUsesLisp2021-11-161-5/+9
|
* texture_cache: Simplify image view queries and blacklistingReinUsesLisp2021-11-161-41/+13
|
* Texture Cache: Implement Blacklisting.Fernando Sahmkow2021-11-161-1/+27
|
* vulkan: Implement rescaling shader patchingReinUsesLisp2021-11-161-4/+17
|
* vk_graphics_pipeline: Use Shader::NumDescriptors when possibleReinUsesLisp2021-11-161-18/+6
|
* vk_graphics_pipeline: Force patch list topology when tessellation is usedameerj2021-09-281-1/+10
| | | | Fixes a crash on some drivers when tessellation is used but the IA topology is not patch list.
* general: Update style to clang-format-12ameerj2021-09-241-2/+3
|
* renderer_vulkan: Add setting to log pipeline statisticsReinUsesLisp2021-07-281-4/+12
| | | | | | | | | | | | | | | | Use VK_KHR_pipeline_executable_properties when enabled and available to log statistics about the pipeline cache in a game. For example, this is on Turing GPUs when generating a pipeline cache from Super Smash Bros. Ultimate: Average pipeline statistics ========================================== Code size: 6433.167 Register count: 32.939 More advanced results could be presented, at the moment it's just an average of all 3D and compute pipelines.
* renderers: Fix clang formattingameerj2021-07-231-3/+2
|
* vk_graphics_pipeline: Implement smooth linesReinUsesLisp2021-07-231-0/+21
|
* vk_graphics_pipeline: Implement line widthReinUsesLisp2021-07-231-1/+2
|
* shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp2021-07-231-4/+2
| | | | | | Put all varyings into a single std::bitset with helpers to access it. Implement passthrough geometry shaders using host's.
* vk_graphics_pipeline: Implement conservative renderingReinUsesLisp2021-07-231-9/+24
|
* shader: Unify shader stage typesReinUsesLisp2021-07-231-1/+1
|
* vk_graphics_pipeline: Use VK_KHR_push_descriptor when availableReinUsesLisp2021-07-231-10/+18
| | | | ~51% faster on Nvidia compared to previous method.
* vk_graphics_pipeline: Fix path with no VK_EXT_extended_dynamic_stateRodrigo Locatti2021-07-231-1/+1
|
* vulkan: Add VK_EXT_vertex_input_dynamic_state supportReinUsesLisp2021-07-231-40/+67
| | | | | Reduces the number of total pipelines generated on Vulkan. Tested on Super Smash Bros. Ultimate.
* vulkan: Use VK_EXT_provoking_vertex when availableReinUsesLisp2021-07-231-1/+9
|
* vk_pipeline_cache,shader_notify: Add shader notificationsReinUsesLisp2021-07-231-13/+17
|
* buffer_cache: Reduce uniform buffer size from shader usageReinUsesLisp2021-07-231-5/+9
| | | | Increases performance significantly on certain titles.
* vulkan: Enable depth bounds and use it conditionallyReinUsesLisp2021-07-231-1/+4
| | | | Intel devices pre-Xe don't support this.
* buffer_cache: Mark uniform buffers as dirty if any enable bit changesReinUsesLisp2021-07-231-1/+5
|
* shader: Initial OpenGL implementationReinUsesLisp2021-07-231-10/+12
|
* vk_graphics_pipeline: Fix texture buffer descriptorsReinUsesLisp2021-07-231-7/+8
|
* vulkan: Defer descriptor set work to the Vulkan threadReinUsesLisp2021-07-231-21/+19
| | | | | | | Move descriptor lookup and update code to a separate thread. Delaying this removes work from the main GPU thread and allows creating descriptor layouts on another thread. This reduces a bit the workload of the main thread when new pipelines are encountered.
* vulkan: Rework descriptor allocation algorithmReinUsesLisp2021-07-231-2/+2
| | | | | | 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.
* vk_graphics_pipeline: Generate specialized pipeline config functions and improve codeReinUsesLisp2021-07-231-29/+210
|
* shader: Accelerate pipeline transitions and use dirty flags for shadersReinUsesLisp2021-07-231-21/+25
|
* vk_graphics_pipeline: Guard against non-tessellation pipelines using patchesReinUsesLisp2021-07-231-2/+8
|
* shader: Fix bugs and build issues on GCCRodrigo Locatti2021-07-231-1/+1
|
* shader: Fix render targets with null attachmentsReinUsesLisp2021-07-231-5/+13
|
* shader: Implement indexed texturesReinUsesLisp2021-07-231-25/+38
|
* shader: Implement D3D samplersReinUsesLisp2021-07-231-7/+18
|
* shader: Implement tessellation shaders, polygon mode and invocation idReinUsesLisp2021-07-231-1/+2
|
* spirv: Implement image buffersReinUsesLisp2021-07-231-12/+19
|
* shader: Implement SULD and SUSTReinUsesLisp2021-07-231-0/+4
|
* shader_recompiler,video_core: Cleanup some GCC and Clang errorslat9nq2021-07-231-10/+11
| | | | | | | | | | | | | | | | | Mostly fixing unused *, implicit conversion, braced scalar init, fpermissive, and some others. Some Clang errors likely remain in video_core, and std::ranges is still a pertinent issue in shader_recompiler shader_recompiler: cmake: Force bracket depth to 1024 on Clang Increases the maximum fold expression depth thread_worker: Include condition_variable Don't use list initializers in control flow Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
* shader: Interact texture buffers with buffer cacheReinUsesLisp2021-07-231-7/+24
|
* shader: Implement texture buffersReinUsesLisp2021-07-231-5/+9
|
* vk_compute_pass: Fix compute passesReinUsesLisp2021-07-231-0/+2
|
* shader: Remove atomic flags and use mutex + cond variable for pipelinesReinUsesLisp2021-07-231-4/+10
|
* shader: Mark SSBOs as written when they areFernandoS272021-07-231-1/+1
|
* vulkan: Create pipeline layouts in separate threadsReinUsesLisp2021-07-231-12/+14
|
* vulkan: Build pipelines in parallel at runtimeReinUsesLisp2021-07-231-28/+44
| | | | | Wait from the worker thread for a pipeline to build before binding it to the command buffer. This allows queueing pipelines to multiple threads.
* shader: Better interpolation and disabled attributes supportReinUsesLisp2021-07-231-2/+2
|
* shader: Fix rasterizer integration order issuesReinUsesLisp2021-07-231-2/+5
|
* shader: Implement NDC [-1, 1], attribute types and default varying initializationReinUsesLisp2021-07-231-0/+3
|
* shader: Add partial rasterizer integrationReinUsesLisp2021-07-231-0/+445
|
* shader: Remove old shader managementReinUsesLisp2021-07-231-484/+0
|
* fixed_pipeline_cache: Use dirty flags to lazily update keyReinUsesLisp2021-02-131-3/+0
| | | | | 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.
* vk_graphics_pipeline: Fix narrowing conversion on MSVCReinUsesLisp2021-01-251-2/+2
|
* video_core: Silence -Wmissing-field-initializers warningsReinUsesLisp2021-01-241-0/+1
|
* Merge pull request #5231 from ReinUsesLisp/dyn-bindingsbunnei2021-01-081-10/+3
|\ | | | | renderer_vulkan/fixed_pipeline_state: Move enabled bindings to static state
| * renderer_vulkan/fixed_pipeline_state: Move enabled bindings to static stateReinUsesLisp2020-12-261-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | Without using VK_EXT_robustness2, we can't consider the 'enabled' (not null) vertex buffers as dynamic state, as this leads to invalid Vulkan state. Move this to static state that is always hashed and compared in the pipeline key. The bits for enabled vertex buffers are moved into the attribute state bitfield. This is not 'correct' as it's not an attribute state, but that struct has bits to spare, and it's used in an array of 32 elements (the exact same number of vertex buffer bindings).
* | renderer_vulkan: Move device abstraction to vulkan_commonReinUsesLisp2021-01-041-1/+1
| |
* | renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp2021-01-031-1/+1
| | | | | | | | | | | | | | 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-23/+41
|/ | | | | | | | | | | | | | 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: Make use of ordered container contains() where applicableLioncash2020-12-071-1/+1
| | | | | | With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
* video_core: Resolve more variable shadowing scenarios pt.2Lioncash2020-12-051-19/+19
| | | | | | | Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
* General: Resolve a few missing initializer warningsLioncash2020-10-301-0/+2
| | | | Resolves a few -Wmissing-initializer warnings.
* vk_graphics_pipeline: Manage primitive topology as fixed stateReinUsesLisp2020-10-131-3/+2
| | | | | | | | | 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.
* renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp2020-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove unneeded newlines, optional Registry in shader paramsameerj2020-08-161-4/+3
| | | | Addressing feedback from Rodrigo
* Address feedback, add shader compile notifier, update setting textameerj2020-08-161-4/+5
|
* Vk Async pipeline compilationameerj2020-08-161-3/+2
|
* vk_graphics_pipeline: Resolve narrowing warningsLioncash2020-07-171-2/+4
| | | | | For whatever reason, VK_TRUE and VK_FALSE aren't defined as having a VkBool32 type, so we need to cast to it explicitly.
* vk_graphics_pipeline: Make use of designated initializers where applicableLioncash2020-07-141-198/+223
| | | | Avoids redundant variable name repetitions.
* vk_pipeline_cache: Avoid hashing and comparing dynamic state when possibleReinUsesLisp2020-06-271-2/+16
| | | | | | With extended dynamic states, some bytes don't have to be collected from the pipeline key, hence we can avoid hashing and comparing them on lookups.
* vulkan/fixed_pipeline_state: Move state out of individual structuresReinUsesLisp2020-06-271-27/+26
|
* vk_rasterizer: Use VK_EXT_extended_dynamic_stateReinUsesLisp2020-06-271-2/+18
|
* fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_stateReinUsesLisp2020-06-271-6/+6
| | | | | | | 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.
* Merge pull request #3816 from ReinUsesLisp/vk-rasterizer-enablebunnei2020-05-121-1/+1
|\ | | | | vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
| * vk_graphics_pipeline: Implement rasterizer_enable on VulkanReinUsesLisp2020-05-021-1/+1
| | | | | | | | | | We can simply enable rasterizer discard matching the current pipeline key.
* | vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp2020-05-041-0/+32
| |
* | Merge pull request #3732 from lioncash/headerbunnei2020-05-021-1/+0
|\ \ | |/ |/| vulkan: Remove unnecessary includes
| * vulkan: Remove unnecessary includesLioncash2020-04-291-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.
* | maxwell_3d: Fix depth clamping registerReinUsesLisp2020-04-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | Using deko3d as reference: https://github.com/devkitPro/deko3d/blob/4e47ba0013552e592a86ab7a2510d1e7dadf236a/source/maxwell/gpu_3d_state.cpp#L42 We were using bits 3 and 4 to determine depth clamping, but these are the same both enabled and disabled: state->depthClampEnable ? 0x101A : 0x181D The same happens on Nvidia's OpenGL driver, where they do something like this (default capabilities, GL 4.5 compatibility): (state & DEPTH_CLAMP) != 0 ? 0x201a : 0x281c There's always a difference between the first bits in this register, but bit 11 is consistently disabled on both deko3d/NVN and OpenGL. This commit changes yuzu's behaviour to use bit 11 to determine depth clamping. - Fixes depth issues on Super Mario Odyssey's intro.
* vk_renderpass_cache: Pack renderpass cache key to 12 bytesReinUsesLisp2020-04-231-1/+1
|
* Merge pull request #3653 from ReinUsesLisp/nsight-aftermathFernando Sahmkow2020-04-221-0/+2
|\ | | | | renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
| * renderer_vulkan: Integrate Nvidia Nsight Aftermath on WindowsReinUsesLisp2020-04-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds optional support for Nsight Aftermath. It is enabled through ENABLE_NSIGHT_AFTERMATH in cmake. A path to the SDK has to be provided by the environment variable NSIGHT_AFTERMATH_SDK. Nsight Aftermath allows an application to generate "minidumps" of the GPU state when a device loss happens. By analysing these on Nsight we can know what a game was doing and why it triggered a device loss. The dump is generated inside %APPDATA%\yuzu\log\gpucrash and this directory is deleted every time a new instance is initialized with Nsight enabled. To enable it on yuzu there has a to be a driver and device capable of running Nsight Aftermath on Vulkan. That means only Turing based GPUs on the latest stable driver, beta drivers won't work for now. It is manually enabled in Configuration>Debug>Enable Graphics Debugging because when using all debugging capabilities there is a runtime cost.
* | fixed_pipeline_state: Pack blending stateReinUsesLisp2020-04-191-16/+15
| | | | | | | | Reduce FixedPipelineState's size to 364 bytes.
* | fixed_pipeline_state: Pack rasterizer stateReinUsesLisp2020-04-191-7/+5
| | | | | | | | Reduce FixedPipelineState's size to 600 bytes.
* | fixed_pipeline_state: Pack depth stencil stateReinUsesLisp2020-04-191-10/+10
| | | | | | | | Reduce FixedPipelineState's size to 632 bytes.
* | fixed_pipeline_state: Pack attribute stateReinUsesLisp2020-04-191-11/+17
|/ | | | Reduce FixedPipelineState's size from 1384 to 664 bytes
* renderer_vulkan: Drop Vulkan-HppReinUsesLisp2020-04-111-132/+246
|
* vk_shader_decompiler: Implement indexed texturesReinUsesLisp2020-02-241-2/+1
| | | | | | | Implement accessing textures through an index. It uses the same interface as OpenGL, the main difference is that Vulkan bindings are forced to be arrayed (the binding index doesn't change for stacked textures in SPIR-V).
* vk_graphics_pipeline: Set front facing properlyReinUsesLisp2020-01-181-2/+1
| | | | | | Front face was being forced to a certain value when cull face is disabled. Set a default value on initialization and drop the forcefully set front facing value with culling disabled.
* vk_graphics_pipeline: Initial implementationReinUsesLisp2020-01-071-0/+271
This abstractio represents the state of the 3D engine at a given draw. Instead of changing individual bits of the pipeline how it's done in APIs like D3D11, OpenGL and NVN; on Vulkan we are forced to put everything together into a single, immutable object. It takes advantage of the few dynamic states Vulkan offers.