mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
VideoCommon: disable efb access + perf querys on cph thread
The usual way to handle this kind of request is to rise a flag which the gpu thread polls. The gpu thread itself either generates the result or just write zeros if disabled. After this, it rise another flag which says that this work is done. So if disabled, we still have the cpu-gpu round trip time. This commit just returns 0 on the cpu thread instead of playing ping pong...
This commit is contained in:
parent
45f74840d6
commit
eb310cbd1d
@ -343,9 +343,6 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
|||||||
D3D11_MAPPED_SUBRESOURCE map;
|
D3D11_MAPPED_SUBRESOURCE map;
|
||||||
ID3D11Texture2D* read_tex;
|
ID3D11Texture2D* read_tex;
|
||||||
|
|
||||||
if (!g_ActiveConfig.bEFBAccessEnable)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (type == POKE_Z)
|
if (type == POKE_Z)
|
||||||
{
|
{
|
||||||
static bool alert_only_once = true;
|
static bool alert_only_once = true;
|
||||||
|
@ -968,9 +968,6 @@ void Renderer::UpdateEFBCache(EFBAccessType type, u32 cacheRectIdx, const EFBRec
|
|||||||
// - GX_PokeZMode (TODO)
|
// - GX_PokeZMode (TODO)
|
||||||
u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
|
||||||
{
|
{
|
||||||
if (!g_ActiveConfig.bEFBAccessEnable)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
u32 cacheRectIdx = (y / EFB_CACHE_RECT_SIZE) * EFB_CACHE_WIDTH
|
u32 cacheRectIdx = (y / EFB_CACHE_RECT_SIZE) * EFB_CACHE_WIDTH
|
||||||
+ (x / EFB_CACHE_RECT_SIZE);
|
+ (x / EFB_CACHE_RECT_SIZE);
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ void VideoFifo_CheckEFBAccess()
|
|||||||
|
|
||||||
u32 VideoBackendHardware::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
|
u32 VideoBackendHardware::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
|
||||||
{
|
{
|
||||||
if (s_BackendInitialized)
|
if (s_BackendInitialized && g_ActiveConfig.bEFBAccessEnable)
|
||||||
{
|
{
|
||||||
s_accessEFBArgs.type = type;
|
s_accessEFBArgs.type = type;
|
||||||
s_accessEFBArgs.x = x;
|
s_accessEFBArgs.x = x;
|
||||||
@ -193,6 +193,11 @@ void VideoFifo_CheckPerfQueryRequest()
|
|||||||
|
|
||||||
u32 VideoBackendHardware::Video_GetQueryResult(PerfQueryType type)
|
u32 VideoBackendHardware::Video_GetQueryResult(PerfQueryType type)
|
||||||
{
|
{
|
||||||
|
if(!g_perf_query->ShouldEmulate())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Is this check sane?
|
// TODO: Is this check sane?
|
||||||
if (!g_perf_query->IsFlushed())
|
if (!g_perf_query->IsFlushed())
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@ public:
|
|||||||
virtual ~PerfQueryBase() {}
|
virtual ~PerfQueryBase() {}
|
||||||
|
|
||||||
// Checks if performance queries are enabled in the gameini configuration.
|
// Checks if performance queries are enabled in the gameini configuration.
|
||||||
|
// NOTE: Called from CPU+GPU thread
|
||||||
bool ShouldEmulate() const;
|
bool ShouldEmulate() const;
|
||||||
|
|
||||||
// Begin querying the specified value for the following host GPU commands
|
// Begin querying the specified value for the following host GPU commands
|
||||||
|
Loading…
Reference in New Issue
Block a user