[vulkan] Adjusted pipeline keys inside patchControlPoints

This commit is contained in:
CamilleLaVey 2026-04-15 03:00:53 -04:00 committed by crueter
parent 8544a0b43f
commit a58c84d963
2 changed files with 3 additions and 3 deletions

View file

@ -677,7 +677,7 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
.sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO,
.pNext = nullptr,
.flags = 0,
.patchControlPoints = key.state.patch_control_points_minus_one.Value() + 1,
.patchControlPoints = static_cast<u32>(key.state.patch_control_points_minus_one.Value()) + 1,
};
std::array<VkViewportSwizzleNV, Maxwell::NumViewports> swizzles;
std::ranges::transform(key.state.viewport_swizzles, swizzles.begin(), UnpackViewportSwizzle);

View file

@ -195,7 +195,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span<const Shader::IR::Program> program
case Shader::Stage::TessellationEval:
info.tess_clockwise = key.state.tessellation_clockwise != 0;
info.tess_primitive = [&key] {
const u32 raw{key.state.tessellation_primitive.Value()};
const u32 raw = static_cast<u32>(key.state.tessellation_primitive.Value());
switch (static_cast<Maxwell::Tessellation::DomainType>(raw)) {
case Maxwell::Tessellation::DomainType::Isolines:
return Shader::TessPrimitive::Isolines;
@ -208,7 +208,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span<const Shader::IR::Program> program
return Shader::TessPrimitive::Triangles;
}();
info.tess_spacing = [&] {
const u32 raw{key.state.tessellation_spacing};
const u32 raw = static_cast<u32>(key.state.tessellation_spacing.Value());
switch (static_cast<Maxwell::Tessellation::Spacing>(raw)) {
case Maxwell::Tessellation::Spacing::Integer:
return Shader::TessSpacing::Equal;