From eb876e604ae2d6d80368f05855a57699ea657d47 Mon Sep 17 00:00:00 2001 From: Frodo Baggins Date: Sun, 2 Mar 2025 18:32:49 -0800 Subject: [PATCH] specialize data_format when attribute uses step rates --- src/shader_recompiler/specialization.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shader_recompiler/specialization.h b/src/shader_recompiler/specialization.h index 6cbcd24fc..54fd5026a 100644 --- a/src/shader_recompiler/specialization.h +++ b/src/shader_recompiler/specialization.h @@ -13,6 +13,7 @@ namespace Shader { struct VsAttribSpecialization { + AmdGpu::DataFormat data_format{}; AmdGpu::NumberClass num_class{}; AmdGpu::CompMapping dst_select{}; @@ -94,6 +95,8 @@ struct StageSpecialization { // Specialize shader on VS input number types to follow spec. ForEachSharp(vs_attribs, fetch_shader_data->attributes, [&profile_](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { + spec.data_format = + desc.UsesStepRates() ? sharp.GetDataFmt() : AmdGpu::DataFormat{}; spec.num_class = profile_.support_legacy_vertex_attributes ? AmdGpu::NumberClass{} : AmdGpu::GetNumberClass(sharp.GetNumberFmt());