2017-10-13 03:19:23 +02:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-03 00:40:58 +01:00
|
|
|
#include "dxvk_pipeline.h"
|
2017-10-14 23:52:47 +02:00
|
|
|
#include "dxvk_resource.h"
|
2017-12-03 00:40:58 +01:00
|
|
|
#include "dxvk_shader.h"
|
2017-10-13 03:19:23 +02:00
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Compute pipeline
|
|
|
|
*
|
2017-10-14 13:45:00 +02:00
|
|
|
* Stores a compute pipeline object and the corresponding
|
|
|
|
* pipeline layout. Unlike graphics pipelines, compute
|
|
|
|
* pipelines do not need to be recompiled against any sort
|
|
|
|
* of pipeline state.
|
2017-10-13 03:19:23 +02:00
|
|
|
*/
|
2017-10-14 23:52:47 +02:00
|
|
|
class DxvkComputePipeline : public DxvkResource {
|
2017-10-13 03:19:23 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2017-10-14 23:52:47 +02:00
|
|
|
DxvkComputePipeline(
|
2017-12-03 00:40:58 +01:00
|
|
|
const Rc<vk::DeviceFn>& vkd,
|
|
|
|
const Rc<DxvkBindingLayout>& layout,
|
|
|
|
const Rc<DxvkShader>& cs);
|
2017-10-13 03:19:23 +02:00
|
|
|
~DxvkComputePipeline();
|
|
|
|
|
2017-10-14 23:52:47 +02:00
|
|
|
/**
|
|
|
|
* \brief Descriptor set layout
|
|
|
|
*
|
|
|
|
* The descriptor set layout for this pipeline.
|
|
|
|
* Use this to allocate new descriptor sets.
|
|
|
|
* \returns The descriptor set layout
|
|
|
|
*/
|
|
|
|
VkDescriptorSetLayout descriptorSetLayout() const {
|
2017-12-03 00:40:58 +01:00
|
|
|
return m_layout->descriptorSetLayout();
|
2017-10-14 23:52:47 +02:00
|
|
|
}
|
|
|
|
|
2017-10-15 19:23:10 +02:00
|
|
|
/**
|
|
|
|
* \brief Pipeline layout layout
|
|
|
|
*
|
|
|
|
* The pipeline layout for this pipeline.
|
|
|
|
* Use this to bind descriptor sets.
|
|
|
|
* \returns The descriptor set layout
|
|
|
|
*/
|
|
|
|
VkPipelineLayout pipelineLayout() const {
|
2017-12-03 00:40:58 +01:00
|
|
|
return m_layout->pipelineLayout();
|
2017-10-15 19:23:10 +02:00
|
|
|
}
|
|
|
|
|
2017-10-13 03:19:23 +02:00
|
|
|
/**
|
|
|
|
* \brief Pipeline handle
|
|
|
|
* \returns Pipeline handle
|
|
|
|
*/
|
2017-10-15 13:02:59 +02:00
|
|
|
VkPipeline getPipelineHandle() const {
|
2017-10-13 03:19:23 +02:00
|
|
|
return m_pipeline;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2017-10-14 23:52:47 +02:00
|
|
|
Rc<vk::DeviceFn> m_vkd;
|
2017-12-03 00:40:58 +01:00
|
|
|
Rc<DxvkBindingLayout> m_layout;
|
|
|
|
Rc<DxvkShader> m_cs;
|
2017-10-14 23:52:47 +02:00
|
|
|
|
2017-12-03 00:40:58 +01:00
|
|
|
VkPipeline m_pipeline = VK_NULL_HANDLE;
|
2017-10-13 03:19:23 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|