mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
Merge pull request #8313 from liamwhite/dma-bpp
maxwell_dma: fix bytes_per_pixel
This commit is contained in:
commit
dca63391b6
1 changed files with 6 additions and 3 deletions
|
@ -134,7 +134,8 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
|
||||||
|
|
||||||
// Deswizzle the input and copy it over.
|
// Deswizzle the input and copy it over.
|
||||||
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
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 Parameters& src_params = regs.src_params;
|
||||||
const u32 width = src_params.width;
|
const u32 width = src_params.width;
|
||||||
const u32 height = src_params.height;
|
const u32 height = src_params.height;
|
||||||
|
@ -166,7 +167,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
|
||||||
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
||||||
|
|
||||||
const auto& dst_params = regs.dst_params;
|
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 width = dst_params.width;
|
||||||
const u32 height = dst_params.height;
|
const u32 height = dst_params.height;
|
||||||
const u32 depth = dst_params.depth;
|
const u32 depth = dst_params.depth;
|
||||||
|
@ -210,7 +212,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaxwellDMA::FastCopyBlockLinearToPitch() {
|
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 src_size = GOB_SIZE;
|
||||||
const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count;
|
const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count;
|
||||||
u32 pos_x = regs.src_params.origin.x;
|
u32 pos_x = regs.src_params.origin.x;
|
||||||
|
|
Loading…
Reference in a new issue