supported 0 DescriptorSet material.
This commit is contained in:
parent
3fbbdb8204
commit
4dff46c5c5
@ -51,10 +51,10 @@ public:
|
||||
Renderable(const uint32_t dc=0):draw_count(dc){}
|
||||
virtual ~Renderable()=default;
|
||||
|
||||
const uint GetRefCount()const{return ref_count;}
|
||||
const uint GetRefCount()const{return ref_count;}
|
||||
|
||||
void SetBoundingBox(const AABB &aabb){BoundingBox=aabb;}
|
||||
const AABB &GetBoundingBox()const {return BoundingBox;}
|
||||
void SetBoundingBox(const AABB &aabb){BoundingBox=aabb;}
|
||||
const AABB & GetBoundingBox()const {return BoundingBox;}
|
||||
|
||||
bool Set(const AnsiString &name,VBO *vb,VkDeviceSize offset=0);
|
||||
|
||||
|
@ -8,32 +8,39 @@ PipelineLayoutData *GPUDevice::CreatePipelineLayoutData(const MaterialDescriptor
|
||||
{
|
||||
PipelineLayoutData *pld=hgl_zero_new<PipelineLayoutData>();
|
||||
|
||||
ENUM_CLASS_FOR(DescriptorSetsType,int,i)
|
||||
if(mds)
|
||||
{
|
||||
const DescriptorSetLayoutCreateInfo *dslci=mds->GetBinding((DescriptorSetsType)i);
|
||||
ENUM_CLASS_FOR(DescriptorSetsType,int,i)
|
||||
{
|
||||
const DescriptorSetLayoutCreateInfo *dslci=mds->GetBinding((DescriptorSetsType)i);
|
||||
|
||||
if(!dslci||dslci->bindingCount<=0)
|
||||
continue;
|
||||
if(!dslci||dslci->bindingCount<=0)
|
||||
continue;
|
||||
|
||||
if(pld->layouts[i])
|
||||
vkDestroyDescriptorSetLayout(attr->device,pld->layouts[i],nullptr);
|
||||
if(pld->layouts[i])
|
||||
vkDestroyDescriptorSetLayout(attr->device,pld->layouts[i],nullptr);
|
||||
|
||||
if(vkCreateDescriptorSetLayout(attr->device,dslci,nullptr,pld->layouts+i)!=VK_SUCCESS)
|
||||
if(vkCreateDescriptorSetLayout(attr->device,dslci,nullptr,pld->layouts+i)!=VK_SUCCESS)
|
||||
{
|
||||
delete pld;
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
pld->binding_count[i]=dslci->bindingCount;
|
||||
|
||||
pld->fin_dsl[pld->fin_dsl_count]=pld->layouts[i];
|
||||
++pld->fin_dsl_count;
|
||||
}
|
||||
|
||||
if(pld->fin_dsl_count<=0)
|
||||
{
|
||||
delete pld;
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
pld->binding_count[i]=dslci->bindingCount;
|
||||
|
||||
pld->fin_dsl[pld->fin_dsl_count]=pld->layouts[i];
|
||||
++pld->fin_dsl_count;
|
||||
}
|
||||
|
||||
if(pld->fin_dsl_count<=0)
|
||||
else
|
||||
{
|
||||
delete pld;
|
||||
return(nullptr);
|
||||
//没有任何DescriptorSets的情况也是存在的
|
||||
}
|
||||
|
||||
//VkPushConstantRange push_constant_range;
|
||||
|
Loading…
x
Reference in New Issue
Block a user