Split out the CLUT texture cache from "TextureShaderCache"

This commit is contained in:
Henrik Rydgård
2026-06-11 10:57:30 +02:00
parent f034cb45bb
commit d33425d01d
9 changed files with 168 additions and 144 deletions
+2 -6
View File
@@ -216,12 +216,10 @@ void TextureCacheVulkan::SetFramebufferManager(FramebufferManagerVulkan *fbManag
}
void TextureCacheVulkan::DeviceLost() {
textureShaderCache_->DeviceLost();
TextureCacheCommon::DeviceLost();
VulkanContext *vulkan = draw_ ? (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT) : nullptr;
Clear(true);
samplerCache_.DeviceLost();
if (samplerNearest_)
vulkan->Delete().QueueDeleteSampler(samplerNearest_);
@@ -236,13 +234,11 @@ void TextureCacheVulkan::DeviceLost() {
}
void TextureCacheVulkan::DeviceRestore(Draw::DrawContext *draw) {
draw_ = draw;
TextureCacheCommon::DeviceRestore(draw);
VulkanContext *vulkan = (VulkanContext *)draw->GetNativeObject(Draw::NativeObject::CONTEXT);
_assert_(vulkan);
samplerCache_.DeviceRestore(vulkan);
textureShaderCache_->DeviceRestore(draw);
VkSamplerCreateInfo samp{ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO };
samp.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT;