Skip to content
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

Future fix for semaphore_406e #6116

Merged
merged 1 commit into from Jun 21, 2019
Merged

Future fix for semaphore_406e #6116

merged 1 commit into from Jun 21, 2019

Conversation

@elad335
Copy link
Contributor

@elad335 elad335 commented Jun 20, 2019

Fix pain in the future.

@Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented Jun 20, 2019

Better would be to initialize be_t<u32> arg_be = arg; and then compare arg_be with data loaded from memory in loop. If you want to optimize it so much, could just add raw() method to se_t class templates and compare raw values.

Loading

@elad335 elad335 force-pushed the sema branch 7 times, most recently from 4b7f169 to 4989cd4 Jun 20, 2019
@@ -490,6 +490,11 @@ class se_t<T, true, Align>
return storage::from(m_data);
}

type raw() const
Copy link
Member

@Nekotekina Nekotekina Jun 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should just return m_data. Preferably reference to, like in atomic_t. Casting it to the type is not meaningful.

Loading

const auto& sema = vm::_ref<le_t<u32>>(addr);
#else
// Preswap value
arg = static_cast<u32>(be_t<u32>(arg));
Copy link
Member

@Nekotekina Nekotekina Jun 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This expression doesn't actually swap bytes. I recommended to create a new (const) variable.

Loading

@elad335 elad335 force-pushed the sema branch 7 times, most recently from 0994e2f to a96977f Jun 21, 2019
rpcs3/Emu/RSX/RSXThread.cpp Show resolved Hide resolved
Loading
rpcs3/Emu/RSX/rsx_methods.cpp Show resolved Hide resolved
Loading
@elad335 elad335 force-pushed the sema branch 2 times, most recently from 7a15646 to f7d9a59 Jun 21, 2019
@Nekotekina Nekotekina merged commit cd0ef99 into RPCS3:master Jun 21, 2019
2 checks passed
Loading
@Snakegodeater
Copy link

@Snakegodeater Snakegodeater commented Jun 21, 2019

I still get this error with God of War ascension !
4790k + R9 380

E {RSX [0x028269c]} RSX: nv406e::semaphore_acquire has timed out. semaphore_address=0x50300510

Loading

@elad335 elad335 deleted the sema branch Jun 22, 2019
Yahfz added a commit to Yahfz/rpcs3 that referenced this issue Jul 11, 2019
Add raw() methods for endianness support types and make use of it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants