summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-01-28 05:51:59 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-02-04 22:59:09 +0100
commit9017093f58fb08b85cfb842f305efa667d62cecb (patch)
tree98a1e77b197a562a8f13565e62f2e8bb9220ff94 /src/citra_qt
parentVideoCore: Split rasterizer regs from Regs struct (diff)
downloadyuzu-9017093f58fb08b85cfb842f305efa667d62cecb.tar
yuzu-9017093f58fb08b85cfb842f305efa667d62cecb.tar.gz
yuzu-9017093f58fb08b85cfb842f305efa667d62cecb.tar.bz2
yuzu-9017093f58fb08b85cfb842f305efa667d62cecb.tar.lz
yuzu-9017093f58fb08b85cfb842f305efa667d62cecb.tar.xz
yuzu-9017093f58fb08b85cfb842f305efa667d62cecb.tar.zst
yuzu-9017093f58fb08b85cfb842f305efa667d62cecb.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/debugger/graphics/graphics_cmdlists.cpp22
-rw-r--r--src/citra_qt/debugger/graphics/graphics_surface.cpp7
2 files changed, 16 insertions, 13 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp
index ee79f0edf..adaa18cfc 100644
--- a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp
@@ -123,15 +123,16 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace&
void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
const unsigned int command_id =
list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt();
- if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
- COMMAND_IN_RANGE(command_id, texture2)) {
+ if (COMMAND_IN_RANGE(command_id, texturing.texture0) ||
+ COMMAND_IN_RANGE(command_id, texturing.texture1) ||
+ COMMAND_IN_RANGE(command_id, texturing.texture2)) {
unsigned texture_index;
- if (COMMAND_IN_RANGE(command_id, texture0)) {
+ if (COMMAND_IN_RANGE(command_id, texturing.texture0)) {
texture_index = 0;
- } else if (COMMAND_IN_RANGE(command_id, texture1)) {
+ } else if (COMMAND_IN_RANGE(command_id, texturing.texture1)) {
texture_index = 1;
- } else if (COMMAND_IN_RANGE(command_id, texture2)) {
+ } else if (COMMAND_IN_RANGE(command_id, texturing.texture2)) {
texture_index = 2;
} else {
UNREACHABLE_MSG("Unknown texture command");
@@ -146,19 +147,20 @@ void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) {
const unsigned int command_id =
list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt();
- if (COMMAND_IN_RANGE(command_id, texture0) || COMMAND_IN_RANGE(command_id, texture1) ||
- COMMAND_IN_RANGE(command_id, texture2)) {
+ if (COMMAND_IN_RANGE(command_id, texturing.texture0) ||
+ COMMAND_IN_RANGE(command_id, texturing.texture1) ||
+ COMMAND_IN_RANGE(command_id, texturing.texture2)) {
unsigned texture_index;
- if (COMMAND_IN_RANGE(command_id, texture0)) {
+ if (COMMAND_IN_RANGE(command_id, texturing.texture0)) {
texture_index = 0;
- } else if (COMMAND_IN_RANGE(command_id, texture1)) {
+ } else if (COMMAND_IN_RANGE(command_id, texturing.texture1)) {
texture_index = 1;
} else {
texture_index = 2;
}
- const auto texture = Pica::g_state.regs.GetTextures()[texture_index];
+ const auto texture = Pica::g_state.regs.texturing.GetTextures()[texture_index];
const auto config = texture.config;
const auto format = texture.format;
diff --git a/src/citra_qt/debugger/graphics/graphics_surface.cpp b/src/citra_qt/debugger/graphics/graphics_surface.cpp
index bd82b00d4..406a49f42 100644
--- a/src/citra_qt/debugger/graphics/graphics_surface.cpp
+++ b/src/citra_qt/debugger/graphics/graphics_surface.cpp
@@ -512,7 +512,7 @@ void GraphicsSurfaceWidget::OnUpdate() {
break;
}
- const auto texture = Pica::g_state.regs.GetTextures()[texture_index];
+ const auto texture = Pica::g_state.regs.texturing.GetTextures()[texture_index];
auto info = Pica::Texture::TextureInfo::FromPicaRegister(texture.config, texture.format);
surface_address = info.physical_address;
@@ -574,7 +574,7 @@ void GraphicsSurfaceWidget::OnUpdate() {
info.physical_address = surface_address;
info.width = surface_width;
info.height = surface_height;
- info.format = static_cast<Pica::Regs::TextureFormat>(surface_format);
+ info.format = static_cast<Pica::TexturingRegs::TextureFormat>(surface_format);
info.SetDefaultStride();
for (unsigned int y = 0; y < surface_height; ++y) {
@@ -689,7 +689,8 @@ void GraphicsSurfaceWidget::SaveSurface() {
unsigned int GraphicsSurfaceWidget::NibblesPerPixel(GraphicsSurfaceWidget::Format format) {
if (format <= Format::MaxTextureFormat) {
- return Pica::Regs::NibblesPerPixel(static_cast<Pica::Regs::TextureFormat>(format));
+ return Pica::TexturingRegs::NibblesPerPixel(
+ static_cast<Pica::TexturingRegs::TextureFormat>(format));
}
switch (format) {