mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
rsx: Trivial optimization
This commit is contained in:
parent
769f9e33e9
commit
651e58f443
1 changed files with 12 additions and 2 deletions
|
@ -43,6 +43,12 @@ namespace rsx
|
|||
// First, queue the GPU work. If it flushes the queue for us, the following routines will be faster.
|
||||
const bool handled = rsx->get_backend_config().supports_host_gpu_labels && rsx->release_GCM_label(address, data);
|
||||
|
||||
if (vm::_ref<RsxSemaphore>(address).val == data)
|
||||
{
|
||||
// It's a no-op to write the same value (although there is a delay in real-hw so it's more accurate to allow GPU label in this case)
|
||||
return;
|
||||
}
|
||||
|
||||
if constexpr (FlushDMA)
|
||||
{
|
||||
// If the backend handled the request, this call will basically be a NOP
|
||||
|
@ -77,10 +83,14 @@ namespace rsx
|
|||
{
|
||||
void set_reference(thread* rsx, u32 /*reg*/, u32 arg)
|
||||
{
|
||||
rsx->sync();
|
||||
|
||||
// Write ref+get (get will be written again with the same value at command end)
|
||||
auto& dma = vm::_ref<RsxDmaControl>(rsx->dma_address);
|
||||
|
||||
if (arg != dma.ref)
|
||||
{
|
||||
rsx->sync();
|
||||
}
|
||||
|
||||
dma.get.release(rsx->fifo_ctrl->get_pos());
|
||||
dma.ref.store(arg);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue