mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 07:50:28 +02:00
Vulkan: Add simple manager for compute shaders that upload data to images.
This commit is contained in:
1 parent
360e138c2c
commit
e6bec3e555
4 files changed
+189
-4
No files matched your search
@@ -141,7 +141,8 @@ std::vector<std::string> SamplerCache::DebugGetSamplerIDs() const {
|
||||
TextureCacheVulkan::TextureCacheVulkan(Draw::DrawContext *draw, VulkanContext *vulkan)
|
||||
: TextureCacheCommon(draw),
|
||||
vulkan_(vulkan),
|
||||
samplerCache_(vulkan) {
|
||||
samplerCache_(vulkan),
|
||||
upload_(vulkan) {
|
||||
timesInvalidatedAllThisFrame_ = 0;
|
||||
DeviceRestore(vulkan, draw);
|
||||
SetupTextureDecoder();
|
||||
@@ -180,6 +181,8 @@ void TextureCacheVulkan::DeviceLost() {
|
||||
if (samplerNearest_)
|
||||
vulkan_->Delete().QueueDeleteSampler(samplerNearest_);
|
||||
|
||||
upload_.DeviceLost();
|
||||
|
||||
nextTexture_ = nullptr;
|
||||
}
|
||||
|
||||
@@ -200,6 +203,8 @@ void TextureCacheVulkan::DeviceRestore(VulkanContext *vulkan, Draw::DrawContext
|
||||
samp.minFilter = VK_FILTER_NEAREST;
|
||||
samp.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
|
||||
vkCreateSampler(vulkan_->GetDevice(), &samp, nullptr, &samplerNearest_);
|
||||
|
||||
upload_.DeviceRestore(vulkan);
|
||||
}
|
||||
|
||||
void TextureCacheVulkan::ReleaseTexture(TexCacheEntry *entry, bool delete_them) {
|
||||
|
||||
Reference in new issue
Block a user