Repository navigation
rsx: Fix nv0039 image (de)interleaving functionality - #19190
Conversation
NV0039_LINE_LENGTH_IN specifies the number of elements, while the input and output formats specify the byte stride between elements. Copy every element instead of treating the element count as a byte span.
Scale the final row by the input and output byte strides so cache invalidation, barriers, reservations, and MM flushing cover the complete strided transfer.
Co-authored-by: Megamouse <studienricky89@googlemail.com>
|
Hardware claim - needs accompanying PS3 hardware tests. |
I've got hardware so can test things tomorrow - lmk what you want from me in that regard (and if you've got a framework or something you use to write these quick tests, didn't see anything from a cursory search). |
|
there was another issue on that function fixed in #18519 (negative pitch allowed) after confirmation with HWTEST |
|
@kd-11 Here's a small test suite which shows behavior on hardware. The run results within that match the new behavior of strided copy. |
Thanks. I already have a interleave/deinterleave test written, I'll approve if results match what I expect. |
|
HWTEST: interleave2d.zip PS3:
RPCS3 (master):
RPCS3 (PR):
|



block2d_copy_with_stridetook awidthwhich should really have been anelement_count. Whenstride > 1, this means the copy was only partial leading to apparent corruption. This PR fixes the copy logic, and also updates the corresponding barrier/sync range logic.Before:

After:

Disclosure: this bug was originally identified + fixed with AI tools, however it was manually reviewed and verified (see above images).
Relates to #19198