-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ghost of Sparta crashing with jit/ir in some situations (HW tess?) #10897
Comments
That looks somewhat like jit. If you enable the IR Interpreter instead of jit, does it still crash? And if so, does it give a more useful Call Stack? -[Unknown] |
Oh , I find out , fast memory caused crashes , this is my mistake , so I closed this |
Hm. If fast memory crashes, there's still some issue, though may not really be related to tesselation.. |
@hrydgard Hm , I tested on these conditions |
Any idea if this is new, or if it's happened for a long time in this place in the game? Do you have a savegame nearby? |
@hrydgard yeah , i load game in savegame , not using save state . I play this game from beginning to this scene |
Well I meant, can you upload the savegame? Useful for debugging this. Or I guess if this is right at the beginning, that's not needed :) |
GOW savedata.zip |
@hrydgard Hey , how was it , can you found a bug ? |
Sorry, today I've been working on restoring hardware skinning. But will take a look soon. |
@hrydgard |
use Interpreter, not crash use IR Interpreter, int IRDestGPR(const IRInst &inst) {
const IRMeta *m = GetIRMeta(inst.op);
if ((m->flags & IRFLAG_SRC3) == 0 && m->types[0] == 'G') {
return inst.dest;
}
return -1;
} JIT, crash |
|
Thanks @weihuoya , that's helpful! I'll look into this soon. @Leopard20 The PSP has a rather peculiar way of doing bones/skeletal animation ( https://en.wikipedia.org/wiki/Skeletal_animation ) in hardware. We have to emulate it, and it can either be done by performing all the math in vertex shaders on the GPU, which is what we call "hardware skinning", or on the CPU, which we call "software skinning". Unfortunately games are not very efficient about how they use this feature, they will draw a few triangles, upload a new bone matrix, then draw a few more etc. This is expensive for us to do on the GPU since that's a lot of "draw calls", but if we do it on the CPU, we can combine them. So effectively:
|
@weihuoya Added a fix for the IR Interpreter bug. Won't fix the JIT problem though, or whatever it is. |
u32 IRInterpret(MIPSState *mips, const IRInst *inst, int count) {
default:
Crash();
} |
Huh. Seems we never properly implemented these ops. @unknownbrackets do you remember why we emit Apply/Restore/UpdateRoundingMode in the IR interpreter but don't have any code to interpret them? |
Added some code to ignore those for now, will need to get them implemented at some point. |
IR Interpreter crash there, maybe same with jit. inline u32 ReadUnchecked_U32(const u32 address) {
return *(u32_le *)(base + address);
} u32 IRInterpret(MIPSState *mips, const IRInst *inst, int count) {
case IROp::Load32:
mips->r[inst->dest] = Memory::ReadUnchecked_U32(mips->r[inst->src1] + inst->constant);
break;
}
|
Yeah, seems likely. But confusing :) thanks. |
@hrydgard well, I think you added them, we probably never finished with them? We'd also added the metadata here: -[Unknown] |
Hm. but when did they then disappear from IRInst and IRInterpret? Because they weren't there now. Guess I gotta go git digging... |
We never merged that branch, I think it wasn't working still? -[Unknown] |
Oh, right :/ |
@hrydgard I think if you didn't fix that bug , so the temporary solution is Turn off Fast Memory |
an invalid memory access, turn off fast memory will ignore this access |
Just to say: fast memory is like using a knife to cook food. Turning it off is like using a knife and taking tons of painkiller medicine. So if you cut yourself by accident with fast memory on, you crash and stop cooking. If you cut yourself while fast memory is off, you just don't notice and keep cooking. Sometimes it's only a tiny scratch, so maybe it's okay. The PSP always uses fast memory. Games crash immediately when they cut themselves. So we have a bug if the game is cutting itself, but the bug (probably) isn't with fast memory - it's somewhere else. What's interesting here is if it doesn't crash with the interpreter. Unless I'm mistaken, the interpreter ALWAYS runs in fast memory mode. So that would imply a jit bug (potentially all backends if the IR interpreter shares the problem.) -[Unknown] |
@unknownbrackets yeah , some situation , HW Tess caused crashed when turn on fast memory with JIT/IR , turn off HW Tess is temporary fix but sometimes it crashes |
We need to implement to ignore this or fix this @hrydgard |
Here you may be interested, to skip this error, you have deactivated the fast memory and set the CPU speed to 101, so it has not exploded and after jumping all the position as it was before. I comment in case someone got stuck and could not pass. regards |
@zminhquanz is HW Tessellation is related to crash? or fast memory only? on android. |
I cannot reproduce this issue on the latest build possibility this was fixed by #14805? |
Here's the the proof. Screenrecorder-2021-10-01-22-04-46-55.online-video-cutter.com.mp4 |
Great, thanks for checking. I think there's a good chance that would've helped. I'll close this. If anyone has more information or can confirm it still happens in the latest git builds, please reply to this issue with more details (i.e. which device and specific git build version), and it'll be reopened. If you have a new issue with the same game, just create a new issue instead. -[Unknown] |
IDK why in that particular area still crashing using ir interpreter created new issue #14958 |
What happens?
GOW Ghost of Sparta crashed when i'm turn on HW Tessellation at this scene , when i'm turn off , it's normal , crashed appear the same in Mobile
The text was updated successfully, but these errors were encountered: