mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 03:38:38 +12:00
d3d12: Fix rgba16float endianness for textures
This commit is contained in:
parent
ff9f348ec2
commit
e38bf8d51f
1 changed files with 11 additions and 0 deletions
|
@ -369,6 +369,17 @@ ID3D12Resource *uploadSingleTexture(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT:
|
||||||
|
{
|
||||||
|
unsigned short *dst = (unsigned short *)textureData, *src = (unsigned short *)pixels;
|
||||||
|
|
||||||
|
for (int j = 0; j < w * 4; j++)
|
||||||
|
{
|
||||||
|
uint64_t tmp = src[row * w * 4 + j];
|
||||||
|
dst[row * w * 4 + j] = (tmp >> 8) | (tmp << 8);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
streamBuffer((char*)textureData + row * rowPitch, (char*)pixels + row * srcPitch, srcPitch);
|
streamBuffer((char*)textureData + row * rowPitch, (char*)pixels + row * srcPitch, srcPitch);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue