mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 07:51:28 +12:00
rsx: Implement dma abort in case of a reset after misprediction
This commit is contained in:
parent
0f11939faf
commit
71e809a78b
2 changed files with 24 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../rsx_cache.h"
|
#include "../rsx_cache.h"
|
||||||
#include "texture_cache_predictor.h"
|
#include "texture_cache_predictor.h"
|
||||||
|
@ -1114,6 +1114,9 @@ namespace rsx
|
||||||
invalidate_range();
|
invalidate_range();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void dma_abort()
|
||||||
|
{}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Dirty/Unreleased Flag
|
* Dirty/Unreleased Flag
|
||||||
|
@ -1276,6 +1279,12 @@ namespace rsx
|
||||||
|
|
||||||
void reprotect(const utils::protection prot)
|
void reprotect(const utils::protection prot)
|
||||||
{
|
{
|
||||||
|
if (synchronized && !flushed)
|
||||||
|
{
|
||||||
|
// Abort enqueued transfer
|
||||||
|
dma_abort();
|
||||||
|
}
|
||||||
|
|
||||||
//Reset properties and protect again
|
//Reset properties and protect again
|
||||||
flushed = false;
|
flushed = false;
|
||||||
synchronized = false;
|
synchronized = false;
|
||||||
|
@ -1286,6 +1295,12 @@ namespace rsx
|
||||||
|
|
||||||
void reprotect(const utils::protection prot, const std::pair<u32, u32>& range)
|
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
|
//Reset properties and protect again
|
||||||
flushed = false;
|
flushed = false;
|
||||||
synchronized = 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()
|
void destroy()
|
||||||
{
|
{
|
||||||
if (!exists())
|
if (!exists())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue