diff options
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.h | 4 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_dma.cpp | 37 |
2 files changed, 22 insertions, 19 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index a948fcb14..910ab213a 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -2970,7 +2970,7 @@ public: CullFace gl_cull_face; ///< 0x1920 Viewport::PixelCenter viewport_pixel_center; ///< 0x1924 INSERT_PADDING_BYTES_NOINIT(0x4); - u32 viewport_scale_offset_enbled; ///< 0x192C + u32 viewport_scale_offset_enabled; ///< 0x192C INSERT_PADDING_BYTES_NOINIT(0xC); ViewportClipControl viewport_clip_control; ///< 0x193C UserClip::Op user_clip_op; ///< 0x1940 @@ -3482,7 +3482,7 @@ ASSERT_REG_POSITION(gl_cull_test_enabled, 0x1918); ASSERT_REG_POSITION(gl_front_face, 0x191C); ASSERT_REG_POSITION(gl_cull_face, 0x1920); ASSERT_REG_POSITION(viewport_pixel_center, 0x1924); -ASSERT_REG_POSITION(viewport_scale_offset_enbled, 0x192C); +ASSERT_REG_POSITION(viewport_scale_offset_enabled, 0x192C); ASSERT_REG_POSITION(viewport_clip_control, 0x193C); ASSERT_REG_POSITION(user_clip_op, 0x1940); ASSERT_REG_POSITION(render_enable_override, 0x1944); diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index 4eb7a100d..54523a4b2 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -102,26 +102,29 @@ void MaxwellDMA::Launch() { const bool is_src_pitch = IsPitchKind(static_cast<PTEKind>(src_kind)); const bool is_dst_pitch = IsPitchKind(static_cast<PTEKind>(dst_kind)); if (!is_src_pitch && is_dst_pitch) { - std::vector<u8> tmp_buffer(regs.line_length_in); - std::vector<u8> dst_buffer(regs.line_length_in); - memory_manager.ReadBlockUnsafe(regs.offset_in, tmp_buffer.data(), - regs.line_length_in); - for (u32 offset = 0; offset < regs.line_length_in; ++offset) { - dst_buffer[offset] = - tmp_buffer[convert_linear_2_blocklinear_addr(regs.offset_in + offset) - - regs.offset_in]; + UNIMPLEMENTED_IF(regs.line_length_in % 16 != 0); + UNIMPLEMENTED_IF(regs.offset_in % 16 != 0); + UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); + std::vector<u8> tmp_buffer(16); + for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { + memory_manager.ReadBlockUnsafe( + convert_linear_2_blocklinear_addr(regs.offset_in + offset), + tmp_buffer.data(), tmp_buffer.size()); + memory_manager.WriteBlock(regs.offset_out + offset, tmp_buffer.data(), + tmp_buffer.size()); } - memory_manager.WriteBlock(regs.offset_out, dst_buffer.data(), regs.line_length_in); } else if (is_src_pitch && !is_dst_pitch) { - std::vector<u8> tmp_buffer(regs.line_length_in); - std::vector<u8> dst_buffer(regs.line_length_in); - memory_manager.ReadBlockUnsafe(regs.offset_in, tmp_buffer.data(), - regs.line_length_in); - for (u32 offset = 0; offset < regs.line_length_in; ++offset) { - dst_buffer[convert_linear_2_blocklinear_addr(regs.offset_out + offset) - - regs.offset_out] = tmp_buffer[offset]; + UNIMPLEMENTED_IF(regs.line_length_in % 16 != 0); + UNIMPLEMENTED_IF(regs.offset_in % 16 != 0); + UNIMPLEMENTED_IF(regs.offset_out % 16 != 0); + std::vector<u8> tmp_buffer(16); + for (u32 offset = 0; offset < regs.line_length_in; offset += 16) { + memory_manager.ReadBlockUnsafe(regs.offset_in + offset, tmp_buffer.data(), + tmp_buffer.size()); + memory_manager.WriteBlock( + convert_linear_2_blocklinear_addr(regs.offset_out + offset), + tmp_buffer.data(), tmp_buffer.size()); } - memory_manager.WriteBlock(regs.offset_out, dst_buffer.data(), regs.line_length_in); } else { if (!accelerate.BufferCopy(regs.offset_in, regs.offset_out, regs.line_length_in)) { std::vector<u8> tmp_buffer(regs.line_length_in); |
