From: Mikko Rasa Date: Tue, 22 Mar 2022 07:19:39 +0000 (+0200) Subject: Some adjustments to includes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=1b4d387b74b2108f3926796d8115bee134fbf7f1;p=libs%2Fgl.git Some adjustments to includes --- diff --git a/source/backends/vulkan/device_backend.cpp b/source/backends/vulkan/device_backend.cpp index f1f2e327..9a8b930d 100644 --- a/source/backends/vulkan/device_backend.cpp +++ b/source/backends/vulkan/device_backend.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "device.h" #include "device_backend.h" #include "vulkan.h" diff --git a/source/backends/vulkan/device_backend.h b/source/backends/vulkan/device_backend.h index d490c6f9..1011da6b 100644 --- a/source/backends/vulkan/device_backend.h +++ b/source/backends/vulkan/device_backend.h @@ -2,6 +2,7 @@ #define MSP_GL_DEVICE_BACKEND_H_ #include +#include #include #include "descriptorpool.h" #include "destroyqueue.h" diff --git a/source/backends/vulkan/framebuffer_backend.cpp b/source/backends/vulkan/framebuffer_backend.cpp index 48b25f2a..5db8c356 100644 --- a/source/backends/vulkan/framebuffer_backend.cpp +++ b/source/backends/vulkan/framebuffer_backend.cpp @@ -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; diff --git a/source/backends/vulkan/framebuffer_backend.h b/source/backends/vulkan/framebuffer_backend.h index b53d1751..3fa75421 100644 --- a/source/backends/vulkan/framebuffer_backend.h +++ b/source/backends/vulkan/framebuffer_backend.h @@ -13,6 +13,7 @@ class Texture; class VulkanFramebuffer: public NonCopyable { + friend class RenderPass; friend class VulkanCommands; friend class VulkanPipelineState; diff --git a/source/backends/vulkan/pipelinecache.cpp b/source/backends/vulkan/pipelinecache.cpp index 052ce37f..646d7932 100644 --- a/source/backends/vulkan/pipelinecache.cpp +++ b/source/backends/vulkan/pipelinecache.cpp @@ -1,11 +1,8 @@ #include -#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;