]> git.tdb.fi Git - libs/gl.git/commitdiff
Some adjustments to includes
authorMikko Rasa <tdb@tdb.fi>
Tue, 22 Mar 2022 07:19:39 +0000 (09:19 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 22 Mar 2022 07:25:36 +0000 (09:25 +0200)
source/backends/vulkan/device_backend.cpp
source/backends/vulkan/device_backend.h
source/backends/vulkan/framebuffer_backend.cpp
source/backends/vulkan/framebuffer_backend.h
source/backends/vulkan/pipelinecache.cpp

index f1f2e3279160b209c1545df2279b91aa5ea2228c..9a8b930d713f6d100f3351a0a91040232c3f19f7 100644 (file)
@@ -1,5 +1,6 @@
 #include <cstdlib>
 #include <msp/graphics/vulkancontext_platform.h>
+#include <msp/strings/lexicalcast.h>
 #include "device.h"
 #include "device_backend.h"
 #include "vulkan.h"
index d490c6f95c6ece87fb1e7822e521ba7295afc68a..1011da6bbcb184d9550905703ca531608f8768b8 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_DEVICE_BACKEND_H_
 
 #include <msp/core/noncopyable.h>
+#include <msp/core/refptr.h>
 #include <msp/graphics/vulkancontext.h>
 #include "descriptorpool.h"
 #include "destroyqueue.h"
index 48b25f2ac456dec0e1816308cd16ac2916839804..5db8c356faff5072d5d612aa94c01a64461070f1 100644 (file)
@@ -2,6 +2,7 @@
 #include "device.h"
 #include "framebuffer.h"
 #include "framebuffer_backend.h"
+#include "renderpass.h"
 #include "vulkan.h"
 
 using namespace std;
@@ -111,11 +112,13 @@ void VulkanFramebuffer::update(unsigned mask) const
                ++i;
        }
 
-       VkRenderPass render_pass = device.get_pipeline_cache().get_render_pass(self.format, false, false, false);
+       RenderPass render_pass;
+       render_pass.framebuffer = &self;
+       render_pass.update(device);
 
        VkFramebufferCreateInfo framebuffer_info = { };
        framebuffer_info.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
-       framebuffer_info.renderPass = handle_cast<::VkRenderPass>(render_pass);
+       framebuffer_info.renderPass = handle_cast<::VkRenderPass>(render_pass.handle);
        framebuffer_info.attachmentCount = self.format.size();
        framebuffer_info.pAttachments = handle_cast<::VkImageView *>(vk_attachments);
        framebuffer_info.width = self.width;
index b53d1751928a4098b1e3580776d74f15850c98e5..3fa75421cb03b2f61a1ca61e54561999c5441000 100644 (file)
@@ -13,6 +13,7 @@ class Texture;
 
 class VulkanFramebuffer: public NonCopyable
 {
+       friend class RenderPass;
        friend class VulkanCommands;
        friend class VulkanPipelineState;
 
index 052ce37ffa5e2e738c65d9d706ce59516d2b5a33..646d79324b6b65692f7bd7a43ddab33892c062be 100644 (file)
@@ -1,11 +1,8 @@
 #include <msp/core/hash.h>
-#include "blend.h"
-#include "depthtest.h"
 #include "device.h"
 #include "framebuffer.h"
 #include "pipelinecache.h"
 #include "pipelinestate.h"
-#include "stenciltest.h"
 #include "vulkan.h"
 
 using namespace std;