Wrap 0 sized texture to a proper value

This commit is contained in:
James 2016-09-08 16:26:26 +10:00
parent c3307b41db
commit 7ee875aec3

View File

@ -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<u32>(contiguous_input_size));