This commit is contained in:
Anon 2016-07-30 10:23:00 -05:00
parent 9535169577
commit 3be6948ca4

View File

@ -134,8 +134,7 @@ namespace GPU {
ptr[1] = config.value_24bit_g;
ptr[2] = config.value_24bit_b;
}
}
else if (config.fill_32bit) {
} else if (config.fill_32bit) {
// fill with 32-bit values
if (end > start) {
u32 value = config.value_32bit;
@ -143,8 +142,7 @@ namespace GPU {
for (size_t i = 0; i < len; ++i)
memcpy(&start[i * sizeof(u32)], &value, sizeof(u32));
}
}
else {
} else {
// fill with 16-bit values
u16 value_16bit = config.value_16bit.Value();
for (u8* ptr = start; ptr < end; ptr += sizeof(u16))
@ -156,8 +154,7 @@ namespace GPU {
if (!is_second_filler) {
GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PSC0);
}
else {
} else {
GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PSC1);
}
}
@ -283,14 +280,12 @@ namespace GPU {
src_offset = (input_x + input_y * config.input_width) * src_bytes_per_pixel;
dst_offset = VideoCore::GetMortonOffset(x, y, dst_bytes_per_pixel) + coarse_y * stride;
}
else {
} else {
// Both input and output are linear
src_offset = (input_x + input_y * config.input_width) * src_bytes_per_pixel;
dst_offset = (x + y * output_width) * dst_bytes_per_pixel;
}
}
else {
} else {
if (!config.dont_swizzle) {
// Interpret the input as tiled and the output as linear
u32 coarse_y = input_y & ~7;
@ -298,8 +293,7 @@ namespace GPU {
src_offset = VideoCore::GetMortonOffset(input_x, input_y, src_bytes_per_pixel) + coarse_y * stride;
dst_offset = (x + y * output_width) * dst_bytes_per_pixel;
}
else {
} else {
// Both input and output are tiled
u32 out_coarse_y = y & ~7;
u32 out_stride = output_width * dst_bytes_per_pixel;
@ -317,8 +311,7 @@ namespace GPU {
if (config.scaling == config.ScaleX) {
Math::Vec4<u8> pixel = DecodePixel(config.input_format, src_pixel + src_bytes_per_pixel);
src_color = ((src_color + pixel) / 2).Cast<u8>();
}
else if (config.scaling == config.ScaleXY) {
} else if (config.scaling == config.ScaleXY) {
Math::Vec4<u8> pixel1 = DecodePixel(config.input_format, src_pixel + 1 * src_bytes_per_pixel);
Math::Vec4<u8> pixel2 = DecodePixel(config.input_format, src_pixel + 2 * src_bytes_per_pixel);
Math::Vec4<u8> pixel3 = DecodePixel(config.input_format, src_pixel + 3 * src_bytes_per_pixel);
@ -371,7 +364,8 @@ namespace GPU {
case GPU_REG_INDEX(command_processor_config.trigger):
{
const auto& config = g_regs.command_processor_config;
if (config.trigger & 1) {
if (config.trigger & 1)
{
MICROPROFILE_SCOPE(GPU_CmdlistProcessing);
u32* buffer = (u32*)Memory::GetPhysicalPointer(config.GetPhysicalAddress());