rsx: Fix missing point size export

- Sometimes program-point-size is enabled, but the vs does not actually
write to the point size register. In this case, pass the incoming point
size along instead of the default register init.
This commit is contained in:
kd-11 2019-09-29 12:11:08 +03:00 committed by kd-11
parent 19e0d099b6
commit bcf8799079
2 changed files with 10 additions and 12 deletions

View file

@ -224,13 +224,12 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
{ {
OS << " " << i.name << " = vec4(0., 0., 0., 1.);\n"; OS << " " << i.name << " = vec4(0., 0., 0., 1.);\n";
} }
} else if (i.check_mask_value == CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE)
// Default point size if none was generated by the program
if ((rsx_vertex_program.output_mask & CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE) == 0)
{ {
// Default point size if none was generated by the program
OS << " gl_PointSize = point_size;\n"; OS << " gl_PointSize = point_size;\n";
} }
}
OS << " gl_Position = gl_Position * scale_offset_mat;\n"; OS << " gl_Position = gl_Position * scale_offset_mat;\n";
OS << " gl_Position = apply_zclip_xform(gl_Position, z_near, z_far);\n"; OS << " gl_Position = apply_zclip_xform(gl_Position, z_near, z_far);\n";

View file

@ -272,13 +272,12 @@ void VKVertexDecompilerThread::insertMainEnd(std::stringstream & OS)
{ {
OS << " " << i.name << " = vec4(0., 0., 0., 1.);\n"; OS << " " << i.name << " = vec4(0., 0., 0., 1.);\n";
} }
} else if (i.check_mask_value == CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE)
// Default point size if none was generated by the program
if ((rsx_vertex_program.output_mask & CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE) == 0)
{ {
// Default point size if none was generated by the program
OS << " gl_PointSize = point_size;\n"; OS << " gl_PointSize = point_size;\n";
} }
}
OS << " gl_Position = gl_Position * scale_offset_mat;\n"; OS << " gl_Position = gl_Position * scale_offset_mat;\n";
OS << " gl_Position = apply_zclip_xform(gl_Position, z_near, z_far);\n"; OS << " gl_Position = apply_zclip_xform(gl_Position, z_near, z_far);\n";