mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- fixed invalidation of programmatic textures.
This is only relevant for Vulkan because it stores the descriptor sets with the material, not the hardware texture.
This commit is contained in:
parent
c0f1949fb9
commit
869433ee2e
2 changed files with 4 additions and 3 deletions
|
@ -48,7 +48,6 @@ void AnimTexture::SetFrameSize(int format, int width, int height)
|
|||
FTexture::SetSize(width, height);
|
||||
Image.Resize(width * height * (format == Paletted ? 1 : 3));
|
||||
memset(Image.Data(), 0, Image.Size());
|
||||
CleanHardwareTextures();
|
||||
}
|
||||
|
||||
void AnimTexture::SetFrame(const uint8_t* palette, const void* data_)
|
||||
|
@ -81,7 +80,6 @@ void AnimTexture::SetFrame(const uint8_t* palette, const void* data_)
|
|||
}
|
||||
else memcpy(Image.Data(), data_, Width * Height * (pixelformat == Paletted ? 1 : 3));
|
||||
}
|
||||
CleanHardwareTextures();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -156,10 +154,13 @@ void AnimTextures::SetSize(int format, int width, int height)
|
|||
static_cast<AnimTexture*>(tex[1]->GetTexture())->SetFrameSize(format, width, height);
|
||||
tex[0]->SetSize(width, height);
|
||||
tex[1]->SetSize(width, height);
|
||||
tex[0]->CleanHardwareData();
|
||||
tex[1]->CleanHardwareData();
|
||||
}
|
||||
|
||||
void AnimTextures::SetFrame(const uint8_t* palette, const void* data)
|
||||
{
|
||||
active ^= 1;
|
||||
static_cast<AnimTexture*>(tex[active]->GetTexture())->SetFrame(palette, data);
|
||||
tex[active]->CleanHardwareData();
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ void BuildTiles::InvalidateTile(int num)
|
|||
if ((unsigned) num < MAXTILES)
|
||||
{
|
||||
auto tex = tiledata[num].texture;
|
||||
tex->GetTexture()->SystemTextures.Clean();
|
||||
tex->CleanHardwareData();
|
||||
tiledata[num].rawCache.data.Clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue