mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -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:
@ -444,8 +444,8 @@ bool FixTextureSize(int& width, int& height)
|
||||
if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && !(caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL))
|
||||
{
|
||||
// all texture dimensions need to be powers of two
|
||||
width = GetPow2(width);
|
||||
height = GetPow2(height);
|
||||
width = (int)MakePow2((u32)width);
|
||||
height = (int)MakePow2((u32)height);
|
||||
}
|
||||
if (caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY)
|
||||
{
|
||||
@ -458,6 +458,17 @@ bool FixTextureSize(int& width, int& height)
|
||||
return (width != oldw) || (height != oldh);
|
||||
}
|
||||
|
||||
// returns true if format is supported
|
||||
bool CheckTextureSupport(DWORD usage, D3DFORMAT tex_format)
|
||||
{
|
||||
return D3D_OK == D3D->CheckDeviceFormat(cur_adapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, usage, D3DRTYPE_TEXTURE, tex_format);
|
||||
}
|
||||
|
||||
bool CheckDepthStencilSupport(D3DFORMAT target_format, D3DFORMAT depth_format)
|
||||
{
|
||||
return D3D_OK == D3D->CheckDepthStencilMatch(cur_adapter, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, target_format, depth_format);
|
||||
}
|
||||
|
||||
const char *VertexShaderVersionString()
|
||||
{
|
||||
static const char *versions[5] = {"ERROR", "vs_1_4", "vs_2_0", "vs_3_0", "vs_4_0"};
|
||||
|
Reference in New Issue
Block a user