mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add FSR3 frame generation runtime stats to performance HUD
This commit is contained in:
parent
e600f003ca
commit
5ad4b9be2d
3 changed files with 25 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <future>
|
||||
#include <cstddef>
|
||||
#include <glm/glm.hpp>
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <vk_mem_alloc.h>
|
||||
|
|
@ -293,6 +294,9 @@ public:
|
|||
#endif
|
||||
bool isAmdFsr3FramegenRuntimeActive() const { return fsr2_.amdFsr3FramegenRuntimeActive; }
|
||||
bool isAmdFsr3FramegenRuntimeReady() const { return fsr2_.amdFsr3FramegenRuntimeReady; }
|
||||
size_t getAmdFsr3UpscaleDispatchCount() const { return fsr2_.amdFsr3UpscaleDispatchCount; }
|
||||
size_t getAmdFsr3FramegenDispatchCount() const { return fsr2_.amdFsr3FramegenDispatchCount; }
|
||||
size_t getAmdFsr3FallbackCount() const { return fsr2_.amdFsr3FallbackCount; }
|
||||
|
||||
void setWaterRefractionEnabled(bool enabled);
|
||||
bool isWaterRefractionEnabled() const;
|
||||
|
|
@ -444,6 +448,9 @@ private:
|
|||
bool amdFsr3FramegenEnabled = false;
|
||||
bool amdFsr3FramegenRuntimeActive = false;
|
||||
bool amdFsr3FramegenRuntimeReady = false;
|
||||
size_t amdFsr3UpscaleDispatchCount = 0;
|
||||
size_t amdFsr3FramegenDispatchCount = 0;
|
||||
size_t amdFsr3FallbackCount = 0;
|
||||
float jitterSign = 0.38f;
|
||||
float motionVecScaleX = 1.0f;
|
||||
float motionVecScaleY = 1.0f;
|
||||
|
|
|
|||
|
|
@ -203,6 +203,17 @@ void PerformanceHUD::render(const Renderer* renderer, const Camera* camera) {
|
|||
if (renderer->isFSR2Enabled()) {
|
||||
ImGui::TextColored(ImVec4(0.4f, 0.9f, 1.0f, 1.0f), "FSR 2.2: ON");
|
||||
ImGui::Text(" JitterSign=%.2f", renderer->getFSR2JitterSign());
|
||||
const bool fgEnabled = renderer->isAmdFsr3FramegenEnabled();
|
||||
const bool fgReady = renderer->isAmdFsr3FramegenRuntimeReady();
|
||||
const bool fgActive = renderer->isAmdFsr3FramegenRuntimeActive();
|
||||
const char* fgStatus = "Disabled";
|
||||
if (fgEnabled) {
|
||||
fgStatus = fgActive ? "Active" : (fgReady ? "Ready (waiting/fallback)" : "Unavailable");
|
||||
}
|
||||
ImGui::Text(" FSR3 FG: %s", fgStatus);
|
||||
ImGui::Text(" FG Dispatches: %zu", renderer->getAmdFsr3FramegenDispatchCount());
|
||||
ImGui::Text(" Upscale Dispatches: %zu", renderer->getAmdFsr3UpscaleDispatchCount());
|
||||
ImGui::Text(" FG Fallbacks: %zu", renderer->getAmdFsr3FallbackCount());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
|
|
|
|||
|
|
@ -3759,6 +3759,9 @@ bool Renderer::initFSR2Resources() {
|
|||
fsr2_.amdFsr3FramegenRuntimeActive = false;
|
||||
fsr2_.amdFsr3FramegenRuntimeReady = false;
|
||||
fsr2_.framegenOutputValid = false;
|
||||
fsr2_.amdFsr3UpscaleDispatchCount = 0;
|
||||
fsr2_.amdFsr3FramegenDispatchCount = 0;
|
||||
fsr2_.amdFsr3FallbackCount = 0;
|
||||
#if WOWEE_HAS_AMD_FSR2
|
||||
LOG_INFO("FSR2: AMD FidelityFX SDK detected at build time.");
|
||||
#else
|
||||
|
|
@ -4479,9 +4482,11 @@ void Renderer::dispatchAmdFsr3Framegen() {
|
|||
warnedRuntimeDispatch = true;
|
||||
LOG_WARNING("FSR3 runtime upscale dispatch failed; falling back to FSR2 dispatch output.");
|
||||
}
|
||||
fsr2_.amdFsr3FallbackCount++;
|
||||
fsr2_.amdFsr3FramegenRuntimeActive = false;
|
||||
return;
|
||||
}
|
||||
fsr2_.amdFsr3UpscaleDispatchCount++;
|
||||
|
||||
if (!fsr2_.amdFsr3FramegenEnabled) {
|
||||
fsr2_.amdFsr3FramegenRuntimeActive = false;
|
||||
|
|
@ -4497,9 +4502,11 @@ void Renderer::dispatchAmdFsr3Framegen() {
|
|||
warnedFgDispatch = true;
|
||||
LOG_WARNING("FSR3 runtime frame generation dispatch failed; using upscaled output only.");
|
||||
}
|
||||
fsr2_.amdFsr3FallbackCount++;
|
||||
fsr2_.amdFsr3FramegenRuntimeActive = false;
|
||||
return;
|
||||
}
|
||||
fsr2_.amdFsr3FramegenDispatchCount++;
|
||||
fsr2_.framegenOutputValid = true;
|
||||
fsr2_.amdFsr3FramegenRuntimeActive = true;
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue