feat(vulkan): cache pipeline variants by state key
Docs Deploy / Build and Deploy MkDocs (push) Successful in 37s
Test / Lint (push) Failing after 2m4s
Test / Test (push) Skipped
Test / Render parity (push) Skipped

This commit is contained in:
2026-07-18 08:22:29 +04:00
parent 1afe1698db
commit e7c1664171
6 changed files with 146 additions and 30 deletions
@@ -2,6 +2,7 @@
use crate::{VulkanStaticDrawRange, VulkanStaticMesh, VulkanStaticVertex};
use fparkan_msh::ModelAsset;
use fparkan_render::LegacyPipelineState;
/// Error returned when a validated MSH cannot enter the current static GPU path.
#[derive(Clone, Debug, Eq, PartialEq)]
@@ -69,6 +70,7 @@ pub fn project_msh_to_static_mesh(
first_index,
index_count: u32::from(batch.index_count),
material_index: batch.material_index,
pipeline_state: LegacyPipelineState::default(),
});
}
if indices.is_empty() {
@@ -183,6 +185,7 @@ mod tests {
first_index: 0,
index_count: 3,
material_index: 0,
pipeline_state: LegacyPipelineState::default(),
}]
);
assert_eq!(mesh.vertices[1].position, [-0.8, -0.8]);
@@ -229,11 +232,13 @@ mod tests {
first_index: 0,
index_count: 3,
material_index: 0,
pipeline_state: LegacyPipelineState::default(),
},
VulkanStaticDrawRange {
first_index: 3,
index_count: 3,
material_index: 7,
pipeline_state: LegacyPipelineState::default(),
},
]
);