diff --git a/src/shader_recompiler/ir/pattern_matching.h b/src/shader_recompiler/ir/pattern_matching.h index 228d12514..1279f14c3 100644 --- a/src/shader_recompiler/ir/pattern_matching.h +++ b/src/shader_recompiler/ir/pattern_matching.h @@ -6,7 +6,9 @@ namespace Shader::Optimiation::PatternMatching { -// Bad pattern matching attempt +// Attempt at pattern matching for Insts and Values +// Needs improvement, mostly a convenience + template struct MatchObject { inline bool Match(IR::Value v) { @@ -50,7 +52,6 @@ private: IR::Value& return_val; }; -// Specific struct MatchAttribute : MatchObject { MatchAttribute(IR::Attribute attribute_) : attribute(attribute_) {} @@ -62,7 +63,6 @@ private: IR::Attribute attribute; }; -// Specific struct MatchU32 : MatchObject { MatchU32(u32 imm_) : imm(imm_) {} diff --git a/src/shader_recompiler/runtime_info.h b/src/shader_recompiler/runtime_info.h index e3851ab9f..23e23c118 100644 --- a/src/shader_recompiler/runtime_info.h +++ b/src/shader_recompiler/runtime_info.h @@ -120,7 +120,7 @@ struct HullRuntimeInfo { // In that case, it should be fine to assume passthrough and declare some extra // output control points and attributes that shouldnt be read by the TES anyways bool IsPassthrough() const { - return hs_output_base == 0 && num_threads == 1; + return hs_output_base == 0 && ls_stride == hs_output_cp_stride && num_threads == 1; }; // regs.ls_hs_config.hs_output_control_points contains the number of threads, which