diff --git a/src/core/debug_state.h b/src/core/debug_state.h index 217efd1a9..b1b8c00d6 100644 --- a/src/core/debug_state.h +++ b/src/core/debug_state.h @@ -158,6 +158,10 @@ public: float Framerate = 1.0f / 60.0f; float FrameDeltaTime; + std::pair game_resolution{}; + std::pair output_resolution{}; + bool is_using_fsr{}; + void ShowDebugMessage(std::string message) { if (message.empty()) { return; diff --git a/src/core/devtools/widget/frame_graph.cpp b/src/core/devtools/widget/frame_graph.cpp index d93de571a..8f3e133f5 100644 --- a/src/core/devtools/widget/frame_graph.cpp +++ b/src/core/devtools/widget/frame_graph.cpp @@ -74,7 +74,7 @@ void FrameGraph::Draw() { if (!is_open) { return; } - SetNextWindowSize({340.0, 185.0f}, ImGuiCond_FirstUseEver); + SetNextWindowSize({308.0, 270.0f}, ImGuiCond_FirstUseEver); if (Begin("Video debug info", &is_open)) { const auto& ctx = *GImGui; const auto& io = ctx.IO; @@ -88,13 +88,20 @@ void FrameGraph::Draw() { frameRate = 1000.0f / deltaTime; } + SeparatorText("Frame graph"); + DrawFrameGraph(); + + SeparatorText("Renderer info"); + Text("Frame time: %.3f ms (%.1f FPS)", deltaTime, frameRate); Text("Presenter time: %.3f ms (%.1f FPS)", io.DeltaTime * 1000.0f, 1.0f / io.DeltaTime); Text("Flip frame: %d Gnm submit frame: %d", DebugState.flip_frame_count.load(), DebugState.gnm_frame_count.load()); - - SeparatorText("Frame graph"); - DrawFrameGraph(); + Text("Game Res: %dx%d", DebugState.game_resolution.first, + DebugState.game_resolution.second); + Text("Output Res: %dx%d", DebugState.output_resolution.first, + DebugState.output_resolution.second); + Text("FSR: %s", DebugState.is_using_fsr ? "on" : "off"); } End(); } diff --git a/src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp b/src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp index 1cb9e3db4..1c54207e0 100644 --- a/src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp +++ b/src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp @@ -9,6 +9,7 @@ #include "video_core/renderer_vulkan/vk_shader_util.h" #define A_CPU +#include "core/debug_state.h" #include "video_core/host_shaders/fsr/ffx_a.h" #include "video_core/host_shaders/fsr/ffx_fsr1.h" @@ -139,12 +140,16 @@ vk::ImageView FsrPass::Render(vk::CommandBuffer cmdbuf, vk::ImageView input, vk::Extent2D input_size, vk::Extent2D output_size, Settings settings, bool hdr) { if (!settings.enable) { + DebugState.is_using_fsr = false; return input; } if (input_size.width >= output_size.width && input_size.height >= output_size.height) { + DebugState.is_using_fsr = false; return input; } + DebugState.is_using_fsr = true; + if (output_size != cur_size) { ResizeAndInvalidate(output_size.width, output_size.height); } diff --git a/src/video_core/renderer_vulkan/vk_presenter.cpp b/src/video_core/renderer_vulkan/vk_presenter.cpp index 2cdf851e3..dc7fa8860 100644 --- a/src/video_core/renderer_vulkan/vk_presenter.cpp +++ b/src/video_core/renderer_vulkan/vk_presenter.cpp @@ -458,6 +458,9 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop) if (vk_host_markers_enabled) { cmdbuf.endDebugUtilsLabelEXT(); } + + DebugState.game_resolution = {image_size.width, image_size.height}; + DebugState.output_resolution = {frame->width, frame->height}; } else { // Fix display of garbage images on startup on some drivers const std::array attachments = {{