summaryrefslogtreecommitdiff
path: root/src/core/hw/gpu.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2015-03-17 19:13:06 -0400
committerGravatar bunnei2015-03-17 19:13:06 -0400
commit580b3178216656e31a505a5cd5d743befabfcde5 (patch)
tree92707c5b40cd1dab695d7920ba381abb61dadd23 /src/core/hw/gpu.cpp
parentMerge pull request #655 from purpasmart96/hid_fixes (diff)
parentGPU/DisplayTransfer: Made the scaling bits a single 2bit value (diff)
downloadyuzu-580b3178216656e31a505a5cd5d743befabfcde5.tar.gz
yuzu-580b3178216656e31a505a5cd5d743befabfcde5.tar.xz
yuzu-580b3178216656e31a505a5cd5d743befabfcde5.zip
Merge pull request #650 from Subv/scaling
GPU: Fixed the bit 25 in the display transfer flags.
Diffstat (limited to 'src/core/hw/gpu.cpp')
-rw-r--r--src/core/hw/gpu.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 07443616e..e6983a225 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -118,8 +118,14 @@ inline void Write(u32 addr, const T data) {
118 u8* src_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalInputAddress())); 118 u8* src_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalInputAddress()));
119 u8* dst_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalOutputAddress())); 119 u8* dst_pointer = Memory::GetPointer(Memory::PhysicalToVirtualAddress(config.GetPhysicalOutputAddress()));
120 120
121 unsigned horizontal_scale = (config.scale_horizontally != 0) ? 2 : 1; 121 if (config.scaling > config.ScaleXY) {
122 unsigned vertical_scale = (config.scale_vertically != 0) ? 2 : 1; 122 LOG_CRITICAL(HW_GPU, "Unimplemented display transfer scaling mode %u", config.scaling.Value());
123 UNIMPLEMENTED();
124 break;
125 }
126
127 unsigned horizontal_scale = (config.scaling != config.NoScale) ? 2 : 1;
128 unsigned vertical_scale = (config.scaling == config.ScaleXY) ? 2 : 1;
123 129
124 u32 output_width = config.output_width / horizontal_scale; 130 u32 output_width = config.output_width / horizontal_scale;
125 u32 output_height = config.output_height / vertical_scale; 131 u32 output_height = config.output_height / vertical_scale;
@@ -140,7 +146,7 @@ inline void Write(u32 addr, const T data) {
140 break; 146 break;
141 } 147 }
142 148
143 // TODO(Subv): Blend the pixels when horizontal / vertical scaling is enabled, 149 // TODO(Subv): Implement the box filter when scaling is enabled
144 // right now we're just skipping the extra pixels. 150 // right now we're just skipping the extra pixels.
145 for (u32 y = 0; y < output_height; ++y) { 151 for (u32 y = 0; y < output_height; ++y) {
146 for (u32 x = 0; x < output_width; ++x) { 152 for (u32 x = 0; x < output_width; ++x) {