mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
D3D9:
- Assign width and height to the actual powers of two rather than to the exponents... - Clean up FramebufferManager() - Make use of more depth buffer formats to prevent some devices from failing to create a depth buffer Should fix issue 3256. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6730 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -181,6 +181,19 @@ inline u32 Z24ToZ16ToZ24(u32 src)
|
||||
return (src & 0xFFFF00) | (src >> 16);
|
||||
}
|
||||
|
||||
/* Returns the smallest power of 2 which is greater than or equal to num */
|
||||
inline u32 MakePow2(u32 num)
|
||||
{
|
||||
--num;
|
||||
num |= num >> 1;
|
||||
num |= num >> 2;
|
||||
num |= num >> 4;
|
||||
num |= num >> 8;
|
||||
num |= num >> 16;
|
||||
++num;
|
||||
return num;
|
||||
}
|
||||
|
||||
// returns the exponent of the smallest power of two which is greater than val
|
||||
inline unsigned int GetPow2(unsigned int val)
|
||||
{
|
||||
|
Reference in New Issue
Block a user