moved DescriptorSetsType to ShaderResource.h

This commit is contained in:
hyzboy 2021-06-15 21:19:28 +08:00
parent 8b3c90c717
commit 1100e98a92
2 changed files with 13 additions and 8 deletions

View File

@ -51,6 +51,17 @@ struct ShaderDescriptor
using ShaderDescriptorList=List<ShaderDescriptor>; using ShaderDescriptorList=List<ShaderDescriptor>;
enum class DescriptorSetsType
{
//设计使其对应shader中的sets
Material=0, ///<材质中永远不变的参数
MaterialTexture, ///<材质中的纹理参数
MaterialValues, ///<材质中的变量参数
RenderableInstance, ///<渲染实例参数
Global, ///<全局参数
};//
#ifndef VK_DESCRIPTOR_TYPE_BEGIN_RANGE #ifndef VK_DESCRIPTOR_TYPE_BEGIN_RANGE
constexpr size_t VK_DESCRIPTOR_TYPE_BEGIN_RANGE=VK_DESCRIPTOR_TYPE_SAMPLER; constexpr size_t VK_DESCRIPTOR_TYPE_BEGIN_RANGE=VK_DESCRIPTOR_TYPE_SAMPLER;
#endif//VK_DESCRIPTOR_TYPE_BEGIN_RANGE #endif//VK_DESCRIPTOR_TYPE_BEGIN_RANGE

View File

@ -6,13 +6,6 @@
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
class DescriptorSets; class DescriptorSets;
enum class DescriptorSetType
{
Material=0,
Renderable,
Global,
};//
/** /**
* *
*/ */
@ -23,6 +16,7 @@ class DescriptorSetLayoutCreater
List<VkDescriptorSetLayoutBinding> layout_binding_list; List<VkDescriptorSetLayoutBinding> layout_binding_list;
VkDescriptorSetLayout dsl=VK_NULL_HANDLE; VkDescriptorSetLayout dsl=VK_NULL_HANDLE;
BindingMapping index_by_binding; BindingMapping index_by_binding;
BindingMapping index_by_binding_ri; BindingMapping index_by_binding_ri;
BindingMapping index_by_binding_global; BindingMapping index_by_binding_global;
@ -73,6 +67,6 @@ public:
const VkPipelineLayout GetPipelineLayout()const{return pipeline_layout;} const VkPipelineLayout GetPipelineLayout()const{return pipeline_layout;}
DescriptorSets *Create(const DescriptorSetType &type=DescriptorSetType::Material); DescriptorSets *Create(const DescriptorSetsType &type);
};//class DescriptorSetLayoutCreater };//class DescriptorSetLayoutCreater
VK_NAMESPACE_END VK_NAMESPACE_END