summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/fixed_pipeline_state.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fixed_pipeline_state: Hash and compare the whole structureReinUsesLisp2020-04-191-49/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-27/+54
| | | | Reduce FixedPipelineState's size to 364 bytes.
* fixed_pipeline_state: Pack rasterizer stateReinUsesLisp2020-04-191-56/+45
| | | | Reduce FixedPipelineState's size to 600 bytes.
* fixed_pipeline_state: Pack depth stencil stateReinUsesLisp2020-04-191-45/+52
| | | | Reduce FixedPipelineState's size to 632 bytes.
* fixed_pipeline_state: Pack attribute stateReinUsesLisp2020-04-191-47/+52
| | | | Reduce FixedPipelineState's size from 1384 to 664 bytes
* maxwell_3d: Flatten cull and front face registersReinUsesLisp2020-02-281-4/+4
|
* fixed_pipeline_state: Add depth clampReinUsesLisp2020-01-071-4/+6
|
* fixed_pipeline_state: Define symetric operator!= and mark as noexceptReinUsesLisp2019-12-241-20/+71
| | | | Marks as noexcept Hash, operator== and operator!= for consistency.
* fixed_pipeline_state: Define structure and loadersReinUsesLisp2019-12-231-0/+231
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.