From 47db86c3cdba3a5c463de26dd8706ba70d8f3298 Mon Sep 17 00:00:00 2001 From: Frodo Baggins Date: Sun, 2 Mar 2025 17:52:31 -0800 Subject: [PATCH] compare vs attrib specs by default, ignore NumberFmt when vertex input dynamic state is supported --- src/shader_recompiler/specialization.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/shader_recompiler/specialization.h b/src/shader_recompiler/specialization.h index 52b19a845..6cbcd24fc 100644 --- a/src/shader_recompiler/specialization.h +++ b/src/shader_recompiler/specialization.h @@ -90,12 +90,13 @@ struct StageSpecialization { Backend::Bindings start_) : info{&info_}, runtime_info{runtime_info_}, start{start_} { fetch_shader_data = Gcn::ParseFetchShader(info_); - if (info_.stage == Stage::Vertex && fetch_shader_data && - !profile_.support_legacy_vertex_attributes) { + if (info_.stage == Stage::Vertex && fetch_shader_data) { // Specialize shader on VS input number types to follow spec. ForEachSharp(vs_attribs, fetch_shader_data->attributes, - [](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { - spec.num_class = AmdGpu::GetNumberClass(sharp.GetNumberFmt()); + [&profile_](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { + spec.num_class = profile_.support_legacy_vertex_attributes + ? AmdGpu::NumberClass{} + : AmdGpu::GetNumberClass(sharp.GetNumberFmt()); spec.dst_select = sharp.DstSelect(); }); }