Video_Software: Implement texture preloading

This commit is contained in:
NeoBrainX
2012-11-03 15:36:40 +01:00
parent d13163380d
commit 6f21f5eb34
2 changed files with 29 additions and 3 deletions

View File

@ -120,8 +120,16 @@ void SampleMip(s32 s, s32 t, s32 mip, bool linear, u8 texmap, u8 *sample)
TexImage0& ti0 = texUnit.texImage0[subTexmap];
TexTLUT& texTlut = texUnit.texTlut[subTexmap];
u32 imageBase = texUnit.texImage3[subTexmap].image_base << 5;
u8 *imageSrc = Memory::GetPointer(imageBase);
u8 *imageSrc;
if (texUnit.texImage1[subTexmap].image_type)
{
imageSrc = &texMem[texUnit.texImage1[subTexmap].tmem_even * TMEM_LINE_SIZE];
}
else
{
u32 imageBase = texUnit.texImage3[subTexmap].image_base << 5;
imageSrc = Memory::GetPointer(imageBase);
}
int imageWidth = ti0.width;
int imageHeight = ti0.height;