supported 0 DescriptorSet material.

This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2022-06-20 21:39:04 +08:00
parent 3fbbdb8204
commit 4dff46c5c5
2 changed files with 26 additions and 19 deletions

View File

@ -54,7 +54,7 @@ public:
const uint GetRefCount()const{return ref_count;} const uint GetRefCount()const{return ref_count;}
void SetBoundingBox(const AABB &aabb){BoundingBox=aabb;} void SetBoundingBox(const AABB &aabb){BoundingBox=aabb;}
const AABB &GetBoundingBox()const {return BoundingBox;} const AABB & GetBoundingBox()const {return BoundingBox;}
bool Set(const AnsiString &name,VBO *vb,VkDeviceSize offset=0); bool Set(const AnsiString &name,VBO *vb,VkDeviceSize offset=0);

View File

@ -8,6 +8,8 @@ PipelineLayoutData *GPUDevice::CreatePipelineLayoutData(const MaterialDescriptor
{ {
PipelineLayoutData *pld=hgl_zero_new<PipelineLayoutData>(); PipelineLayoutData *pld=hgl_zero_new<PipelineLayoutData>();
if(mds)
{
ENUM_CLASS_FOR(DescriptorSetsType,int,i) ENUM_CLASS_FOR(DescriptorSetsType,int,i)
{ {
const DescriptorSetLayoutCreateInfo *dslci=mds->GetBinding((DescriptorSetsType)i); const DescriptorSetLayoutCreateInfo *dslci=mds->GetBinding((DescriptorSetsType)i);
@ -35,6 +37,11 @@ PipelineLayoutData *GPUDevice::CreatePipelineLayoutData(const MaterialDescriptor
delete pld; delete pld;
return(nullptr); return(nullptr);
} }
}
else
{
//没有任何DescriptorSets的情况也是存在的
}
//VkPushConstantRange push_constant_range; //VkPushConstantRange push_constant_range;