mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-01 03:32:07 +00:00
rsx: Implement dma abort in case of a reset after misprediction
This commit is contained in:
parent
0f11939faf
commit
71e809a78b
@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "../rsx_cache.h"
|
||||
#include "texture_cache_predictor.h"
|
||||
@ -1114,6 +1114,9 @@ namespace rsx
|
||||
invalidate_range();
|
||||
}
|
||||
|
||||
virtual void dma_abort()
|
||||
{}
|
||||
|
||||
public:
|
||||
/**
|
||||
* Dirty/Unreleased Flag
|
||||
@ -1276,6 +1279,12 @@ namespace rsx
|
||||
|
||||
void reprotect(const utils::protection prot)
|
||||
{
|
||||
if (synchronized && !flushed)
|
||||
{
|
||||
// Abort enqueued transfer
|
||||
dma_abort();
|
||||
}
|
||||
|
||||
//Reset properties and protect again
|
||||
flushed = false;
|
||||
synchronized = false;
|
||||
@ -1286,6 +1295,12 @@ namespace rsx
|
||||
|
||||
void reprotect(const utils::protection prot, const std::pair<u32, u32>& range)
|
||||
{
|
||||
if (synchronized && !flushed)
|
||||
{
|
||||
// Abort enqueued transfer
|
||||
dma_abort();
|
||||
}
|
||||
|
||||
//Reset properties and protect again
|
||||
flushed = false;
|
||||
synchronized = false;
|
||||
|
@ -96,6 +96,14 @@ namespace vk
|
||||
}
|
||||
}
|
||||
|
||||
void dma_abort() override
|
||||
{
|
||||
// Called if a reset occurs, usually via reprotect path after a bad prediction.
|
||||
// Discard the sync event, the next sync, if any, will properly recreate this.
|
||||
verify(HERE), synchronized, !flushed, dma_fence;
|
||||
vk::get_resource_manager()->dispose(dma_fence);
|
||||
}
|
||||
|
||||
void destroy()
|
||||
{
|
||||
if (!exists())
|
||||
|
Loading…
Reference in New Issue
Block a user