diff options
author | Zephyron <zephyron@citron-emu.org> | 2025-01-18 19:09:03 +1000 |
---|---|---|
committer | Zephyron <zephyron@citron-emu.org> | 2025-01-18 19:09:03 +1000 |
commit | d4d3061eb78fdba50201613271688a1dcd231ef4 (patch) | |
tree | ee6b834640486b9462d32e49f1ba1740ada69839 /src/core/arm | |
parent | 450d80fc81404dbeab949552b630d72bec80db85 (diff) |
arm/video: Fix shader extension and exception handling
Two main changes in this commit:
1. Replace NVIDIA-specific GL_NV_gpu_shader5 extension with the more widely
supported GL_EXT_shader_explicit_arithmetic_types_float16 in the scaleforce
shader. This improves compatibility across different GPU vendors.
2. Refactor ARM32 exception handling:
- Restructure exception cases for better readability
- Update exception handling to match current Dynarmic API
- Fix indentation in switch statement
- Remove AccessViolation case as it's no longer supported in current API
These changes improve shader compatibility and align the exception handling
with the current Dynarmic implementation.
Diffstat (limited to 'src/core/arm')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_32.cpp | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index 28d062e7a..2846d4ca8 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -91,27 +91,25 @@ public: void ExceptionRaised(u32 pc, Dynarmic::A32::Exception exception) override { switch (exception) { - case Dynarmic::A32::Exception::NoExecuteFault: - LOG_CRITICAL(Core_ARM, "Cannot execute instruction at unmapped address {:#08x}", pc); - ReturnException(pc, PrefetchAbort); - return; - case Dynarmic::A32::Exception::AccessViolation: - if (pc == 0 || pc < 0x1000) { - LOG_CRITICAL(Core_ARM, "Null pointer dereference at {:#08x}", pc); - ReturnException(pc, DataAbort); + case Dynarmic::A32::Exception::UndefinedInstruction: + LOG_CRITICAL(Core_ARM, "Undefined instruction at PC = 0x{:08X}", pc); + m_parent.GetContext(m_parent.m_breakpoint_context); + m_parent.m_jit->HaltExecution(DataAbort); + break; + case Dynarmic::A32::Exception::NoExecuteFault: + LOG_CRITICAL(Core_ARM, "Cannot execute instruction at unmapped address {:#08x}", pc); + ReturnException(pc, PrefetchAbort); return; - } - [[fallthrough]]; - default: - if (m_debugger_enabled) { - ReturnException(pc, InstructionBreakpoint); - return; - } - - m_parent.LogBacktrace(m_process); - LOG_CRITICAL(Core_ARM, - "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X}, thumb = {})", - exception, pc, m_memory.Read32(pc), m_parent.IsInThumbMode()); + default: + if (m_debugger_enabled) { + ReturnException(pc, InstructionBreakpoint); + return; + } + + m_parent.LogBacktrace(m_process); + LOG_CRITICAL(Core_ARM, + "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X}, thumb = {})", + exception, pc, m_memory.Read32(pc), m_parent.IsInThumbMode()); } } |