rsx: Initialize declared but unset varying variables to all ones

This commit is contained in:
kd-11 2017-06-26 16:41:14 +03:00
parent 47e5074dc5
commit 6e578c4fde
2 changed files with 12 additions and 0 deletions

View File

@ -385,6 +385,12 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
OS << " " << name << " = " << condition << "? " << i.src_reg << i.src_reg_mask << ": " << i.default_val << ";" << std::endl;
}
}
else if (i.need_declare && (rsx_vertex_program.output_mask & i.check_mask_value) > 0)
{
//An output was declared but nothing was written to it
//Set it to all ones (Atelier Escha)
OS << " " << i.name << " = vec4(1.);" << std::endl;
}
}
if (insert_back_diffuse && insert_front_diffuse)

View File

@ -349,6 +349,12 @@ void VKVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
OS << " " << i.name << " = " << condition << "? " << i.src_reg << i.src_reg_mask << ": " << i.default_val << ";" << std::endl;
}
}
else if (i.need_declare && (rsx_vertex_program.output_mask & i.check_mask_value) > 0)
{
//An output was declared but nothing was written to it
//Set it to all ones (Atelier Escha)
OS << " " << i.name << " = vec4(1.);" << std::endl;
}
}
if (insert_back_diffuse && insert_front_diffuse)