aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp6
-rw-r--r--src/video_core/engines/maxwell_3d.h14
-rw-r--r--src/video_core/engines/maxwell_dma.cpp13
3 files changed, 19 insertions, 14 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index d4652b167..3a4646289 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -173,6 +173,8 @@ void Maxwell3D::ProcessMethodCall(u32 method, u32 argument, u32 nonshadow_argume
case MAXWELL3D_REG_INDEX(shadow_ram_control):
shadow_state.shadow_ram_control = static_cast<Regs::ShadowRamControl>(nonshadow_argument);
return;
+ case MAXWELL3D_REG_INDEX(macros.upload_address):
+ return macro_engine->ClearCode(regs.macros.upload_address);
case MAXWELL3D_REG_INDEX(macros.data):
return macro_engine->AddCode(regs.macros.upload_address, argument);
case MAXWELL3D_REG_INDEX(macros.bind):
@@ -593,8 +595,8 @@ void Maxwell3D::DrawArrays() {
std::optional<u64> Maxwell3D::GetQueryResult() {
switch (regs.query.query_get.select) {
- case Regs::QuerySelect::Zero:
- return 0;
+ case Regs::QuerySelect::Payload:
+ return regs.query.query_sequence;
case Regs::QuerySelect::SamplesPassed:
// Deferred.
rasterizer->Query(regs.query.QueryAddress(), QueryType::SamplesPassed,
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index c0c2c7d96..5f9eb208c 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -93,7 +93,7 @@ public:
};
enum class QuerySelect : u32 {
- Zero = 0,
+ Payload = 0,
TimeElapsed = 2,
TransformFeedbackPrimitivesGenerated = 11,
PrimitivesGenerated = 18,
@@ -202,7 +202,7 @@ public:
case Size::Size_11_11_10:
return 3;
default:
- UNREACHABLE();
+ ASSERT(false);
return 1;
}
}
@@ -238,7 +238,7 @@ public:
case Size::Size_11_11_10:
return 4;
default:
- UNREACHABLE();
+ ASSERT(false);
return 1;
}
}
@@ -274,7 +274,7 @@ public:
case Size::Size_11_11_10:
return "11_11_10";
default:
- UNREACHABLE();
+ ASSERT(false);
return {};
}
}
@@ -296,7 +296,7 @@ public:
case Type::Float:
return "FLOAT";
}
- UNREACHABLE();
+ ASSERT(false);
return {};
}
@@ -336,7 +336,7 @@ public:
case 3:
return {x3, y3};
default:
- UNREACHABLE();
+ ASSERT(false);
return {0, 0};
}
}
@@ -1193,7 +1193,7 @@ public:
case IndexFormat::UnsignedInt:
return 4;
}
- UNREACHABLE();
+ ASSERT(false);
return 1;
}
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index 76e8bc656..0efe58282 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -62,7 +62,7 @@ void MaxwellDMA::Launch() {
if (!is_src_pitch && !is_dst_pitch) {
// If both the source and the destination are in block layout, assert.
- UNREACHABLE_MSG("Tiled->Tiled DMA transfers are not yet implemented");
+ UNIMPLEMENTED_MSG("Tiled->Tiled DMA transfers are not yet implemented");
return;
}
@@ -134,7 +134,8 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
// Deswizzle the input and copy it over.
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
- const u32 bytes_per_pixel = regs.pitch_out / regs.line_length_in;
+ const u32 bytes_per_pixel =
+ regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1;
const Parameters& src_params = regs.src_params;
const u32 width = src_params.width;
const u32 height = src_params.height;
@@ -166,7 +167,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
const auto& dst_params = regs.dst_params;
- const u32 bytes_per_pixel = regs.pitch_in / regs.line_length_in;
+ const u32 bytes_per_pixel =
+ regs.launch_dma.remap_enable ? regs.pitch_in / regs.line_length_in : 1;
const u32 width = dst_params.width;
const u32 height = dst_params.height;
const u32 depth = dst_params.depth;
@@ -210,7 +212,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
}
void MaxwellDMA::FastCopyBlockLinearToPitch() {
- const u32 bytes_per_pixel = regs.pitch_out / regs.line_length_in;
+ const u32 bytes_per_pixel =
+ regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1;
const size_t src_size = GOB_SIZE;
const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count;
u32 pos_x = regs.src_params.origin.x;
@@ -257,7 +260,7 @@ void MaxwellDMA::ReleaseSemaphore() {
memory_manager.Write<u64>(address + 8, system.GPU().GetTicks());
break;
default:
- UNREACHABLE_MSG("Unknown semaphore type: {}", static_cast<u32>(type.Value()));
+ ASSERT_MSG(false, "Unknown semaphore type: {}", static_cast<u32>(type.Value()));
}
}