mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-22 03:46:53 +02:00
recompiler: allow a shader to be refused instead of aborting
A shader the recompiler cannot translate is a gap in emulation, not a reason to take the process down: skipping the draw or dispatch that wanted it costs some rendering, while aborting costs the title. CompileOptions gains non_fatal and CompileResult gains unsupported. With non_fatal set, the three places the recompile path gives up - an opcode with no IR translation, a CFG that will not build, and resource tracking that cannot resolve a descriptor - record the failure and unwind rather than calling EXIT, and Recompile returns a result marked unsupported. The caller skips that draw or dispatch. Nothing changes when non_fatal is clear. Marvel's Spider-Man: Miles Morales meets an untranslatable compute shader on its third frame, so a strict build cannot pass the opening logo. Astro's Playroom is also stopped by a shader today and reaches a later, different failure with this in place.
This commit is contained in:
@@ -26,6 +26,7 @@ struct CompileOptions {
|
||||
IR::SrtMemoryReader read_specialization_memory = nullptr;
|
||||
void* read_memory_data = nullptr;
|
||||
ShaderStageInputInfo input_info;
|
||||
bool non_fatal = false;
|
||||
};
|
||||
|
||||
struct CompileResult {
|
||||
@@ -34,6 +35,7 @@ struct CompileResult {
|
||||
std::string ir_dump;
|
||||
IR::Program program;
|
||||
IR::ResourceSnapshot resources;
|
||||
bool unsupported = false;
|
||||
};
|
||||
|
||||
[[nodiscard]] CompileResult Recompile(std::span<const uint32_t> code,
|
||||
|
||||
Reference in New Issue
Block a user