Vulkan: Fill unused descriptor array elements with a dummy image (required by API)
This commit is contained in:
@@ -134,6 +134,9 @@ class TextureCache {
|
||||
VkSampler sampler;
|
||||
};
|
||||
|
||||
void SetupEmptySet();
|
||||
void DestroyEmptySet();
|
||||
|
||||
// Allocates a new texture and memory to back it on the GPU.
|
||||
Texture* AllocateTexture(const TextureInfo& texture_info);
|
||||
bool FreeTexture(Texture* texture);
|
||||
@@ -188,6 +191,12 @@ class TextureCache {
|
||||
std::unordered_map<uint64_t, VkDescriptorSet> texture_bindings_;
|
||||
VkDescriptorSetLayout texture_descriptor_set_layout_ = nullptr;
|
||||
|
||||
VkImage empty_image_ = nullptr;
|
||||
VkImageView empty_image_view_ = nullptr;
|
||||
VkDeviceMemory empty_image_memory_ = nullptr;
|
||||
VkSampler empty_sampler_ = nullptr;
|
||||
VkDescriptorSet empty_set_ = nullptr;
|
||||
|
||||
ui::vulkan::CircularBuffer staging_buffer_;
|
||||
std::unordered_map<uint64_t, Texture*> textures_;
|
||||
std::unordered_map<uint64_t, Sampler*> samplers_;
|
||||
|
||||
Reference in New Issue
Block a user