2018-02-21 01:04:28 +01:00
|
|
|
#pragma once
|
|
|
|
|
2018-06-23 13:07:11 +02:00
|
|
|
#include <mutex>
|
2018-02-21 01:04:28 +01:00
|
|
|
#include <unordered_map>
|
|
|
|
|
2018-06-23 13:07:11 +02:00
|
|
|
#include "../spirv/spirv_code_buffer.h"
|
|
|
|
|
2018-02-21 01:04:28 +01:00
|
|
|
#include "dxvk_barrier.h"
|
|
|
|
#include "dxvk_cmdlist.h"
|
|
|
|
#include "dxvk_resource.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
2018-06-23 13:07:11 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Resolve pipeline
|
|
|
|
*
|
|
|
|
* Stores the objects for a single pipeline
|
|
|
|
* that is used for fragment shader resolve.
|
|
|
|
*/
|
|
|
|
struct DxvkMetaResolvePipeline {
|
|
|
|
VkRenderPass renderPass;
|
|
|
|
VkDescriptorSetLayout dsetLayout;
|
|
|
|
VkPipelineLayout pipeLayout;
|
|
|
|
VkPipeline pipeHandle;
|
|
|
|
};
|
|
|
|
|
2018-02-21 01:04:28 +01:00
|
|
|
/**
|
2018-06-23 13:07:11 +02:00
|
|
|
* \brief Meta resolve render pass
|
2018-02-21 01:04:28 +01:00
|
|
|
*
|
|
|
|
* Stores a framebuffer and image view objects
|
|
|
|
* for a meta resolve operation. Can be tracked.
|
|
|
|
*/
|
2018-06-23 13:07:11 +02:00
|
|
|
class DxvkMetaResolveRenderPass : public DxvkResource {
|
2018-02-21 01:04:28 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2018-06-23 13:07:11 +02:00
|
|
|
DxvkMetaResolveRenderPass(
|
|
|
|
const Rc<vk::DeviceFn>& vkd,
|
|
|
|
const Rc<DxvkImageView>& dstImageView,
|
|
|
|
const Rc<DxvkImageView>& srcImageView);
|
2018-02-21 01:04:28 +01:00
|
|
|
|
2018-06-23 13:07:11 +02:00
|
|
|
~DxvkMetaResolveRenderPass();
|
2018-02-21 01:04:28 +01:00
|
|
|
|
|
|
|
VkRenderPass renderPass() const {
|
|
|
|
return m_renderPass;
|
|
|
|
}
|
2018-06-23 13:07:11 +02:00
|
|
|
|
2018-02-21 01:04:28 +01:00
|
|
|
VkFramebuffer framebuffer() const {
|
|
|
|
return m_framebuffer;
|
|
|
|
}
|
2018-06-23 13:07:11 +02:00
|
|
|
|
|
|
|
private:
|
2018-02-21 01:04:28 +01:00
|
|
|
|
2018-06-23 13:07:11 +02:00
|
|
|
const Rc<vk::DeviceFn> m_vkd;
|
|
|
|
|
|
|
|
const Rc<DxvkImageView> m_dstImageView;
|
|
|
|
const Rc<DxvkImageView> m_srcImageView;
|
|
|
|
|
|
|
|
VkRenderPass m_renderPass = VK_NULL_HANDLE;
|
|
|
|
VkFramebuffer m_framebuffer = VK_NULL_HANDLE;
|
|
|
|
|
|
|
|
VkRenderPass createRenderPass() const;
|
|
|
|
|
|
|
|
VkFramebuffer createFramebuffer() const;
|
|
|
|
|
|
|
|
};
|
2018-02-21 01:04:28 +01:00
|
|
|
|
2018-06-23 13:07:11 +02:00
|
|
|
}
|