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
rsx: Rewrite IO mappings (again) #7262
Conversation
I thought rsx was frozen XD |
@Megamouse Just let it go :^) |
7b9ff4f
to
2c972ea
Compare
Uncharted 2, right before intro fmv Uncharted 3 |
Rsx is still in maintenance mode so this will be up for a while. |
Possibly fixed. |
We can merge the error code earlier if you seperate it |
@elad335 yes, fixed |
d5763c8
to
5048286
Compare
1ff51d3
to
6c33aeb
Compare
hmm can it be merged already? Honestly if it may regress anything it would be fixed at lightspeed once it reaches master due to its triviality. |
oops |
well LIKELY and UNLIKELY arent macros anymore so it would have to be transformed into [[unlikely] on the side, thats why i asked |
Conflicts solved. |
750dbef
to
2fe4911
Compare
Along with some with fixes to cellGcmSys HLE.
@@ -68,9 +67,9 @@ namespace rsx | |||
case CELL_GCM_CONTEXT_DMA_MEMORY_HOST_BUFFER: | |||
case CELL_GCM_LOCATION_MAIN: | |||
{ | |||
if (u32 result = RSXIOMem.RealAddr(offset)) | |||
if (const u32 ea = render->iomap_table.get_addr(offset); ea + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just check ea == 0xffffffff? It's more readable that way. Also, the decision to have ea = 0 as legal is dubious, I do not think that is legal for anything but the lv1 kernel itself. I don't mind either way but this add is pointless here for the comparison bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 isn't compatoble with the opposite operation (ea->io), but io->ea can still use 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also -1 has a cool trick, notice rsx_io_table::get_addr no longer checks for unmapped memory.
Thats because OR doesnt change -1, unlike 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, but the comparison for invalid still irks me. It relies on arithmetic to infer a hard-coded constant which is messy. Can this be done in the table class with proper named constants? I think a static constexpr in the map class may work for this. The reason 0 comparison gets a pass is because it is a universal 'false' since forever, hence the special handling even in the language itself.
Alternatively get_addr may return a pair, but that is overkill.
rsx::thread::pause()
. (wait for previous pause request)