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:
TheTurtle 2024-09-15 23:42:14 +03:00 committed by GitHub
parent c8d0d5637a
commit b09b28c7f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 104 additions and 87 deletions

View file

@ -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 {