upgraded codes based on newly CM... library.
This commit is contained in:
@@ -67,7 +67,7 @@ namespace
|
||||
};//struct DescriptorImageInfo:public VkDescriptorImageInfo
|
||||
}//namespace
|
||||
|
||||
void DescriptorSets::Clear()
|
||||
void DescriptorSet::Clear()
|
||||
{
|
||||
buffer_list.ClearData();
|
||||
image_list.ClearData();
|
||||
@@ -76,7 +76,7 @@ void DescriptorSets::Clear()
|
||||
is_dirty=true;
|
||||
}
|
||||
|
||||
bool DescriptorSets::BindUBO(const int binding,const DeviceBuffer *buf,bool dynamic)
|
||||
bool DescriptorSet::BindUBO(const int binding,const DeviceBuffer *buf,bool dynamic)
|
||||
{
|
||||
if(binding<0||!buf)
|
||||
return(false);
|
||||
@@ -92,7 +92,7 @@ bool DescriptorSets::BindUBO(const int binding,const DeviceBuffer *buf,bool dyna
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool DescriptorSets::BindUBO(const int binding,const DeviceBuffer *buf,const VkDeviceSize offset,const VkDeviceSize range,bool dynamic)
|
||||
bool DescriptorSet::BindUBO(const int binding,const DeviceBuffer *buf,const VkDeviceSize offset,const VkDeviceSize range,bool dynamic)
|
||||
{
|
||||
if(binding<0||!buf)
|
||||
return(false);
|
||||
@@ -112,7 +112,7 @@ bool DescriptorSets::BindUBO(const int binding,const DeviceBuffer *buf,const VkD
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool DescriptorSets::BindSSBO(const int binding,const DeviceBuffer *buf,bool dynamic)
|
||||
bool DescriptorSet::BindSSBO(const int binding,const DeviceBuffer *buf,bool dynamic)
|
||||
{
|
||||
if(binding<0||!buf)
|
||||
return(false);
|
||||
@@ -128,7 +128,7 @@ bool DescriptorSets::BindSSBO(const int binding,const DeviceBuffer *buf,bool dyn
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool DescriptorSets::BindSSBO(const int binding,const DeviceBuffer *buf,const VkDeviceSize offset,const VkDeviceSize range,bool dynamic)
|
||||
bool DescriptorSet::BindSSBO(const int binding,const DeviceBuffer *buf,const VkDeviceSize offset,const VkDeviceSize range,bool dynamic)
|
||||
{
|
||||
if(binding<0||!buf)
|
||||
return(false);
|
||||
@@ -148,7 +148,7 @@ bool DescriptorSets::BindSSBO(const int binding,const DeviceBuffer *buf,const Vk
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool DescriptorSets::BindSampler(const int binding,Texture *tex,Sampler *sampler)
|
||||
bool DescriptorSet::BindSampler(const int binding,Texture *tex,Sampler *sampler)
|
||||
{
|
||||
if(binding<0||!tex||!sampler)
|
||||
return(false);
|
||||
@@ -166,7 +166,7 @@ bool DescriptorSets::BindSampler(const int binding,Texture *tex,Sampler *sampler
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool DescriptorSets::BindInputAttachment(const int binding,ImageView *iv)
|
||||
bool DescriptorSet::BindInputAttachment(const int binding,ImageView *iv)
|
||||
{
|
||||
if(binding<0||!iv)
|
||||
return(false);
|
||||
@@ -184,7 +184,7 @@ bool DescriptorSets::BindInputAttachment(const int binding,ImageView *iv)
|
||||
return(true);
|
||||
}
|
||||
|
||||
void DescriptorSets::Update()
|
||||
void DescriptorSet::Update()
|
||||
{
|
||||
if(!is_dirty)return;
|
||||
|
||||
|
@@ -32,8 +32,11 @@ namespace
|
||||
VK_EXT_DEBUG_MARKER_EXTENSION_NAME,
|
||||
#endif//_DEBUG
|
||||
// VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME,
|
||||
// VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME,
|
||||
// VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME,
|
||||
// VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME,
|
||||
VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME,
|
||||
VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME,
|
||||
// VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME,
|
||||
// VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME,
|
||||
// VK_EXT_HDR_METADATA_EXTENSION_NAME,
|
||||
// VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME,
|
||||
|
@@ -8,9 +8,9 @@
|
||||
#include"VKPipelineLayoutData.h"
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
DescriptorSets *GPUDevice::CreateDescriptorSets(const PipelineLayoutData *pld,const DescriptorSetsType &type)const
|
||||
DescriptorSet *GPUDevice::CreateDescriptorSets(const PipelineLayoutData *pld,const DescriptorSetsType &type)const
|
||||
{
|
||||
ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(type);
|
||||
RANGE_CHECK_RETURN_NULLPTR(type);
|
||||
|
||||
const uint32_t binding_count=pld->binding_count[size_t(type)];
|
||||
|
||||
@@ -28,7 +28,7 @@ DescriptorSets *GPUDevice::CreateDescriptorSets(const PipelineLayoutData *pld,co
|
||||
if(vkAllocateDescriptorSets(attr->device,&alloc_info,&desc_set)!=VK_SUCCESS)
|
||||
return(nullptr);
|
||||
|
||||
return(new DescriptorSets(attr->device,binding_count,pld->pipeline_layout,desc_set));
|
||||
return(new DescriptorSet(attr->device,binding_count,pld->pipeline_layout,desc_set));
|
||||
}
|
||||
|
||||
MaterialParameters *GPUDevice::CreateMP(const MaterialDescriptorSets *mds,const PipelineLayoutData *pld,const DescriptorSetsType &desc_set_type)
|
||||
@@ -37,7 +37,7 @@ MaterialParameters *GPUDevice::CreateMP(const MaterialDescriptorSets *mds,const
|
||||
if(!RangeCheck<DescriptorSetsType>(desc_set_type))
|
||||
return(nullptr);
|
||||
|
||||
DescriptorSets *ds=CreateDescriptorSets(pld,desc_set_type);
|
||||
DescriptorSet *ds=CreateDescriptorSets(pld,desc_set_type);
|
||||
|
||||
if(!ds)return(nullptr);
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#include<hgl/graph/VKDescriptorSets.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
MaterialParameters::MaterialParameters(const MaterialDescriptorSets *_mds,const DescriptorSetsType &type,DescriptorSets *ds)
|
||||
MaterialParameters::MaterialParameters(const MaterialDescriptorSets *_mds,const DescriptorSetsType &type,DescriptorSet *ds)
|
||||
{
|
||||
mds=_mds;
|
||||
ds_type=type;
|
||||
|
@@ -40,7 +40,7 @@ PipelineLayoutData *GPUDevice::CreatePipelineLayoutData(const MaterialDescriptor
|
||||
}
|
||||
else
|
||||
{
|
||||
//没有任何DescriptorSets的情况也是存在的
|
||||
//没有任何DescriptorSet的情况也是存在的
|
||||
}
|
||||
|
||||
//VkPushConstantRange push_constant_range;
|
||||
|
@@ -21,7 +21,7 @@ VK_NAMESPACE_BEGIN
|
||||
|
||||
namespace
|
||||
{
|
||||
MapObject<OSString,ShaderResource> shader_resource_by_filename;
|
||||
ObjectMap<OSString,ShaderResource> shader_resource_by_filename;
|
||||
|
||||
const uint8 *LoadShaderStages(ShaderStageList &ss_list,const uint8 *data)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ VK_NAMESPACE_BEGIN
|
||||
filedata+=spv_size;
|
||||
|
||||
filedata=LoadShaderStages(sr->GetStageInputs(),filedata);
|
||||
filedata=LoadShaderStages(sr->GetStageOutputs(),filedata);
|
||||
//filedata=LoadShaderStages(sr->GetStageOutputs(),filedata);
|
||||
|
||||
return sr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user