mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
rsx: bugfix - avoid a divide by zero
This commit is contained in:
parent
0efc3c1c6c
commit
786bcb0d1b
1 changed files with 6 additions and 2 deletions
|
@ -122,7 +122,9 @@ namespace
|
|||
//Count vertices to copy
|
||||
const bool is_128_aligned = !((dst_stride | src_stride) & 15);
|
||||
|
||||
const u32 min_block_size = std::min(src_stride, dst_stride);
|
||||
u32 min_block_size = std::min(src_stride, dst_stride);
|
||||
if (min_block_size == 0) min_block_size = dst_stride;
|
||||
|
||||
const u32 remainder = is_128_aligned? 0: (16 - min_block_size) / min_block_size;
|
||||
const u32 iterations = is_128_aligned? vertex_count: vertex_count - remainder;
|
||||
|
||||
|
@ -163,7 +165,9 @@ namespace
|
|||
|
||||
const bool is_128_aligned = !((dst_stride | src_stride) & 15);
|
||||
|
||||
const u32 min_block_size = std::min(src_stride, dst_stride);
|
||||
u32 min_block_size = std::min(src_stride, dst_stride);
|
||||
if (min_block_size == 0) min_block_size = dst_stride;
|
||||
|
||||
const u32 remainder = is_128_aligned ? 0 : (16 - min_block_size) / min_block_size;
|
||||
const u32 iterations = is_128_aligned ? vertex_count : vertex_count - remainder;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue