added Debug log.
This commit is contained in:
parent
cc02b719e6
commit
bb3b06f168
@ -136,6 +136,22 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
gbuffer.sampler=db->CreateSampler(&sci);
|
gbuffer.sampler=db->CreateSampler(&sci);
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
{
|
||||||
|
auto da=device->GetDeviceAttribute();
|
||||||
|
|
||||||
|
if(da->debug_maker)
|
||||||
|
{
|
||||||
|
da->debug_maker->SetSampler(*(gbuffer.sampler), "[debug maker] GBuffer_Sampler");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(da->debug_utils)
|
||||||
|
{
|
||||||
|
da->debug_utils->SetSampler(*(gbuffer.sampler), "[debug utils] GBuffer_Sampler");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif//_DEBUG
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InitGBuffer()
|
bool InitGBuffer()
|
||||||
@ -208,8 +224,28 @@ private:
|
|||||||
return(false);
|
return(false);
|
||||||
|
|
||||||
sp->pipeline_fan =gbuffer.rp->CreatePipeline(sp->material_instance,InlinePipeline::Solid3D,Prim::Fan);
|
sp->pipeline_fan =gbuffer.rp->CreatePipeline(sp->material_instance,InlinePipeline::Solid3D,Prim::Fan);
|
||||||
|
if(!sp->pipeline_fan)
|
||||||
|
return(false);
|
||||||
|
|
||||||
return sp->pipeline_fan;
|
#ifdef _DEBUG
|
||||||
|
{
|
||||||
|
auto da=device->GetDeviceAttribute();
|
||||||
|
|
||||||
|
if(da->debug_maker)
|
||||||
|
{
|
||||||
|
da->debug_maker->SetPipeline(*(sp->pipeline_triangles), "[debug maker] GBuffer_Pipeline_Triangles");
|
||||||
|
da->debug_maker->SetPipeline(*(sp->pipeline_fan), "[debug maker] GBuffer_Pipeline_Fan");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(da->debug_utils)
|
||||||
|
{
|
||||||
|
da->debug_utils->SetPipeline(*(sp->pipeline_triangles), "[debug utils] GBuffer_Pipeline_Triangles");
|
||||||
|
da->debug_utils->SetPipeline(*(sp->pipeline_fan), "[debug utils] GBuffer_Pipeline_Fan");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif//_DEBUG
|
||||||
|
|
||||||
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InitCompositionPipeline(SubpassParam *sp)
|
bool InitCompositionPipeline(SubpassParam *sp)
|
||||||
|
@ -45,6 +45,8 @@ public:
|
|||||||
const bool IsMesh ()const{return stage_create_info->stage==VK_SHADER_STAGE_MESH_BIT_NV;}
|
const bool IsMesh ()const{return stage_create_info->stage==VK_SHADER_STAGE_MESH_BIT_NV;}
|
||||||
|
|
||||||
const VkPipelineShaderStageCreateInfo * GetCreateInfo ()const{return stage_create_info;}
|
const VkPipelineShaderStageCreateInfo * GetCreateInfo ()const{return stage_create_info;}
|
||||||
|
|
||||||
|
operator VkShaderModule ()const{return stage_create_info->module;}
|
||||||
};//class ShaderModule
|
};//class ShaderModule
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -138,9 +138,9 @@ Texture2D *RenderResource::LoadTexture2D(const OSString &filename,bool auto_mipm
|
|||||||
const UTF8String name=ToUTF8String(filename);
|
const UTF8String name=ToUTF8String(filename);
|
||||||
|
|
||||||
if(da->debug_maker)
|
if(da->debug_maker)
|
||||||
da->debug_maker->SetImage(tex->GetImage(),name);
|
da->debug_maker->SetImage(tex->GetImage(),"[debug maker] "+name);
|
||||||
if(da->debug_utils)
|
if(da->debug_utils)
|
||||||
da->debug_utils->SetImage(tex->GetImage(),name);
|
da->debug_utils->SetImage(tex->GetImage(),"[debug utils] "+name);
|
||||||
#endif//_DEBUG
|
#endif//_DEBUG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,19 @@ const ShaderModule *RenderResource::CreateShaderModule(const OSString &filename,
|
|||||||
|
|
||||||
shader_module_by_name.Add(filename,sm);
|
shader_module_by_name.Add(filename,sm);
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
{
|
||||||
|
auto da=device->GetDeviceAttribute();
|
||||||
|
const UTF8String sn=ToUTF8String(filename);
|
||||||
|
|
||||||
|
if(da->debug_maker)
|
||||||
|
da->debug_maker->SetShaderModule(*sm,sn);
|
||||||
|
|
||||||
|
if(da->debug_utils)
|
||||||
|
da->debug_utils->SetShaderModule(*sm,sn);
|
||||||
|
}
|
||||||
|
#endif//_DEBUG
|
||||||
|
|
||||||
return sm;
|
return sm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user