DX9/DX11: Workaround the viewpoint/EFB creation issues in e.g. SMG2 on NVIDIA hardware or when using HD. Will most likely cause glitches, but prevents crashing. Correct behavior can't be implemented in Direct3D, so this is the best option we have.

Also two little changes which don't affect functionality or performance:
Change an IUnknown* cast to a T* cast.
Improve some error messages.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5870 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX 2010-07-11 16:26:46 +00:00
parent 3997243143
commit ff917cb0c9
6 changed files with 51 additions and 3 deletions

View file

@ -97,7 +97,7 @@ void FramebufferManager::Create()
{
hr = s_efb_color_texture->GetSurfaceLevel(0, &s_efb_color_surface);
}
CHECK(hr, "Create Color Texture (hr=%#x)", hr);
CHECK(hr, "Create Color Texture (size: %dx%d; hr=%#x)", target_width, target_height, hr);
hr = D3D::dev->CreateTexture(1, 1, 1, D3DUSAGE_RENDERTARGET, s_efb_color_surface_Format,
D3DPOOL_DEFAULT, &s_efb_colorRead_texture, NULL);
CHECK(hr, "Create Color Read Texture (hr=%#x)", hr);
@ -128,7 +128,7 @@ void FramebufferManager::Create()
if (!FAILED(hr))
break;
}
CHECK(hr, "Depth Color Texture (hr=%#x)", hr);
CHECK(hr, "Depth Color Texture (size: %dx%d; hr=%#x)", target_width, target_height, hr);
// Get the Surface
if(s_efb_depth_texture)
{