From 8356700ef70c03437b73167f850ddbe4227f6380 Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Mon, 13 Nov 2023 16:33:08 -0800 Subject: [PATCH] surface_params: Add sample count to surface debug name --- src/video_core/rasterizer_cache/surface_params.cpp | 8 ++++---- src/video_core/rasterizer_cache/surface_params.h | 2 +- src/video_core/renderer_vulkan/vk_texture_runtime.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video_core/rasterizer_cache/surface_params.cpp b/src/video_core/rasterizer_cache/surface_params.cpp index 74ae8205c..97dde6e0a 100644 --- a/src/video_core/rasterizer_cache/surface_params.cpp +++ b/src/video_core/rasterizer_cache/surface_params.cpp @@ -219,12 +219,12 @@ u32 SurfaceParams::LevelOf(PAddr level_addr) const { return level; } -std::string SurfaceParams::DebugName(bool scaled, bool custom) const noexcept { +std::string SurfaceParams::DebugName(bool scaled, bool custom, u8 sample_count) const noexcept { const u32 scaled_width = scaled ? GetScaledWidth() : width; const u32 scaled_height = scaled ? GetScaledHeight() : height; - return fmt::format("Surface: {}x{} {} {} levels from {:#x} to {:#x} ({}{})", scaled_width, - scaled_height, PixelFormatAsString(pixel_format), levels, addr, end, - custom ? "custom," : "", scaled ? "scaled" : "unscaled"); + return fmt::format("Surface: {}x{} {} samples {} levels from {:#x} to {:#x} ({}{})", scaled_width, + scaled_height, PixelFormatAsString(pixel_format), static_cast(sample_count), levels, addr, + end, custom ? "custom," : "", scaled ? "scaled" : "unscaled"); } bool SurfaceParams::operator==(const SurfaceParams& other) const noexcept { diff --git a/src/video_core/rasterizer_cache/surface_params.h b/src/video_core/rasterizer_cache/surface_params.h index c05cb3c5e..9ae8aadb0 100644 --- a/src/video_core/rasterizer_cache/surface_params.h +++ b/src/video_core/rasterizer_cache/surface_params.h @@ -51,7 +51,7 @@ public: u32 LevelOf(PAddr addr) const; /// Returns a string identifier of the params object - std::string DebugName(bool scaled, bool custom = false) const noexcept; + std::string DebugName(bool scaled, bool custom = false, u8 sample_count = 1) const noexcept; bool operator==(const SurfaceParams& other) const noexcept; diff --git a/src/video_core/renderer_vulkan/vk_texture_runtime.cpp b/src/video_core/renderer_vulkan/vk_texture_runtime.cpp index 394f060dd..90179f1c9 100644 --- a/src/video_core/renderer_vulkan/vk_texture_runtime.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_runtime.cpp @@ -746,7 +746,7 @@ Surface::Surface(TextureRuntime& runtime_, const VideoCore::SurfaceParams& param if (vk::SampleCountFlagBits(sample_count) > vk::SampleCountFlagBits::e1) { handles[3] = MakeHandle(instance, GetScaledWidth(), GetScaledHeight(), levels, texture_type, format, vk::SampleCountFlagBits(sample_count), traits.usage, flags, - traits.aspect, need_format_list, DebugName(true)); + traits.aspect, need_format_list, DebugName(true, false, sample_count)); raw_images.emplace_back(handles[3].image); }