1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00
OpenDX/src/dxvk/dxvk_shader.h

55 lines
1.0 KiB
C
Raw Normal View History

2017-10-11 23:28:06 +02:00
#pragma once
2017-10-14 13:44:38 +02:00
#include <vector>
2017-10-11 23:28:06 +02:00
#include "dxvk_include.h"
#include "../spirv/spirv_code_buffer.h"
2017-10-11 23:28:06 +02:00
namespace dxvk {
2017-10-14 13:44:38 +02:00
/**
* \brief Resource slot
2017-10-14 13:44:38 +02:00
*
* Describes the type of a single resource
* binding that a shader can access.
2017-10-14 13:44:38 +02:00
*/
struct DxvkResourceSlot {
uint32_t binding;
VkDescriptorType type;
2017-10-14 13:44:38 +02:00
};
2017-10-11 23:28:06 +02:00
/**
* \brief Shader module
*
* Manages a Vulkan shader module. This will not
* perform any sort of shader compilation. Instead,
* the context will create pipeline objects on the
* fly when executing draw calls.
*/
class DxvkShader : public RcObject {
public:
DxvkShader(
const Rc<vk::DeviceFn>& vkd,
2017-10-14 23:52:47 +02:00
VkShaderStageFlagBits stage,
const SpirvCodeBuffer& code);
2017-10-11 23:28:06 +02:00
~DxvkShader();
VkShaderModule module() const {
return m_module;
}
2017-10-11 23:28:06 +02:00
VkPipelineShaderStageCreateInfo stageInfo() const;
2017-10-11 23:28:06 +02:00
private:
Rc<vk::DeviceFn> m_vkd;
2017-10-14 23:52:47 +02:00
VkShaderStageFlagBits m_stage;
VkShaderModule m_module;
2017-10-14 23:52:47 +02:00
2017-10-11 23:28:06 +02:00
};
}