summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* general: fix spelling mistakesLiam2023-03-121-3/+3
|
* Vulkan: Fix drivers that don't support dynamic_state_2 upFernando Sahmkow2023-01-051-1/+1
|
* Vulkan: Implement Dynamic State 3Fernando Sahmkow2023-01-011-36/+34
|
* Vulkan Implement Dynamic State 2 LogicOp and PatchVerticesFernando Sahmkow2023-01-011-5/+11
|
* Vulkan: Implement Dynamic States 2Fernando Sahmkow2023-01-011-16/+30
|
* MacroHLE: Add HLE replacement for base vertex and base instance.Fernando Sahmkow2023-01-011-0/+1
|
* Merge pull request #9401 from vonchenplus/draw_managerFernando S2022-12-081-2/+4
|\ | | | | video_core: Implement maxwell3d draw manager and split draw logic
| * video_core: Implement maxwell3d draw manager and split draw logicFeng Chen2022-12-081-2/+4
| |
* | Vulkan: Implement Alpha coverageFernando Sahmkow2022-12-051-0/+2
|/
* general: fix compile for Apple ClangLiam2022-11-231-0/+1
|
* Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation regKelebek12022-11-111-0/+1
|
* renderer_(opengl/vulkan): Fix tessellation clockwise parameterMorph2022-10-131-2/+2
| | | | This should be assigned CW only on Triangles_CW rather than not Triangles_CCW, making CCW the default winding order rather than CW.
* Fix stencil func registers, make clip control equivalent to how it was before, but surely wrong.Kelebek12022-10-101-1/+5
|
* Update 3D regsKelebek12022-10-071-147/+152
|
* 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: Reduce unused includesameerj2022-03-191-3/+0
|
* vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_stateReinUsesLisp2021-07-231-1/+1
| | | | | Workaround potential bug on Nvidia's driver where only updating high attributes leaves low attributes out dated.
* vk_graphics_pipeline: Implement smooth linesReinUsesLisp2021-07-231-0/+1
|
* vk_graphics_pipeline: Implement conservative renderingReinUsesLisp2021-07-231-0/+1
|
* vulkan: Add VK_EXT_vertex_input_dynamic_state supportReinUsesLisp2021-07-231-23/+44
| | | | | 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-2/+2
|
* fixed_pipeline_state: Use regular for loop instead of ranges for perfReinUsesLisp2021-07-231-2/+3
| | | | MSVC generates better code for it.
* video_core: Abstract transform feedback translation utilityReinUsesLisp2021-07-231-14/+11
|
* shader: Implement SR_Y_DIRECTIONFernandoS272021-07-231-0/+2
|
* shader: Implement transform feedbacks and define file formatReinUsesLisp2021-07-231-2/+17
|
* shader: Add partial rasterizer integrationReinUsesLisp2021-07-231-0/+4
|
* fixed_pipeline_cache: Use dirty flags to lazily update keyReinUsesLisp2021-02-131-35/+48
| | | | | 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.
* Merge pull request #5231 from ReinUsesLisp/dyn-bindingsbunnei2021-01-081-9/+5
|\ | | | | renderer_vulkan/fixed_pipeline_state: Move enabled bindings to static state
| * renderer_vulkan/fixed_pipeline_state: Move enabled bindings to static stateReinUsesLisp2020-12-261-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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).
* | video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-0/+1
|/ | | | | | | | | | | | | | 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.
* vk_shader_decompiler: Implement force early fragment testsReinUsesLisp2020-11-261-3/+4
| | | | | | | | Force early fragment tests when the 3D method is enabled. The established pipeline cache takes care of recompiling if needed. This is implemented only on Vulkan to avoid invalidating the shader cache on OpenGL.
* Refactor MaxwellToSpirvComparison. Use Common::BitCastameerj2020-11-251-2/+3
| | | | Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
* Address PR feedback from Reinameerj2020-11-251-2/+3
|
* vulkan_renderer: Alpha Test Culling Implementationameerj2020-11-251-0/+5
| | | | Used by various textures in many titles, e.g. SSBU menu.
* vk_graphics_pipeline: Manage primitive topology as fixed stateReinUsesLisp2020-10-131-2/+1
| | | | | | | | | 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.
* video_core: Remove unused variablesLioncash2020-07-211-1/+0
| | | | Silences several compiler warnings about unused variables.
* vk_pipeline_cache: Avoid hashing and comparing dynamic state when possibleReinUsesLisp2020-06-271-4/+7
| | | | | | 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-31/+21
|
* fixed_pipeline_state: Add requirements for VK_EXT_extended_dynamic_stateReinUsesLisp2020-06-271-32/+60
| | | | | | | 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.
* fixed_pipeline_state: Remove unnecessary check for front faces flipReinUsesLisp2020-05-261-2/+1
| | | | | | The check to flip faces when viewports are negative were a left over from the old OpenGL code. This is not required on Vulkan where we have negative viewports.
* Merge pull request #3816 from ReinUsesLisp/vk-rasterizer-enablebunnei2020-05-121-0/+1
|\ | | | | vk_graphics_pipeline: Implement rasterizer_enable on Vulkan
| * vk_graphics_pipeline: Implement rasterizer_enable on VulkanReinUsesLisp2020-05-021-0/+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/+8
|/
* 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_pipeline_cache: Unify pipeline cache keys into a single operationReinUsesLisp2020-04-231-9/+6
| | | | | This allows us to call Common::CityHash and std::memcmp only once for GraphicsPipelineCacheKey. While we are at it, do the same for compute.
* fixed_pipeline_state: Hash and compare the whole structureReinUsesLisp2020-04-191-56/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pad FixedPipelineState's size to 384 bytes to be a multiple of 16. Compare the whole struct with std::memcmp and hash with CityHash. Using CityHash instead of a naive hash should reduce the number of collisions. Improve used type traits to ensure this operation is safe. With these changes the improvements to the hashable pipeline state are: Optimized structure Hash: 89 ns Comparison: 103 ns Construction*: 164 ns Struct size: 384 bytes Original structure Hash: 148 ns Equal: 174 ns Construction*: 281 ns Size: 1384 bytes * Attribute state initialization is not measured These measures are averages taken with std::chrono::high_accuracy_clock on MSVC shipped on Visual Studio 16.6.0 Preview 2.1.
* fixed_pipeline_state: Pack blending stateReinUsesLisp2020-04-191-55/+158
| | | | Reduce FixedPipelineState's size to 364 bytes.
* fixed_pipeline_state: Pack rasterizer stateReinUsesLisp2020-04-191-97/+102
| | | | Reduce FixedPipelineState's size to 600 bytes.
* fixed_pipeline_state: Pack depth stencil stateReinUsesLisp2020-04-191-42/+78
| | | | Reduce FixedPipelineState's size to 632 bytes.
* fixed_pipeline_state: Pack attribute stateReinUsesLisp2020-04-191-31/+4
| | | | Reduce FixedPipelineState's size from 1384 to 664 bytes
* maxwell_3d: Flatten cull and front face registersReinUsesLisp2020-02-281-8/+7
|
* fixed_pipeline_state: Add depth clampReinUsesLisp2020-01-071-6/+12
|
* fixed_pipeline_state: Define symetric operator!= and mark as noexceptReinUsesLisp2019-12-241-20/+21
| | | | Marks as noexcept Hash, operator== and operator!= for consistency.
* fixed_pipeline_state: Define structure and loadersReinUsesLisp2019-12-231-0/+295
The intention behind this hasheable structure is to describe the state of fixed function pipeline state that gets compiled to a single graphics pipeline state object. This is all dynamic state in OpenGL but Vulkan wants it in an immutable state, even if hardware can edit it freely. In this commit the structure is defined in an optimized state (it uses booleans, has paddings and many data entries that can be packed to single integers). This is intentional as an initial implementation that is easier to debug, implement and review. It will be optimized in later stages, or it might change if Vulkan gets more dynamic states.