summaryrefslogtreecommitdiffstats
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.cpp24
-rw-r--r--src/video_core/engines/maxwell_dma.cpp4
2 files changed, 18 insertions, 10 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 592c28ba3..95ba4f76c 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -586,14 +586,22 @@ void Maxwell3D::ProcessQueryCondition() {
}
void Maxwell3D::ProcessCounterReset() {
- switch (regs.clear_report_value) {
- case Regs::ClearReport::ZPassPixelCount:
- rasterizer->ResetCounter(VideoCommon::QueryType::ZPassPixelCount64);
- break;
- default:
- LOG_DEBUG(Render_OpenGL, "Unimplemented counter reset={}", regs.clear_report_value);
- break;
- }
+ const auto query_type = [clear_report = regs.clear_report_value]() {
+ switch (clear_report) {
+ case Tegra::Engines::Maxwell3D::Regs::ClearReport::ZPassPixelCount:
+ return VideoCommon::QueryType::ZPassPixelCount64;
+ case Tegra::Engines::Maxwell3D::Regs::ClearReport::StreamingPrimitivesSucceeded:
+ return VideoCommon::QueryType::StreamingPrimitivesSucceeded;
+ case Tegra::Engines::Maxwell3D::Regs::ClearReport::PrimitivesGenerated:
+ return VideoCommon::QueryType::PrimitivesGenerated;
+ case Tegra::Engines::Maxwell3D::Regs::ClearReport::VtgPrimitivesOut:
+ return VideoCommon::QueryType::VtgPrimitivesOut;
+ default:
+ LOG_DEBUG(HW_GPU, "Unimplemented counter reset={}", clear_report);
+ return VideoCommon::QueryType::Payload;
+ }
+ }();
+ rasterizer->ResetCounter(query_type);
}
void Maxwell3D::ProcessSyncPoint() {
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index 422d4d859..56fbff306 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -228,7 +228,7 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
memory_manager, src_operand.address, src_size, &read_buffer);
- Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite>
+ Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite>
tmp_write_buffer(memory_manager, dst_operand.address, dst_size, &write_buffer);
UnswizzleSubrect(tmp_write_buffer, tmp_read_buffer, bytes_per_pixel, width, height, depth,
@@ -292,7 +292,7 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
GPUVAddr dst_addr = regs.offset_out;
Core::Memory::GpuGuestMemory<u8, Core::Memory::GuestMemoryFlags::SafeRead> tmp_read_buffer(
memory_manager, src_addr, src_size, &read_buffer);
- Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::SafeReadCachedWrite>
+ Core::Memory::GpuGuestMemoryScoped<u8, Core::Memory::GuestMemoryFlags::UnsafeReadCachedWrite>
tmp_write_buffer(memory_manager, dst_addr, dst_size, &write_buffer);
// If the input is linear and the output is tiled, swizzle the input and copy it over.