decoders: correct block calculation
This commit is contained in:
parent
3dd7643214
commit
7232a1ed16
7 changed files with 41 additions and 29 deletions
|
@ -39,7 +39,7 @@ void State::ProcessData(const u32 data, const bool is_last_call) {
|
|||
UNIMPLEMENTED_IF(regs.dest.BlockWidth() != 0);
|
||||
UNIMPLEMENTED_IF(regs.dest.BlockDepth() != 0);
|
||||
const std::size_t dst_size = Tegra::Texture::CalculateSize(
|
||||
true, 1, regs.dest.width, regs.dest.height, 1, regs.dest.BlockHeight(), 1);
|
||||
true, 1, regs.dest.width, regs.dest.height, 1, regs.dest.BlockHeight(), 0);
|
||||
tmp_buffer.resize(dst_size);
|
||||
memory_manager.ReadBlock(address, tmp_buffer.data(), dst_size);
|
||||
Tegra::Texture::SwizzleKepler(regs.dest.width, regs.dest.height, regs.dest.x, regs.dest.y,
|
||||
|
|
|
@ -39,15 +39,15 @@ struct Registers {
|
|||
}
|
||||
|
||||
u32 BlockWidth() const {
|
||||
return block_width;
|
||||
return block_width.Value();
|
||||
}
|
||||
|
||||
u32 BlockHeight() const {
|
||||
return block_height;
|
||||
return block_height.Value();
|
||||
}
|
||||
|
||||
u32 BlockDepth() const {
|
||||
return block_depth;
|
||||
return block_depth.Value();
|
||||
}
|
||||
} dest;
|
||||
};
|
||||
|
|
|
@ -84,15 +84,15 @@ public:
|
|||
}
|
||||
|
||||
u32 BlockWidth() const {
|
||||
return block_width;
|
||||
return block_width.Value();
|
||||
}
|
||||
|
||||
u32 BlockHeight() const {
|
||||
return block_height;
|
||||
return block_height.Value();
|
||||
}
|
||||
|
||||
u32 BlockDepth() const {
|
||||
return block_depth;
|
||||
return block_depth.Value();
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(Surface) == 0x28, "Surface has incorrect size");
|
||||
|
|
|
@ -111,7 +111,7 @@ void MaxwellDMA::HandleCopy() {
|
|||
|
||||
memory_manager.WriteBlock(dest, write_buffer.data(), dst_size);
|
||||
} else {
|
||||
ASSERT(regs.dst_params.BlockDepth() == 0);
|
||||
ASSERT(regs.dst_params.BlockDepth() == 1);
|
||||
|
||||
const u32 src_bytes_per_pixel = regs.src_pitch / regs.x_count;
|
||||
|
||||
|
|
|
@ -59,11 +59,11 @@ public:
|
|||
};
|
||||
|
||||
u32 BlockHeight() const {
|
||||
return block_height;
|
||||
return block_height.Value();
|
||||
}
|
||||
|
||||
u32 BlockDepth() const {
|
||||
return block_depth;
|
||||
return block_depth.Value();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue