mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
TextureCacheBase: Eliminate static state
This commit is contained in:
@ -841,11 +841,11 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
||||
OSD::DrawMessages();
|
||||
D3D::EndFrame();
|
||||
|
||||
TextureCacheBase::Cleanup(frameCount);
|
||||
g_texture_cache->Cleanup(frameCount);
|
||||
|
||||
// Enable configuration changes
|
||||
UpdateActiveConfig();
|
||||
TextureCacheBase::OnConfigChanged(g_ActiveConfig);
|
||||
g_texture_cache->OnConfigChanged(g_ActiveConfig);
|
||||
|
||||
SetWindowSize(fbStride, fbHeight);
|
||||
|
||||
|
@ -127,12 +127,11 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(const TCacheEntryBase*
|
||||
g_renderer->RestoreAPIState();
|
||||
}
|
||||
|
||||
void TextureCache::TCacheEntry::Load(unsigned int width, unsigned int height,
|
||||
unsigned int expanded_width, unsigned int level)
|
||||
void TextureCache::TCacheEntry::Load(const u8* buffer, u32 width, u32 height, u32 expanded_width,
|
||||
u32 level)
|
||||
{
|
||||
unsigned int src_pitch = 4 * expanded_width;
|
||||
D3D::ReplaceRGBATexture2D(texture->GetTex(), TextureCache::temp, width, height, src_pitch, level,
|
||||
usage);
|
||||
D3D::ReplaceRGBATexture2D(texture->GetTex(), buffer, width, height, src_pitch, level, usage);
|
||||
}
|
||||
|
||||
TextureCacheBase::TCacheEntryBase* TextureCache::CreateTexture(const TCacheEntryConfig& config)
|
||||
|
@ -32,8 +32,7 @@ private:
|
||||
const MathUtil::Rectangle<int>& srcrect,
|
||||
const MathUtil::Rectangle<int>& dstrect) override;
|
||||
|
||||
void Load(unsigned int width, unsigned int height, unsigned int expanded_width,
|
||||
unsigned int levels) override;
|
||||
void Load(const u8* buffer, u32 width, u32 height, u32 expanded_width, u32 levels) override;
|
||||
|
||||
void FromRenderTarget(u8* dst, PEControl::PixelFormat srcFormat, const EFBRectangle& srcRect,
|
||||
bool scaleByHalf, unsigned int cbufid, const float* colmat) override;
|
||||
|
Reference in New Issue
Block a user