fix for env texture search

This commit is contained in:
Rodolfo Bogado 2020-05-06 00:20:50 -03:00
parent fdf69281fc
commit 7b6f7a49ba

View file

@ -554,6 +554,7 @@ void TextureCacheBase::SetupEnviromentTexture()
currenthits = env_iter->second.last_frame_hits;
current = env_iter->second.envtexture;
}
env_iter++;
}
bound_enviroment = current;
}
@ -588,8 +589,7 @@ void TextureCacheBase::LoadEnviromentTexture(std::string basename)
u8* Bufferptr = TextureCacheBase::temp;
for (size_t i = 0; i < 6; i++)
{
entry->texture->Load(Bufferptr, config.width, config.height, config.width, 0,
currentlayer);
entry->texture->Load(Bufferptr, config.width, config.height, config.width, 0, currentlayer);
Bufferptr += TextureUtil::GetTextureSizeInBytes(config.width, config.height, config.pcformat);
for (u32 level = 1; level != env_tex->m_levels; ++level)
{