summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2015-01-01 20:54:45 -0500
committerGravatar bunnei2015-01-01 20:54:45 -0500
commit7c8f6ca0511b35c8a56dce466df01f6364728581 (patch)
treebd1fa3b50c090786dd0f91669702ebf010d2a900 /src/core
parentMerge pull request #379 from lioncash/sh (diff)
parentPica/Rasterizer: Remove some redundant casts. (diff)
downloadyuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.gz
yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.tar.xz
yuzu-7c8f6ca0511b35c8a56dce466df01f6364728581.zip
Merge pull request #358 from neobrain/pica_progress2
pica_progress followups
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hw/gpu.cpp6
-rw-r--r--src/core/hw/gpu.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index dd619cb16..0ff6c6cde 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -94,11 +94,15 @@ inline void Write(u32 addr, const T data) {
94 int r, g, b, a; 94 int r, g, b, a;
95 } source_color = { 0, 0, 0, 0 }; 95 } source_color = { 0, 0, 0, 0 };
96 96
97 // Cheap emulation of horizontal scaling: Just skip each second pixel of the
98 // input framebuffer. We keep track of this in the pixel_skip variable.
99 unsigned pixel_skip = (config.scale_horizontally != 0) ? 2 : 1;
100
97 switch (config.input_format) { 101 switch (config.input_format) {
98 case Regs::PixelFormat::RGBA8: 102 case Regs::PixelFormat::RGBA8:
99 { 103 {
100 // TODO: Most likely got the component order messed up. 104 // TODO: Most likely got the component order messed up.
101 u8* srcptr = source_pointer + x * 4 + y * config.input_width * 4; 105 u8* srcptr = source_pointer + x * 4 * pixel_skip + y * config.input_width * 4 * pixel_skip;
102 source_color.r = srcptr[0]; // blue 106 source_color.r = srcptr[0]; // blue
103 source_color.g = srcptr[1]; // green 107 source_color.g = srcptr[1]; // green
104 source_color.b = srcptr[2]; // red 108 source_color.b = srcptr[2]; // red
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index 292f496c1..7de055232 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -157,6 +157,9 @@ struct Regs {
157 BitField< 8, 3, PixelFormat> input_format; 157 BitField< 8, 3, PixelFormat> input_format;
158 BitField<12, 3, PixelFormat> output_format; 158 BitField<12, 3, PixelFormat> output_format;
159 BitField<16, 1, u32> output_tiled; // stores output in a tiled format 159 BitField<16, 1, u32> output_tiled; // stores output in a tiled format
160
161 // TODO: Not really sure if this actually scales, or even resizes at all.
162 BitField<24, 1, u32> scale_horizontally;
160 }; 163 };
161 164
162 INSERT_PADDING_WORDS(0x1); 165 INSERT_PADDING_WORDS(0x1);