shader_recompiler: Fix incorrect bary coord loads when unsupported (#3303)

* shader_recompiler: Fix incorrect bary coord loads when unsupported

Also properly set sample rate shading

* emit_spirv: Implement BaryCoordSmoothCentroid
This commit is contained in:
TheTurtle
2025-07-23 19:46:06 +03:00
committed by GitHub
parent 800b332f60
commit 4d3578edbe
5 changed files with 24 additions and 11 deletions

View File

@@ -126,7 +126,10 @@ void Translator::EmitPrologue(IR::Block* first_block) {
case LogicalStage::Fragment:
dst_vreg =
IterateBarycentrics(runtime_info, [this](u32 vreg, IR::Attribute attrib, u32 comp) {
ir.SetVectorReg(IR::VectorReg(vreg), ir.GetAttribute(attrib, comp));
if (profile.supports_amd_shader_explicit_vertex_parameter ||
profile.supports_fragment_shader_barycentric) {
ir.SetVectorReg(IR::VectorReg(vreg), ir.GetAttribute(attrib, comp));
}
});
if (runtime_info.fs_info.addr_flags.pos_x_float_ena) {
if (runtime_info.fs_info.en_flags.pos_x_float_ena) {