mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DX11: Fix mipmaps. Someone forgot creating them at the proper time ;P
DX11: Fix a DX11 debug runtime error caused by the vertex shader output signature and the pixel shader input signature not matching if per-pixel lighting is disabled. Someone forgot disabling those pixel shader parameters ;P DX11: Enable use of dynamic textures wherever possible. DX9: Remove two unnecessary TODOs. Someone forgot removing those since they've been obsolete for a long time ;P Anyway, at least working mipmaps and dynamic textures should increase DX11 performance a bit. And "a bit" is more than my usual "marginally" ;) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6473 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -36,8 +36,6 @@ LPDIRECT3DTEXTURE9 CreateTexture2D(const u8* buffer, const int width, const int
|
||||
}
|
||||
|
||||
HRESULT hr;
|
||||
// TODO(ector): Allow mipmaps for non-pow textures on newer cards?
|
||||
// TODO(ector): Use the game-specified mipmaps?
|
||||
if (levels > 0)
|
||||
hr = dev->CreateTexture(width, height, levels, 0, fmt, D3DPOOL_MANAGED, &pTexture, NULL);
|
||||
else
|
||||
|
@ -64,9 +64,10 @@ bool TextureCache::TCacheEntry::Save(const char filename[])
|
||||
}
|
||||
|
||||
void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height,
|
||||
unsigned int expanded_width, unsigned int level)
|
||||
unsigned int expanded_width, unsigned int level, bool autogen_mips)
|
||||
{
|
||||
D3D::ReplaceTexture2D(texture, temp, width, height, expanded_width, d3d_fmt, swap_r_b, level);
|
||||
// D3D9 will automatically generate mip maps if necessary
|
||||
}
|
||||
|
||||
void TextureCache::TCacheEntry::FromRenderTarget(bool bFromZBuffer, bool bScaleByHalf,
|
||||
|
@ -44,7 +44,7 @@ private:
|
||||
~TCacheEntry();
|
||||
|
||||
void Load(unsigned int width, unsigned int height,
|
||||
unsigned int expanded_width, unsigned int levels);
|
||||
unsigned int expanded_width, unsigned int levels, bool autogen_mips = false);
|
||||
|
||||
void FromRenderTarget(bool bFromZBuffer, bool bScaleByHalf,
|
||||
unsigned int cbufid, const float* colmat, const EFBRectangle &source_rect,
|
||||
|
Reference in New Issue
Block a user