- 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:
NeoBrainX
2011-01-03 14:35:07 +00:00
parent ae71e63872
commit 5cad834c96
5 changed files with 100 additions and 67 deletions

View File

@ -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)
{