added Unknow and Static in DescriptorSetType

This commit is contained in:
hyzboy 2024-03-09 23:35:56 +08:00
parent d4096735f5
commit 5188d4149c
4 changed files with 9 additions and 4 deletions

@ -1 +1 @@
Subproject commit 6dbe730bb8a12a83095596e2c6f71ddb6e41a71a
Subproject commit 6d9ea2f340cde0ced8d5990d7d45b185fb16b929

View File

@ -153,7 +153,7 @@ public:
ubo_vp_info=db->CreateUBO("Viewport",sizeof(ViewportInfo),&vp_info);
db->global_descriptor.AddUBO(mtl::SBS_ViewportInfo.name,ubo_vp_info);
db->static_descriptor.AddUBO(mtl::SBS_ViewportInfo.name,ubo_vp_info);
}
return(true);

View File

@ -80,11 +80,15 @@ private:
public:
//注:并非一定要走这里,这里只是提供一个注册和自动绑定的机制
DescriptorBinding global_descriptor; ///<全局属性描述符绑定管理
DescriptorBinding static_descriptor; ///<静态属性描述符绑定管理
DescriptorBinding global_descriptor; ///<全局属性描述符绑定管理
public:
RenderResource(GPUDevice *dev):device(dev),global_descriptor(DescriptorSetType::Global){}
RenderResource(GPUDevice *dev):device(dev),
static_descriptor(DescriptorSetType::Static),
global_descriptor(DescriptorSetType::Global)
{}
virtual ~RenderResource()=default;
public: //Add

View File

@ -175,6 +175,7 @@ Material *RenderResource::CreateMaterial(const mtl::MaterialCreateInfo *mci)
Add(mtl);
static_descriptor.Bind(mtl);
global_descriptor.Bind(mtl);
material_by_name.Add(mtl_name,mtl);