mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-11-24 11:28:15 +00:00
Merge pull request #1272 from Subv/dma_2d
GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.
This commit is contained in:
commit
223ddb2008
1 changed files with 10 additions and 2 deletions
|
@ -41,7 +41,6 @@ void MaxwellDMA::HandleCopy() {
|
||||||
|
|
||||||
// TODO(Subv): Perform more research and implement all features of this engine.
|
// TODO(Subv): Perform more research and implement all features of this engine.
|
||||||
ASSERT(regs.exec.enable_swizzle == 0);
|
ASSERT(regs.exec.enable_swizzle == 0);
|
||||||
ASSERT(regs.exec.enable_2d == 1);
|
|
||||||
ASSERT(regs.exec.query_mode == Regs::QueryMode::None);
|
ASSERT(regs.exec.query_mode == Regs::QueryMode::None);
|
||||||
ASSERT(regs.exec.query_intr == Regs::QueryIntr::None);
|
ASSERT(regs.exec.query_intr == Regs::QueryIntr::None);
|
||||||
ASSERT(regs.exec.copy_mode == Regs::CopyMode::Unk2);
|
ASSERT(regs.exec.copy_mode == Regs::CopyMode::Unk2);
|
||||||
|
@ -51,10 +50,19 @@ void MaxwellDMA::HandleCopy() {
|
||||||
ASSERT(regs.dst_params.pos_y == 0);
|
ASSERT(regs.dst_params.pos_y == 0);
|
||||||
|
|
||||||
if (regs.exec.is_dst_linear == regs.exec.is_src_linear) {
|
if (regs.exec.is_dst_linear == regs.exec.is_src_linear) {
|
||||||
Memory::CopyBlock(dest_cpu, source_cpu, regs.x_count * regs.y_count);
|
size_t copy_size = regs.x_count;
|
||||||
|
|
||||||
|
// When the enable_2d bit is disabled, the copy is performed as if we were copying a 1D
|
||||||
|
// buffer of length `x_count`, otherwise we copy a 2D buffer of size (x_count, y_count).
|
||||||
|
if (regs.exec.enable_2d) {
|
||||||
|
copy_size = copy_size * regs.y_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
Memory::CopyBlock(dest_cpu, source_cpu, copy_size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT(regs.exec.enable_2d == 1);
|
||||||
u8* src_buffer = Memory::GetPointer(source_cpu);
|
u8* src_buffer = Memory::GetPointer(source_cpu);
|
||||||
u8* dst_buffer = Memory::GetPointer(dest_cpu);
|
u8* dst_buffer = Memory::GetPointer(dest_cpu);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue