TextureCache: Flush uploads if the staging buffer overflows in a frame.
This commit is contained in:
@@ -146,16 +146,23 @@ class TextureCache {
|
||||
TextureView* DemandView(Texture* texture, uint16_t swizzle);
|
||||
Sampler* Demand(const SamplerInfo& sampler_info);
|
||||
|
||||
void FlushPendingCommands(
|
||||
VkCommandBuffer command_buffer,
|
||||
std::shared_ptr<ui::vulkan::Fence> completion_fence);
|
||||
|
||||
void ConvertTexture2D(uint8_t* dest, const TextureInfo& src);
|
||||
void ConvertTextureCube(uint8_t* dest, const TextureInfo& src);
|
||||
|
||||
// Queues commands to upload a texture from system memory, applying any
|
||||
// conversions necessary. This may flush the command buffer to the GPU if we
|
||||
// run out of staging memory.
|
||||
bool UploadTexture2D(VkCommandBuffer command_buffer,
|
||||
std::shared_ptr<ui::vulkan::Fence> completion_fence,
|
||||
Texture* dest, TextureInfo src);
|
||||
Texture* dest, const TextureInfo& src);
|
||||
|
||||
bool UploadTextureCube(VkCommandBuffer command_buffer,
|
||||
std::shared_ptr<ui::vulkan::Fence> completion_fence,
|
||||
Texture* dest, TextureInfo src);
|
||||
Texture* dest, const TextureInfo& src);
|
||||
|
||||
bool SetupTextureBindings(
|
||||
VkCommandBuffer command_buffer,
|
||||
@@ -172,6 +179,7 @@ class TextureCache {
|
||||
RegisterFile* register_file_ = nullptr;
|
||||
TraceWriter* trace_writer_ = nullptr;
|
||||
ui::vulkan::VulkanDevice* device_ = nullptr;
|
||||
VkQueue device_queue_ = nullptr;
|
||||
|
||||
VkDescriptorPool descriptor_pool_ = nullptr;
|
||||
VkDescriptorSetLayout texture_descriptor_set_layout_ = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user