From 7ee875aec3ed73e0309f8d32bd8577be8f6c7cc9 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 8 Sep 2016 16:26:26 +1000 Subject: [PATCH] Wrap 0 sized texture to a proper value --- src/core/hw/gpu.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index a4dfb7e43..180c60514 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp @@ -187,6 +187,14 @@ inline void Write(u32 addr, const T data) { u32 output_width = config.texture_copy.output_width * 16; u32 output_gap = config.texture_copy.output_gap * 16; + if (input_width == 0) { + input_width = 1024 * 16; + } + + if (output_width == 0) { + output_width = 1024 * 16; + } + size_t contiguous_input_size = config.texture_copy.size / input_width * (input_width + input_gap); Memory::RasterizerFlushRegion(config.GetPhysicalInputAddress(), static_cast(contiguous_input_size));