mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fix OGL perf queries and make them not slow!
This commit is contained in:
@ -260,35 +260,35 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
|
||||
// NOTE(neobrain): only PE_PERF_ZCOMP_OUTPUT is implemented in D3D11, but the other values shouldn't be contradictionary to the value of that register (i.e. INPUT registers should always be greater or equal to their corresponding OUTPUT registers).
|
||||
case PE_PERF_ZCOMP_INPUT_ZCOMPLOC_L:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_INPUT_ZCOMPLOC) & 0xFFFF;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_INPUT_ZCOMPLOC) & 0xFFFF;
|
||||
break;
|
||||
|
||||
case PE_PERF_ZCOMP_INPUT_ZCOMPLOC_H:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_INPUT_ZCOMPLOC) >> 16;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_INPUT_ZCOMPLOC) >> 16;
|
||||
break;
|
||||
|
||||
case PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_L:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_OUTPUT_ZCOMPLOC) & 0xFFFF;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_OUTPUT_ZCOMPLOC) & 0xFFFF;
|
||||
break;
|
||||
|
||||
case PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_H:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_OUTPUT_ZCOMPLOC) >> 16;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_OUTPUT_ZCOMPLOC) >> 16;
|
||||
break;
|
||||
|
||||
case PE_PERF_ZCOMP_INPUT_L:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_INPUT) & 0xFFFF;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_INPUT) & 0xFFFF;
|
||||
break;
|
||||
|
||||
case PE_PERF_ZCOMP_INPUT_H:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_INPUT) >> 16;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_INPUT) >> 16;
|
||||
break;
|
||||
|
||||
case PE_PERF_ZCOMP_OUTPUT_L:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_OUTPUT) & 0xFFFF;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_OUTPUT) & 0xFFFF;
|
||||
break;
|
||||
|
||||
case PE_PERF_ZCOMP_OUTPUT_H:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_ZCOMP_OUTPUT) >> 16;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_ZCOMP_OUTPUT) >> 16;
|
||||
break;
|
||||
|
||||
case PE_PERF_BLEND_INPUT_L:
|
||||
@ -298,19 +298,20 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||
// In very old builds, Dolphin only returned 0. That caused the challenge to be immediately finished without any goop being cleaned (the timer just didn't even start counting from 3:00:00).
|
||||
// Later builds returned 1 for the high register. That caused the timer to actually count down, but made the challenge unbeatable because the game always thought you didn't clear any goop at all.
|
||||
// Note that currently this functionality is only implemented in the D3D11 backend.
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_BLEND_INPUT) & 0xFFFF;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_BLEND_INPUT) & 0xFFFF;
|
||||
//ERROR_LOG(VIDEO, "PQ_BLEND_INPUT: %d", g_video_backend->Video_GetQueryResult(PQ_BLEND_INPUT));
|
||||
break;
|
||||
|
||||
case PE_PERF_BLEND_INPUT_H:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_BLEND_INPUT) >> 16;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_BLEND_INPUT) >> 16;
|
||||
break;
|
||||
|
||||
case PE_PERF_EFB_COPY_CLOCKS_L:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_EFB_COPY_CLOCKS) & 0xFFFF;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_EFB_COPY_CLOCKS) & 0xFFFF;
|
||||
break;
|
||||
|
||||
case PE_PERF_EFB_COPY_CLOCKS_H:
|
||||
_uReturnValue = g_perf_query->GetQueryResult(PQ_EFB_COPY_CLOCKS) >> 16;
|
||||
_uReturnValue = g_video_backend->Video_GetQueryResult(PQ_EFB_COPY_CLOCKS) >> 16;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user