mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-12 22:28:49 -04:00
video_core, shader_recompiler: Improve Princess Peach: Showtime! support and performance
1. Add geometry shader support for Princess Peach: Showtime!: - Implement proper EmitInvocationInfo handling for geometry shaders - Support input topology vertex counting in all shader backends (GLASM, GLSL, SPIRV) 2. Performance optimizations: - Replace InputTopologyVertices switch statement with a constexpr lookup table - Pre-calculate vertex counts and shifts to reduce register pressure - Eliminate redundant calculations in shader backends Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -426,6 +426,12 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) {
|
||||
case Stage::TessellationEval:
|
||||
ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst);
|
||||
break;
|
||||
case Stage::Geometry: {
|
||||
// Pre-calculate the vertex count for better performance
|
||||
const u32 vertex_count = InputTopologyVertices::vertices(ctx.runtime_info.input_topology);
|
||||
ctx.AddU32("{}={}u;", inst, vertex_count << 16);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_WARNING(Shader, "(STUBBED) called");
|
||||
ctx.AddU32("{}=uint(0x00ff0000);", inst);
|
||||
|
||||
Reference in New Issue
Block a user