mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
rsx: fix convert_linear_swizzle converting backwards
This commit is contained in:
parent
178bcfc8df
commit
19cf749944
@ -134,7 +134,6 @@ write16bTexelsSwizzled(const char *src, char *dst, size_t widthInBlock, size_t h
|
||||
Result.push_back(currentMipmapLevelInfo);
|
||||
|
||||
u16 *castedSrc, *castedDst;
|
||||
u16 log2width, log2height;
|
||||
|
||||
castedSrc = (u16*)src + offsetInSrc;
|
||||
castedDst = (u16*)dst + offsetInDst;
|
||||
|
@ -153,9 +153,9 @@ namespace rsx
|
||||
log2width = log2(width);
|
||||
log2height = log2(height);
|
||||
|
||||
// Max mask possible for square texture (should be 2^11, or 22 bits for x and y)
|
||||
u32 x_mask = 0x555555;
|
||||
u32 y_mask = 0xAAAAAA;
|
||||
// Max mask possible for square texture
|
||||
u32 x_mask = 0x55555555;
|
||||
u32 y_mask = 0xAAAAAAAA;
|
||||
|
||||
// We have to limit the masks to the lower of the two dimensions to allow for non-square textures
|
||||
u32 limitMask = (log2width < log2height) ? log2width : log2height;
|
||||
@ -174,7 +174,7 @@ namespace rsx
|
||||
|
||||
T *src, *dst;
|
||||
|
||||
if (inputIsSwizzled) {
|
||||
if (!inputIsSwizzled) {
|
||||
for (int y = 0; y < height; ++y) {
|
||||
src = (T *)((T*)inputPixels + y*width);
|
||||
dst = (T *)((T*)outputPixels + offs_y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user