]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/commands_backend.h
Support compute shaders and compute operations
[libs/gl.git] / source / backends / vulkan / commands_backend.h
index 3f2c3be9bbf243029028f519360c4e5523f4b642..7c98b15f0d061bbe7ea43bce73e8ae9559c1996a 100644 (file)
@@ -4,6 +4,7 @@
 #include <vector>
 #include "fence.h"
 #include "handles.h"
+#include "rect.h"
 
 namespace Msp {
 namespace GL {
@@ -14,7 +15,6 @@ class Device;
 class Framebuffer;
 class PipelineState;
 class QueryPool;
-struct Rect;
 class Semaphore;
 class SwapChain;
 
@@ -43,12 +43,13 @@ protected:
 
        Device &device;
        std::vector<CommandPool> command_pools;
-       CommandPool *current_pool = 0;
+       unsigned frame_index = 0;
        VkCommandBuffer primary_buffer = 0;
        VkCommandBuffer pass_buffer = 0;
        const PipelineState *pipeline_state = 0;
+       const PipelineState *last_pipeline = 0;
        const Framebuffer *framebuffer = 0;
-       const Rect *viewport = 0;
+       Rect viewport = Rect::max();
        bool fb_is_swapchain = false;
        bool discard_fb_contents = false;
        std::vector<char> pass_begin_info;
@@ -68,6 +69,7 @@ protected:
        void clear(const ClearValue *);
        void draw(const Batch &);
        void draw_instanced(const Batch &, unsigned);
+       void dispatch(unsigned, unsigned, unsigned);
        void resolve_multisample(Framebuffer &);
 
        void begin_query(const QueryPool &, unsigned);