summaryrefslogtreecommitdiffstats
path: root/src/yuzu
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-03-25 06:35:06 +0200
committerSubv <subv2112@gmail.com>2018-03-25 06:35:06 +0200
commit0ce52b1da2228f3325d94e52bead7335c8b07d1c (patch)
treedb027be43dcb9fecb99fc7f8e698d3affd7e28c2 /src/yuzu
parentGPU: Added a function to retrieve the active textures for a shader stage. (diff)
downloadyuzu-0ce52b1da2228f3325d94e52bead7335c8b07d1c.tar
yuzu-0ce52b1da2228f3325d94e52bead7335c8b07d1c.tar.gz
yuzu-0ce52b1da2228f3325d94e52bead7335c8b07d1c.tar.bz2
yuzu-0ce52b1da2228f3325d94e52bead7335c8b07d1c.tar.lz
yuzu-0ce52b1da2228f3325d94e52bead7335c8b07d1c.tar.xz
yuzu-0ce52b1da2228f3325d94e52bead7335c8b07d1c.tar.zst
yuzu-0ce52b1da2228f3325d94e52bead7335c8b07d1c.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/debugger/graphics/graphics_surface.cpp5
-rw-r--r--src/yuzu/main.cpp9
-rw-r--r--src/yuzu/main.h6
3 files changed, 16 insertions, 4 deletions
diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp
index d061013da..8e6509adc 100644
--- a/src/yuzu/debugger/graphics/graphics_surface.cpp
+++ b/src/yuzu/debugger/graphics/graphics_surface.cpp
@@ -341,7 +341,10 @@ void GraphicsSurfaceWidget::OnUpdate() {
surface_address = rt.Address();
surface_width = rt.horiz;
surface_height = rt.vert;
- surface_format = ConvertToTextureFormat(static_cast<Tegra::RenderTargetFormat>(rt.format));
+ if (rt.format != 0) {
+ surface_format =
+ ConvertToTextureFormat(static_cast<Tegra::RenderTargetFormat>(rt.format));
+ }
break;
}
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index b8c23ae15..bd323870b 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -25,6 +25,7 @@
#include "core/gdbstub/gdbstub.h"
#include "core/loader/loader.h"
#include "core/settings.h"
+#include "video_core/debug_utils/debug_utils.h"
#include "yuzu/about_dialog.h"
#include "yuzu/bootmanager.h"
#include "yuzu/configuration/config.h"
@@ -71,7 +72,7 @@ void GMainWindow::ShowCallouts() {}
GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
- Tegra::g_debug_context = Tegra::DebugContext::Construct();
+ debug_context = Tegra::DebugContext::Construct();
setAcceptDrops(true);
ui.setupUi(this);
@@ -165,12 +166,12 @@ void GMainWindow::InitializeDebugWidgets() {
connect(this, &GMainWindow::EmulationStopping, registersWidget,
&RegistersWidget::OnEmulationStopping);
- graphicsBreakpointsWidget = new GraphicsBreakPointsWidget(Tegra::g_debug_context, this);
+ graphicsBreakpointsWidget = new GraphicsBreakPointsWidget(debug_context, this);
addDockWidget(Qt::RightDockWidgetArea, graphicsBreakpointsWidget);
graphicsBreakpointsWidget->hide();
debug_menu->addAction(graphicsBreakpointsWidget->toggleViewAction());
- graphicsSurfaceWidget = new GraphicsSurfaceWidget(Tegra::g_debug_context, this);
+ graphicsSurfaceWidget = new GraphicsSurfaceWidget(debug_context, this);
addDockWidget(Qt::RightDockWidgetArea, graphicsSurfaceWidget);
graphicsSurfaceWidget->hide();
debug_menu->addAction(graphicsSurfaceWidget->toggleViewAction());
@@ -339,6 +340,8 @@ bool GMainWindow::LoadROM(const QString& filename) {
Core::System& system{Core::System::GetInstance()};
+ system.SetGPUDebugContext(debug_context);
+
const Core::System::ResultStatus result{system.Load(render_window, filename.toStdString())};
Core::Telemetry().AddField(Telemetry::FieldType::App, "Frontend", "Qt");
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index 0f89607c8..2471caf83 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -23,6 +23,10 @@ class ProfilerWidget;
class RegistersWidget;
class WaitTreeWidget;
+namespace Tegra {
+class DebugContext;
+}
+
class GMainWindow : public QMainWindow {
Q_OBJECT
@@ -135,6 +139,8 @@ private:
Ui::MainWindow ui;
+ std::shared_ptr<Tegra::DebugContext> debug_context;
+
GRenderWindow* render_window;
GameList* game_list;