2017-10-16 17:50:09 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "dxbc_include.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief DXBC Program type
|
|
|
|
*
|
|
|
|
* Defines the shader stage that a DXBC
|
|
|
|
* module has been compiled form.
|
|
|
|
*/
|
|
|
|
enum class DxbcProgramType : uint16_t {
|
|
|
|
PixelShader = 0,
|
|
|
|
VertexShader = 1,
|
|
|
|
GeometryShader = 2,
|
|
|
|
HullShader = 3,
|
|
|
|
DomainShader = 4,
|
|
|
|
ComputeShader = 5,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2018-10-08 09:22:58 +02:00
|
|
|
* \brief DXBC shader info
|
2017-10-16 17:50:09 +02:00
|
|
|
*
|
2018-10-08 09:22:58 +02:00
|
|
|
* Stores the shader program type.
|
2017-10-16 17:50:09 +02:00
|
|
|
*/
|
2018-10-08 09:34:56 +02:00
|
|
|
class DxbcProgramInfo {
|
2017-10-16 17:50:09 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2018-10-08 09:34:56 +02:00
|
|
|
DxbcProgramInfo() { }
|
|
|
|
DxbcProgramInfo(DxbcProgramType type)
|
2018-10-08 09:22:58 +02:00
|
|
|
: m_type(type) { }
|
2017-10-16 17:50:09 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Program type
|
|
|
|
* \returns Program type
|
|
|
|
*/
|
|
|
|
DxbcProgramType type() const {
|
|
|
|
return m_type;
|
|
|
|
}
|
|
|
|
|
2017-10-17 13:02:57 +02:00
|
|
|
/**
|
|
|
|
* \brief Vulkan shader stage
|
|
|
|
*
|
|
|
|
* The \c VkShaderStageFlagBits constant
|
|
|
|
* that corresponds to the program type.
|
|
|
|
* \returns Vulkan shaer stage
|
|
|
|
*/
|
|
|
|
VkShaderStageFlagBits shaderStage() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief SPIR-V execution model
|
|
|
|
*
|
|
|
|
* The execution model that corresponds
|
|
|
|
* to the Vulkan shader stage.
|
|
|
|
* \returns SPIR-V execution model
|
|
|
|
*/
|
|
|
|
spv::ExecutionModel executionModel() const;
|
|
|
|
|
2017-10-16 17:50:09 +02:00
|
|
|
private:
|
|
|
|
|
|
|
|
DxbcProgramType m_type = DxbcProgramType::PixelShader;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2018-10-08 09:22:58 +02:00
|
|
|
}
|