renamed to MaterialDescriptorManager from MaterialDescriptorSets

This commit is contained in:
2023-03-20 13:55:47 +08:00
parent 81e2aac321
commit 85530e6d57
12 changed files with 32 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
#include<hgl/graph/VKDevice.h>
#include<hgl/graph/VKMaterial.h>
#include<hgl/graph/VKMaterialDescriptorSets.h>
#include<hgl/graph/VKMaterialDescriptorManager.h>
#include<hgl/graph/VKMaterialParameters.h>
#include<hgl/graph/VKDescriptorSet.h>
#include<hgl/graph/VKShaderModuleMap.h>
@@ -31,7 +31,7 @@ DescriptorSet *GPUDevice::CreateDS(const PipelineLayoutData *pld,const Descripto
return(new DescriptorSet(attr->device,binding_count,pld->pipeline_layout,desc_set));
}
MaterialParameters *GPUDevice::CreateMP(const MaterialDescriptorSets *mds,const PipelineLayoutData *pld,const DescriptorSetType &desc_set_type)
MaterialParameters *GPUDevice::CreateMP(const MaterialDescriptorManager *mds,const PipelineLayoutData *pld,const DescriptorSetType &desc_set_type)
{
if(!mds||!pld)return(nullptr);
if(!RangeCheck<DescriptorSetType>(desc_set_type))
@@ -77,7 +77,7 @@ void CreateShaderStageList(List<VkPipelineShaderStageCreateInfo> &shader_stage_l
}
}
Material *GPUDevice::CreateMaterial(const UTF8String &mtl_name,ShaderModuleMap *shader_maps,MaterialDescriptorSets *mds,VertexInput *vi)
Material *GPUDevice::CreateMaterial(const UTF8String &mtl_name,ShaderModuleMap *shader_maps,MaterialDescriptorManager *mds,VertexInput *vi)
{
const int shader_count=shader_maps->GetCount();

View File

@@ -1,6 +1,6 @@
#include<hgl/graph/VKMaterial.h>
#include<hgl/graph/VKMaterialParameters.h>
#include<hgl/graph/VKMaterialDescriptorSets.h>
#include<hgl/graph/VKMaterialDescriptorManager.h>
#include<hgl/graph/VKVertexInput.h>
#include"VKPipelineLayoutData.h"
VK_NAMESPACE_BEGIN

View File

@@ -1,4 +1,4 @@
#include<hgl/graph/VKMaterialDescriptorSets.h>
#include<hgl/graph/VKMaterialDescriptorManager.h>
#include<hgl/graph/VKDescriptorSetType.h>
#include<hgl/TypeFunc.h>
@@ -12,7 +12,7 @@ void WriteDescriptorSetLayoutBinding(VkDescriptorSetLayoutBinding *dslb,ShaderDe
dslb->pImmutableSamplers=nullptr;
}
MaterialDescriptorSets::MaterialDescriptorSets(const UTF8String &name,ShaderDescriptor *sd_list,const uint sd_count)
MaterialDescriptorManager::MaterialDescriptorManager(const UTF8String &name,ShaderDescriptor *sd_list,const uint sd_count)
{
mtl_name=name;
@@ -82,12 +82,12 @@ MaterialDescriptorSets::MaterialDescriptorSets(const UTF8String &name,ShaderDesc
}
}
MaterialDescriptorSets::~MaterialDescriptorSets()
MaterialDescriptorManager::~MaterialDescriptorManager()
{
delete[] all_dslb;
}
const int MaterialDescriptorSets::GetBinding(const VkDescriptorType &desc_type,const AnsiString &name)const
const int MaterialDescriptorManager::GetBinding(const VkDescriptorType &desc_type,const AnsiString &name)const
{
if(desc_type<VK_DESCRIPTOR_TYPE_BEGIN_RANGE
||desc_type>VK_DESCRIPTOR_TYPE_END_RANGE)

View File

@@ -1,10 +1,10 @@
#include<hgl/graph/VKMaterialParameters.h>
#include<hgl/graph/VKMaterialDescriptorSets.h>
#include<hgl/graph/VKMaterialDescriptorManager.h>
#include<hgl/graph/VKMaterial.h>
#include<hgl/graph/VKDescriptorSet.h>
VK_NAMESPACE_BEGIN
MaterialParameters::MaterialParameters(const MaterialDescriptorSets *_mds,const DescriptorSetType &type,DescriptorSet *ds)
MaterialParameters::MaterialParameters(const MaterialDescriptorManager *_mds,const DescriptorSetType &type,DescriptorSet *ds)
{
mds=_mds;
set_type=type;

View File

@@ -1,10 +1,10 @@
#include"VKPipelineLayoutData.h"
#include<hgl/graph/VKDescriptorSet.h>
#include<hgl/graph/VKDevice.h>
#include<hgl/graph/VKMaterialDescriptorSets.h>
#include<hgl/graph/VKMaterialDescriptorManager.h>
VK_NAMESPACE_BEGIN
PipelineLayoutData *GPUDevice::CreatePipelineLayoutData(const MaterialDescriptorSets *mds)
PipelineLayoutData *GPUDevice::CreatePipelineLayoutData(const MaterialDescriptorManager *mds)
{
PipelineLayoutData *pld=hgl_zero_new<PipelineLayoutData>();

View File

@@ -3,7 +3,7 @@
#include<hgl/graph/VKDevice.h>
#include<hgl/graph/VKShaderModuleMap.h>
#include<hgl/graph/VKShaderResource.h>
#include<hgl/graph/VKMaterialDescriptorSets.h>
#include<hgl/graph/VKMaterialDescriptorManager.h>
#include<hgl/graph/VKVertexInput.h>
#include<hgl/filesystem/FileSystem.h>
#include<hgl/graph/VKRenderResource.h>
@@ -165,7 +165,7 @@ Material *RenderResource::CreateMaterial(const OSString &filename)
const UTF8String mtl_name=ToUTF8String(filename);
MaterialDescriptorSets *mds=nullptr;
MaterialDescriptorManager *mds=nullptr;
{
uint8 count;
cbr.Read(count);
@@ -176,7 +176,7 @@ Material *RenderResource::CreateMaterial(const OSString &filename)
LoadShaderDescriptor(cbr,sd_list,count,ver);
mds=new MaterialDescriptorSets(mtl_name,sd_list,count);
mds=new MaterialDescriptorManager(mtl_name,sd_list,count);
delete[] sd_list;
}