From bcf8799079a45834ab8bb41fda6e0592a8a66202 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 29 Sep 2019 12:11:08 +0300 Subject: [PATCH] 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. --- rpcs3/Emu/RSX/GL/GLVertexProgram.cpp | 11 +++++------ rpcs3/Emu/RSX/VK/VKVertexProgram.cpp | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp index 99abd569c0..c82d0e4926 100644 --- a/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp +++ b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp @@ -224,12 +224,11 @@ void GLVertexDecompilerThread::insertMainEnd(std::stringstream & OS) { OS << " " << i.name << " = vec4(0., 0., 0., 1.);\n"; } - } - - // Default point size if none was generated by the program - if ((rsx_vertex_program.output_mask & CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE) == 0) - { - OS << " gl_PointSize = point_size;\n"; + else if (i.check_mask_value == CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE) + { + // Default point size if none was generated by the program + OS << " gl_PointSize = point_size;\n"; + } } OS << " gl_Position = gl_Position * scale_offset_mat;\n"; diff --git a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp index a9395f227b..332ba362f4 100644 --- a/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp +++ b/rpcs3/Emu/RSX/VK/VKVertexProgram.cpp @@ -272,12 +272,11 @@ void VKVertexDecompilerThread::insertMainEnd(std::stringstream & OS) { OS << " " << i.name << " = vec4(0., 0., 0., 1.);\n"; } - } - - // Default point size if none was generated by the program - if ((rsx_vertex_program.output_mask & CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE) == 0) - { - OS << " gl_PointSize = point_size;\n"; + else if (i.check_mask_value == CELL_GCM_ATTRIB_OUTPUT_MASK_POINTSIZE) + { + // Default point size if none was generated by the program + OS << " gl_PointSize = point_size;\n"; + } } OS << " gl_Position = gl_Position * scale_offset_mat;\n";