Created
June 28, 2018 14:55
-
-
Save Triang3l/afd9d6dd5f76f7c118b98770de827227 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Decompiled for Xenia by Triang3l. | |
DWORD XGSurfaceSize(DWORD Width, DWORD Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSampleType) { | |
Format = (D3DFORMAT) ((DWORD) Format & 63); | |
if (MultiSampleType >= D3DMULTISAMPLE_2_SAMPLES /* 1 */) { | |
Height *= 2; | |
} | |
if (MultiSampleType == D3DMULTISAMPLE_4_SAMPLES /* 2 */) { | |
Width *= 2; | |
} | |
DWORD bytesPerPixel = 4; | |
if (Format == 21 || Format == D3DFMT_A16B16G16R16F /* 32 */ || Format == D3DFMT_G32R32F /* 37 */) { | |
bytesPerPixel = 8; | |
} | |
return Width * Height * BytesPerPixel / 5120; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment