rsx: Ignore sending system reserved semaphores to renderer

This commit is contained in:
Jake 2017-08-03 23:50:56 -05:00 committed by kd-11
parent 9d1aebce74
commit 7ecf6cb014

View File

@ -100,13 +100,14 @@ namespace rsx
void texture_read_semaphore_release(thread* rsx, u32 _reg, u32 arg) void texture_read_semaphore_release(thread* rsx, u32 _reg, u32 arg)
{ {
if (!rsx->do_method(NV4097_TEXTURE_READ_SEMAPHORE_RELEASE, arg)) const u32 index = method_registers.semaphore_offset_4097() >> 4;
// lle-gcm likes to inject system reserved semaphores, presumably for system/vsh usage
// Avoid calling render to avoid any havoc(flickering) they may cause from invalid flush/write
if (index > 63 && !rsx->do_method(NV4097_TEXTURE_READ_SEMAPHORE_RELEASE, arg))
{ {
// //
} }
const u32 index = method_registers.semaphore_offset_4097() >> 4;
auto& sema = vm::ps3::_ref<RsxReports>(rsx->label_addr); auto& sema = vm::ps3::_ref<RsxReports>(rsx->label_addr);
sema.semaphore[index].val = arg; sema.semaphore[index].val = arg;
sema.semaphore[index].pad = 0; sema.semaphore[index].pad = 0;
@ -115,12 +116,11 @@ namespace rsx
void back_end_write_semaphore_release(thread* rsx, u32 _reg, u32 arg) void back_end_write_semaphore_release(thread* rsx, u32 _reg, u32 arg)
{ {
if (!rsx->do_method(NV4097_BACK_END_WRITE_SEMAPHORE_RELEASE, arg)) const u32 index = method_registers.semaphore_offset_4097() >> 4;
if (index > 63 && !rsx->do_method(NV4097_BACK_END_WRITE_SEMAPHORE_RELEASE, arg))
{ {
// //
} }
const u32 index = method_registers.semaphore_offset_4097() >> 4;
u32 val = (arg & 0xff00ff00) | ((arg & 0xff) << 16) | ((arg >> 16) & 0xff); u32 val = (arg & 0xff00ff00) | ((arg & 0xff) << 16) | ((arg >> 16) & 0xff);
auto& sema = vm::ps3::_ref<RsxReports>(rsx->label_addr); auto& sema = vm::ps3::_ref<RsxReports>(rsx->label_addr);