- optimization of texture scaling checks.

The texture dimension checks can be performed up front when the texture is inserted into the texture manager.
This commit is contained in:
Christoph Oelckers 2020-04-17 00:37:05 +02:00
commit 70ec20c137
33 changed files with 167 additions and 169 deletions

View file

@ -252,7 +252,7 @@ void hw_PrecacheTexture(uint8_t *texhitlist, TMap<PClassActor*, bool> &actorhitl
{
if (texhitlist[i] & (FTextureManager::HIT_Wall | FTextureManager::HIT_Flat | FTextureManager::HIT_Sky))
{
int flags = shouldUpscale(gtex, ETextureType::Wall) ? CTF_Upscale : 0;
int flags = shouldUpscale(gtex, UF_Texture);
if (tex->GetImage() && tex->SystemTextures.GetHardwareTexture(0, flags) == nullptr)
{
FImageSource::RegisterForPrecache(tex->GetImage(), V_IsTrueColor());