D3D9: Make sure to use powers of two as render target dimensions if it's needed by the device.

Some other cleanups.

Possibly fixes issue 3256.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6725 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2011-01-02 23:13:29 +00:00
parent 4b15325acd
commit ecf92f5c3c
9 changed files with 69 additions and 64 deletions

View File

@ -181,4 +181,13 @@ inline u32 Z24ToZ16ToZ24(u32 src)
return (src & 0xFFFF00) | (src >> 16);
}
// returns the exponent of the smallest power of two which is greater than val
static unsigned int GetPow2(unsigned int val)
{
unsigned int ret = 0;
for (; val; val >>= 1)
++ret;
return ret;
}
#endif // _VIDEOCOMMON_H