]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/commands_backend.h
Reuse previously allocated command buffers
[libs/gl.git] / source / backends / vulkan / commands_backend.h
index 4de712f57092947409fb554826139e9300ee4198..a89225a6f6cdaa82279ec08e444e500b79789161 100644 (file)
@@ -14,6 +14,7 @@ class Device;
 class Framebuffer;
 class PipelineState;
 class QueryPool;
+struct Rect;
 class Semaphore;
 class SwapChain;
 
@@ -24,6 +25,8 @@ protected:
        {
                Device &device;
                VkCommandPool pool = 0;
+               std::vector<VkCommandBuffer> buffers;
+               unsigned next_buffer = 0;
                Fence fence;
                bool in_use = false;
                
@@ -37,7 +40,8 @@ protected:
        CommandPool *current_pool = 0;
        VkCommandBuffer current_buffer = 0;
        const PipelineState *pipeline_state = 0;
-       VkRenderPass render_pass = 0;
+       const Framebuffer *framebuffer = 0;
+       const Rect *viewport = 0;
 
        VulkanCommands();
        ~VulkanCommands();