Move sampler state setting outside the drawQuad utility functions.

Use linear filtering for various buffer copies, improves visual quality a lot.

Some other tiny changes as well.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5891 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX
2010-07-17 15:18:52 +00:00
parent 5abed9d5a4
commit 15eb779c01
7 changed files with 46 additions and 43 deletions

View File

@ -298,7 +298,7 @@ TextureCache::TCacheEntry* TextureCache::Load(unsigned int stage, u32 address, u
CHECK(entry.texture!=NULL, "Create texture of the TextureCache");
D3D::SetDebugObjectName((ID3D11DeviceChild*)entry.texture->GetTex(), "a texture of the TextureCache");
D3D::SetDebugObjectName((ID3D11DeviceChild*)entry.texture->GetSRV(), "shader resource view of a texture of the TextureCache");
pTexture->Release();
SAFE_RELEASE(pTexture);
if (TexLevels != 1) D3D::ReplaceRGBATexture2D(entry.texture->GetTex(), temp, width, height, expandedWidth, 0, usage);
}
@ -547,7 +547,9 @@ void TextureCache::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, boo
TargetRectangle targetSource = Renderer::ConvertEFBRectangle(source_rect);
D3D11_RECT sourcerect = CD3D11_RECT(targetSource.left, targetSource.top, targetSource.right, targetSource.bottom);
// TODO: Use linear filtering if (bScaleByHalf), else use point filtering
// Use linear filtering if (bScaleByHalf), use point filtering otherwise
if (bScaleByHalf) D3D::SetLinearCopySampler();
else D3D::SetPointCopySampler();
D3D::stateman->PushBlendState(efbcopyblendstate);
D3D::stateman->PushRasterizerState(efbcopyraststate);