surface_params: Add sample count to surface debug name

This commit is contained in:
Wunkolo 2023-11-13 16:33:08 -08:00
parent ee7588230b
commit 8356700ef7
3 changed files with 6 additions and 6 deletions

View file

@ -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<u32>(sample_count), levels, addr,
end, custom ? "custom," : "", scaled ? "scaled" : "unscaled");
}
bool SurfaceParams::operator==(const SurfaceParams& other) const noexcept {

View file

@ -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;

View file

@ -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);
}