summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/citra_qt/debugger/graphics_breakpoints.cpp2
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.hxx2
-rw-r--r--src/video_core/pica.h18
3 files changed, 14 insertions, 8 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp
index db98a3b05..5973aafc8 100644
--- a/src/citra_qt/debugger/graphics_breakpoints.cpp
+++ b/src/citra_qt/debugger/graphics_breakpoints.cpp
@@ -43,7 +43,7 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const
43 map.insert({Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch")}); 43 map.insert({Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch")});
44 map.insert({Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch")}); 44 map.insert({Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch")});
45 45
46 _dbg_assert_(GPU, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents)); 46 _dbg_assert_(GUI, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
47 47
48 return map[event]; 48 return map[event];
49 } else if (index.column() == 1) { 49 } else if (index.column() == 1) {
diff --git a/src/citra_qt/debugger/graphics_framebuffer.hxx b/src/citra_qt/debugger/graphics_framebuffer.hxx
index bb73b2f72..1151ee7a1 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.hxx
+++ b/src/citra_qt/debugger/graphics_framebuffer.hxx
@@ -15,7 +15,7 @@ class QSpinBox;
15class CSpinBox; 15class CSpinBox;
16 16
17// Utility class which forwards calls to OnPicaBreakPointHit and OnPicaResume to public slots. 17// Utility class which forwards calls to OnPicaBreakPointHit and OnPicaResume to public slots.
18// This is because the Pica breakpoint callbacks will called on a non-GUI thread, while 18// This is because the Pica breakpoint callbacks are called from a non-GUI thread, while
19// the widget usually wants to perform reactions in the GUI thread. 19// the widget usually wants to perform reactions in the GUI thread.
20class BreakPointObserverDock : public QDockWidget, Pica::DebugContext::BreakPointObserver { 20class BreakPointObserverDock : public QDockWidget, Pica::DebugContext::BreakPointObserver {
21 Q_OBJECT 21 Q_OBJECT
diff --git a/src/video_core/pica.h b/src/video_core/pica.h
index c1f35a011..b463a32ef 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -131,16 +131,22 @@ struct Regs {
131 }; 131 };
132 132
133 static unsigned BytesPerPixel(TextureFormat format) { 133 static unsigned BytesPerPixel(TextureFormat format) {
134 if (format == TextureFormat::RGBA8) 134 switch (format) {
135 case TextureFormat::RGBA8:
135 return 4; 136 return 4;
136 else if (format == TextureFormat::RGB8) 137
138 case TextureFormat::RGB8:
137 return 3; 139 return 3;
138 else if (format == TextureFormat::RGBA5551 || 140
139 format == TextureFormat::RGB565 || 141 case TextureFormat::RGBA5551:
140 format == TextureFormat::RGBA4) 142 case TextureFormat::RGB565:
143 case TextureFormat::RGBA4:
141 return 2; 144 return 2;
142 else // placeholder 145
146 default:
147 // placeholder for yet unknown formats
143 return 1; 148 return 1;
149 }
144 } 150 }
145 151
146 BitField< 0, 1, u32> texturing_enable; 152 BitField< 0, 1, u32> texturing_enable;