[Vulkan] texture_bindings_ -> texture_sets_
This commit is contained in:
parent
26212bffb0
commit
7ea3381699
|
@ -1329,8 +1329,7 @@ VkDescriptorSet TextureCache::PrepareTextureSet(
|
|||
HashTextureBindings(&hash_state, fetch_mask, vertex_bindings);
|
||||
HashTextureBindings(&hash_state, fetch_mask, pixel_bindings);
|
||||
uint64_t hash = XXH64_digest(&hash_state);
|
||||
for (auto it = texture_bindings_.find(hash); it != texture_bindings_.end();
|
||||
++it) {
|
||||
for (auto it = texture_sets_.find(hash); it != texture_sets_.end(); ++it) {
|
||||
// TODO(DrChat): We need to compare the bindings and ensure they're equal.
|
||||
return it->second;
|
||||
}
|
||||
|
@ -1378,7 +1377,7 @@ VkDescriptorSet TextureCache::PrepareTextureSet(
|
|||
update_set_info->image_writes, 0, nullptr);
|
||||
}
|
||||
|
||||
texture_bindings_[hash] = descriptor_set;
|
||||
texture_sets_[hash] = descriptor_set;
|
||||
return descriptor_set;
|
||||
}
|
||||
|
||||
|
@ -1515,7 +1514,7 @@ void TextureCache::Scavenge() {
|
|||
// Free unused descriptor sets
|
||||
// TODO(DrChat): These sets could persist across frames, we just need a smart
|
||||
// way to detect if they're unused and free them.
|
||||
texture_bindings_.clear();
|
||||
texture_sets_.clear();
|
||||
descriptor_pool_->Scavenge();
|
||||
staging_buffer_.Scavenge();
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ class TextureCache {
|
|||
|
||||
std::unique_ptr<xe::ui::vulkan::CommandBufferPool> wb_command_pool_ = nullptr;
|
||||
std::unique_ptr<xe::ui::vulkan::DescriptorPool> descriptor_pool_ = nullptr;
|
||||
std::unordered_map<uint64_t, VkDescriptorSet> texture_bindings_;
|
||||
std::unordered_map<uint64_t, VkDescriptorSet> texture_sets_;
|
||||
VkDescriptorSetLayout texture_descriptor_set_layout_ = nullptr;
|
||||
|
||||
VmaAllocator mem_allocator_ = nullptr;
|
||||
|
|
Loading…
Reference in New Issue