mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-12 05:33:15 +00:00
graphics_pipeline: Move some depth configuration to dynamic state (#931)
* graphics_pipeline: More proper masking * pipeline_cache: Skip setting depth/stencil fields when test is disabled * pipeline_cache: More fixes to depth stencil state * vk_rasterizer: Use dynamic state for depth bounds and bias * pipeline_cache: Missed depth bias enable * vk_rasterizer: Add stencil dynamic states * thread: Reduce spammy log * Remove some leftover state * pipeline_cache: Allocate pipelines from pools * vk_graphics_pipeline: Remove bindings member Saves about 1KB from each pipeline
This commit is contained in:
parent
c8d0d5637a
commit
b09b28c7f3
7 changed files with 104 additions and 87 deletions
|
@ -473,6 +473,11 @@ struct Liverpool {
|
|||
CullMode CullingMode() const {
|
||||
return static_cast<CullMode>(cull_front | cull_back << 1);
|
||||
}
|
||||
|
||||
bool NeedsBias() const {
|
||||
return enable_polygon_offset_back || enable_polygon_offset_front ||
|
||||
enable_polygon_offset_para;
|
||||
}
|
||||
};
|
||||
|
||||
union VsOutputConfig {
|
||||
|
@ -506,6 +511,11 @@ struct Liverpool {
|
|||
u32 GetMask(int buf_id) const {
|
||||
return (raw >> (buf_id * 4)) & 0xfu;
|
||||
}
|
||||
|
||||
void SetMask(int buf_id, u32 mask) {
|
||||
raw &= ~(0xf << (buf_id * 4));
|
||||
raw |= (mask << (buf_id * 4));
|
||||
}
|
||||
};
|
||||
|
||||
struct IndexBufferBase {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue