mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00: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;
|
||||
}
|
||||
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:
|
||||
{
|
||||
streamBuffer((char*)textureData + row * rowPitch, (char*)pixels + row * srcPitch, srcPitch);
|
||||
|
|
Loading…
Add table
Reference in a new issue