Give MS priority over LOD in Image opcodes#4207
Give MS priority over LOD in Image opcodes#4207georgemoralis merged 1 commit intoshadps4-emu:mainfrom
Conversation
|
Do you have any info on where the mip level for the instruction comes from in the shader? If it's always 0 maybe we can detect it and it should work as if it's a regular image load? |
|
Where would that be, given this |
|
For what it's worth, v2 is a hardcoded 0 ( |
|
I believe it would be v2 in that case, yes. So I believe a solution would be to walk back through the arg to its source and detect the constant 0, and then use that to ignore Although personally I'm not sure if we need to bother checking or we should just ignore |
|
I see that indeed, arg.IsImmediate() there returns true and the value is 0. You mention that the check is not essential there, however, if we ignore has_lod, the argument passed for |
|
That's true, it may be worth checking out the |
|
Yes, v3 is also set but the value is not an immediate there |
|
Doesn't need to be an immediate. I think the logic would be, if |
f00f216 to
1abb11f
Compare
A draft as I'm not sure it is sound, but I'd like to get CTR ingame. One shader there hits
ASSERT(!inst_info.has_lod || !has_ms);, and looking at the offending shader, it doesimage_load_mipwith T# describing a Color2DMsaa image. That looks incorrect, but I'm not sure if the cause is an issue with shad or the original hardware ignores the _mip part and goes on.With this change, the game progresses further and can get into a race with graphical glitches