TexCache: rename OverlapsMemoryRange
This commit is contained in:
parent
dddcea5a9a
commit
774596dbed
|
@ -181,8 +181,7 @@ void TextureCache::InvalidateRange(u32 start_address, u32 size)
|
||||||
tcend = textures.end();
|
tcend = textures.end();
|
||||||
while (iter != tcend)
|
while (iter != tcend)
|
||||||
{
|
{
|
||||||
const int rangePosition = iter->second->IntersectsMemoryRange(start_address, size);
|
if (iter->second->OverlapsMemoryRange(start_address, size))
|
||||||
if (0 == rangePosition)
|
|
||||||
{
|
{
|
||||||
delete iter->second;
|
delete iter->second;
|
||||||
textures.erase(iter++);
|
textures.erase(iter++);
|
||||||
|
@ -205,8 +204,7 @@ void TextureCache::MakeRangeDynamic(u32 start_address, u32 size)
|
||||||
|
|
||||||
for (; iter != tcend; ++iter)
|
for (; iter != tcend; ++iter)
|
||||||
{
|
{
|
||||||
const int rangePosition = iter->second->IntersectsMemoryRange(start_address, size);
|
if (iter->second->OverlapsMemoryRange(start_address, size))
|
||||||
if (0 == rangePosition)
|
|
||||||
{
|
{
|
||||||
iter->second->SetHashes(TEXHASH_INVALID);
|
iter->second->SetHashes(TEXHASH_INVALID);
|
||||||
}
|
}
|
||||||
|
@ -223,15 +221,15 @@ bool TextureCache::Find(u32 start_address, u64 hash)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TextureCache::TCacheEntryBase::IntersectsMemoryRange(u32 range_address, u32 range_size) const
|
bool TextureCache::TCacheEntryBase::OverlapsMemoryRange(u32 range_address, u32 range_size) const
|
||||||
{
|
{
|
||||||
if (addr + size_in_bytes < range_address)
|
if (addr + size_in_bytes < range_address)
|
||||||
return -1;
|
return false;
|
||||||
|
|
||||||
if (addr >= range_address + range_size)
|
if (addr >= range_address + range_size)
|
||||||
return 1;
|
return false;
|
||||||
|
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureCache::ClearRenderTargets()
|
void TextureCache::ClearRenderTargets()
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
bool isIntensity, bool scaleByHalf, unsigned int cbufid,
|
bool isIntensity, bool scaleByHalf, unsigned int cbufid,
|
||||||
const float *colmat) = 0;
|
const float *colmat) = 0;
|
||||||
|
|
||||||
int IntersectsMemoryRange(u32 range_address, u32 range_size) const;
|
bool OverlapsMemoryRange(u32 range_address, u32 range_size) const;
|
||||||
|
|
||||||
bool IsEfbCopy() { return (type == TCET_EC_VRAM || type == TCET_EC_DYNAMIC); }
|
bool IsEfbCopy() { return (type == TCET_EC_VRAM || type == TCET_EC_DYNAMIC); }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue