diff options
Diffstat (limited to 'src/yuzu/debugger')
| -rw-r--r-- | src/yuzu/debugger/graphics/graphics_breakpoints.cpp | 33 | ||||
| -rw-r--r-- | src/yuzu/debugger/graphics/graphics_breakpoints_p.h | 2 | ||||
| -rw-r--r-- | src/yuzu/debugger/graphics/graphics_surface.cpp | 10 | ||||
| -rw-r--r-- | src/yuzu/debugger/wait_tree.h | 1 | 
4 files changed, 25 insertions, 21 deletions
diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp index b5c88f944..67ed0ba6d 100644 --- a/src/yuzu/debugger/graphics/graphics_breakpoints.cpp +++ b/src/yuzu/debugger/graphics/graphics_breakpoints.cpp @@ -2,7 +2,6 @@  // Licensed under GPLv2 or any later version  // Refer to the license.txt file included. -#include <map>  #include <QLabel>  #include <QMetaType>  #include <QPushButton> @@ -32,21 +31,8 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const {      switch (role) {      case Qt::DisplayRole: {          if (index.column() == 0) { -            static const std::map<Tegra::DebugContext::Event, QString> map = { -                {Tegra::DebugContext::Event::MaxwellCommandLoaded, tr("Maxwell command loaded")}, -                {Tegra::DebugContext::Event::MaxwellCommandProcessed, -                 tr("Maxwell command processed")}, -                {Tegra::DebugContext::Event::IncomingPrimitiveBatch, -                 tr("Incoming primitive batch")}, -                {Tegra::DebugContext::Event::FinishedPrimitiveBatch, -                 tr("Finished primitive batch")}, -            }; - -            DEBUG_ASSERT(map.size() == -                         static_cast<std::size_t>(Tegra::DebugContext::Event::NumEvents)); -            return (map.find(event) != map.end()) ? map.at(event) : QString(); +            return DebugContextEventToString(event);          } -          break;      } @@ -128,6 +114,23 @@ void BreakPointModel::OnResumed() {      active_breakpoint = context->active_breakpoint;  } +QString BreakPointModel::DebugContextEventToString(Tegra::DebugContext::Event event) { +    switch (event) { +    case Tegra::DebugContext::Event::MaxwellCommandLoaded: +        return tr("Maxwell command loaded"); +    case Tegra::DebugContext::Event::MaxwellCommandProcessed: +        return tr("Maxwell command processed"); +    case Tegra::DebugContext::Event::IncomingPrimitiveBatch: +        return tr("Incoming primitive batch"); +    case Tegra::DebugContext::Event::FinishedPrimitiveBatch: +        return tr("Finished primitive batch"); +    case Tegra::DebugContext::Event::NumEvents: +        break; +    } + +    return tr("Unknown debug context event"); +} +  GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(      std::shared_ptr<Tegra::DebugContext> debug_context, QWidget* parent)      : QDockWidget(tr("Maxwell Breakpoints"), parent), Tegra::DebugContext::BreakPointObserver( diff --git a/src/yuzu/debugger/graphics/graphics_breakpoints_p.h b/src/yuzu/debugger/graphics/graphics_breakpoints_p.h index 7112b87e6..fb488e38f 100644 --- a/src/yuzu/debugger/graphics/graphics_breakpoints_p.h +++ b/src/yuzu/debugger/graphics/graphics_breakpoints_p.h @@ -29,6 +29,8 @@ public:      void OnResumed();  private: +    static QString DebugContextEventToString(Tegra::DebugContext::Event event); +      std::weak_ptr<Tegra::DebugContext> context_weak;      bool at_breakpoint;      Tegra::DebugContext::Event active_breakpoint; diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp index 44d423da2..707747422 100644 --- a/src/yuzu/debugger/graphics/graphics_surface.cpp +++ b/src/yuzu/debugger/graphics/graphics_surface.cpp @@ -382,13 +382,13 @@ void GraphicsSurfaceWidget::OnUpdate() {      // TODO: Implement a good way to visualize alpha components!      QImage decoded_image(surface_width, surface_height, QImage::Format_ARGB32); -    boost::optional<VAddr> address = gpu.MemoryManager().GpuToCpuAddress(surface_address); +    std::optional<VAddr> address = gpu.MemoryManager().GpuToCpuAddress(surface_address);      // TODO(bunnei): Will not work with BCn formats that swizzle 4x4 tiles.      // Needs to be fixed if we plan to use this feature more, otherwise we may remove it. -    auto unswizzled_data = -        Tegra::Texture::UnswizzleTexture(*address, 1, Tegra::Texture::BytesPerPixel(surface_format), -                                         surface_width, surface_height, 1U); +    auto unswizzled_data = Tegra::Texture::UnswizzleTexture( +        *address, 1, 1, Tegra::Texture::BytesPerPixel(surface_format), surface_width, +        surface_height, 1U);      auto texture_data = Tegra::Texture::DecodeTexture(unswizzled_data, surface_format,                                                        surface_width, surface_height); @@ -444,7 +444,7 @@ void GraphicsSurfaceWidget::SaveSurface() {              pixmap->save(&file, "PNG");      } else if (selectedFilter == bin_filter) {          auto& gpu = Core::System::GetInstance().GPU(); -        boost::optional<VAddr> address = gpu.MemoryManager().GpuToCpuAddress(surface_address); +        std::optional<VAddr> address = gpu.MemoryManager().GpuToCpuAddress(surface_address);          const u8* buffer = Memory::GetPointer(*address);          ASSERT_MSG(buffer != nullptr, "Memory not accessible"); diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.h index defbf734f..331f89885 100644 --- a/src/yuzu/debugger/wait_tree.h +++ b/src/yuzu/debugger/wait_tree.h @@ -11,7 +11,6 @@  #include <QAbstractItemModel>  #include <QDockWidget>  #include <QTreeView> -#include <boost/container/flat_set.hpp>  #include "common/common_types.h"  #include "core/hle/kernel/object.h"  | 
