removed codes about VkDebugMaker
This commit is contained in:
@@ -1,86 +0,0 @@
|
||||
#include<hgl/graph/VKDebugMaker.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
void DebugMaker::SetObjectName(uint64_t object, VkDebugReportObjectTypeEXT objectType, const char *name)
|
||||
{
|
||||
// Check for valid function pointer (may not be present if not running in a debugging application)
|
||||
if(!dmf.SetObjectName)return;
|
||||
|
||||
VkDebugMarkerObjectNameInfoEXT nameInfo = {};
|
||||
nameInfo.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT;
|
||||
nameInfo.objectType = objectType;
|
||||
nameInfo.object = object;
|
||||
nameInfo.pObjectName = name;
|
||||
|
||||
dmf.SetObjectName(device, &nameInfo);
|
||||
}
|
||||
|
||||
void DebugMaker::SetObjectTag(uint64_t object, VkDebugReportObjectTypeEXT objectType, uint64_t name, size_t tagSize, const void* tag)
|
||||
{
|
||||
// Check for valid function pointer (may not be present if not running in a debugging application)
|
||||
if(!dmf.SetObjectTag)return;
|
||||
|
||||
VkDebugMarkerObjectTagInfoEXT tagInfo = {};
|
||||
tagInfo.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT;
|
||||
tagInfo.objectType = objectType;
|
||||
tagInfo.object = object;
|
||||
tagInfo.tagName = name;
|
||||
tagInfo.tagSize = tagSize;
|
||||
tagInfo.pTag = tag;
|
||||
|
||||
dmf.SetObjectTag(device, &tagInfo);
|
||||
}
|
||||
|
||||
void DebugMaker::Begin(VkCommandBuffer cmdbuffer, const char * pMarkerName, const Color4f &color)
|
||||
{
|
||||
//Check for valid function pointer (may not be present if not running in a debugging application)
|
||||
if(!dmf.Begin)return;
|
||||
|
||||
VkDebugMarkerMarkerInfoEXT markerInfo = {};
|
||||
markerInfo.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT;
|
||||
memcpy(markerInfo.color, &color, sizeof(float) * 4);
|
||||
markerInfo.pMarkerName = pMarkerName;
|
||||
|
||||
dmf.Begin(cmdbuffer, &markerInfo);
|
||||
}
|
||||
|
||||
void DebugMaker::Insert(VkCommandBuffer cmdbuffer, const char *markerName, const Color4f &color)
|
||||
{
|
||||
// Check for valid function pointer (may not be present if not running in a debugging application)
|
||||
if(!dmf.Insert)return;
|
||||
|
||||
VkDebugMarkerMarkerInfoEXT markerInfo = {};
|
||||
markerInfo.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT;
|
||||
memcpy(markerInfo.color, &color, sizeof(float) * 4);
|
||||
markerInfo.pMarkerName = markerName;
|
||||
|
||||
dmf.Insert(cmdbuffer, &markerInfo);
|
||||
}
|
||||
|
||||
void DebugMaker::End(VkCommandBuffer cmdBuffer)
|
||||
{
|
||||
// Check for valid function (may not be present if not running in a debugging application)
|
||||
if(!dmf.End)return;
|
||||
|
||||
dmf.End(cmdBuffer);
|
||||
}
|
||||
|
||||
DebugMaker *CreateDebugMaker(VkDevice device)
|
||||
{
|
||||
DebugMakerFunction dmf;
|
||||
|
||||
dmf.SetObjectTag = reinterpret_cast<PFN_vkDebugMarkerSetObjectTagEXT >(vkGetDeviceProcAddr(device, "vkDebugMarkerSetObjectTagEXT"));
|
||||
dmf.SetObjectName = reinterpret_cast<PFN_vkDebugMarkerSetObjectNameEXT>(vkGetDeviceProcAddr(device, "vkDebugMarkerSetObjectNameEXT"));
|
||||
dmf.Begin = reinterpret_cast<PFN_vkCmdDebugMarkerBeginEXT >(vkGetDeviceProcAddr(device, "vkCmdDebugMarkerBeginEXT"));
|
||||
dmf.End = reinterpret_cast<PFN_vkCmdDebugMarkerEndEXT >(vkGetDeviceProcAddr(device, "vkCmdDebugMarkerEndEXT"));
|
||||
dmf.Insert = reinterpret_cast<PFN_vkCmdDebugMarkerInsertEXT >(vkGetDeviceProcAddr(device, "vkCmdDebugMarkerInsertEXT"));
|
||||
|
||||
if(!dmf.SetObjectTag )return(nullptr);
|
||||
if(!dmf.SetObjectName )return(nullptr);
|
||||
if(!dmf.Begin )return(nullptr);
|
||||
if(!dmf.End )return(nullptr);
|
||||
if(!dmf.Insert )return(nullptr);
|
||||
|
||||
return(new DebugMaker(device,dmf));
|
||||
}
|
||||
VK_NAMESPACE_END
|
@@ -28,27 +28,18 @@ bool GPUCmdBuffer::Begin()
|
||||
#ifdef _DEBUG
|
||||
void GPUCmdBuffer::SetDebugName(const UTF8String &object_name)
|
||||
{
|
||||
if(dev_attr->debug_maker)
|
||||
dev_attr->debug_maker->SetCommandBuffer(cmd_buf,"[debug_maker]"+object_name);
|
||||
|
||||
if(dev_attr->debug_utils)
|
||||
dev_attr->debug_utils->SetCommandBuffer(cmd_buf,"[debug_utils]"+object_name);
|
||||
dev_attr->debug_utils->SetCommandBuffer(cmd_buf,object_name);
|
||||
}
|
||||
|
||||
void GPUCmdBuffer::BeginRegion(const UTF8String ®ion_name,const Color4f &color)
|
||||
{
|
||||
if(dev_attr->debug_maker)
|
||||
dev_attr->debug_maker->Begin(cmd_buf,"[debug_maker]"+region_name,color);
|
||||
|
||||
if(dev_attr->debug_utils)
|
||||
dev_attr->debug_utils->CmdBegin(cmd_buf,"[debug_utils]"+region_name,color);
|
||||
dev_attr->debug_utils->CmdBegin(cmd_buf,region_name,color);
|
||||
}
|
||||
|
||||
void GPUCmdBuffer::EndRegion()
|
||||
{
|
||||
if(dev_attr->debug_maker)
|
||||
dev_attr->debug_maker->End(cmd_buf);
|
||||
|
||||
if(dev_attr->debug_utils)
|
||||
dev_attr->debug_utils->CmdEnd(cmd_buf);
|
||||
}
|
||||
|
@@ -69,13 +69,8 @@ VkCommandBuffer GPUDevice::CreateCommandBuffer(const AnsiString &name)
|
||||
return(VK_NULL_HANDLE);
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
if(attr->debug_maker)
|
||||
attr->debug_maker->SetCommandBuffer(cmd_buf,"[debug maker] "+name);
|
||||
|
||||
if(attr->debug_utils)
|
||||
attr->debug_utils->SetCommandBuffer(cmd_buf,"[debug utils] "+name);
|
||||
|
||||
attr->debug_utils->SetCommandBuffer(cmd_buf,name);
|
||||
#endif//_DEBUG
|
||||
|
||||
return cmd_buf;
|
||||
|
@@ -21,8 +21,6 @@ GPUDeviceAttribute::GPUDeviceAttribute(VulkanInstance *inst,const GPUPhysicalDev
|
||||
GPUDeviceAttribute::~GPUDeviceAttribute()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
if(debug_maker)
|
||||
delete debug_maker;
|
||||
if(debug_utils)
|
||||
delete debug_utils;
|
||||
#endif//_DEBUG
|
||||
|
@@ -7,7 +7,6 @@
|
||||
#include<hgl/graph/VKTexture.h>
|
||||
#include<hgl/graph/VKDeviceCreater.h>
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/graph/VKDebugMaker.h>
|
||||
|
||||
#include<iostream>
|
||||
#include<iomanip>
|
||||
@@ -18,7 +17,6 @@ VkPipelineCache CreatePipelineCache(VkDevice device,const VkPhysicalDeviceProper
|
||||
void SetShaderCompilerVersion(const GPUPhysicalDevice *);
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugMaker *CreateDebugMaker(VkDevice);
|
||||
DebugUtils *CreateDebugUtils(VkDevice);
|
||||
|
||||
void LogSurfaceFormat(const VkSurfaceFormatKHR *surface_format_list,const uint32_t format_count,const uint32_t select)
|
||||
@@ -293,11 +291,6 @@ GPUDevice *VulkanDeviceCreater::CreateRenderDevice()
|
||||
if(!device_attr->device)
|
||||
return(nullptr);
|
||||
|
||||
#ifdef _DEBUG
|
||||
device_attr->debug_maker=CreateDebugMaker(device_attr->device);
|
||||
device_attr->debug_utils=CreateDebugUtils(device_attr->device);
|
||||
#endif//_DEBUG
|
||||
|
||||
ChooseSurfaceFormat();
|
||||
|
||||
device_attr->surface_format=surface_format;
|
||||
@@ -322,24 +315,16 @@ GPUDevice *VulkanDeviceCreater::CreateRenderDevice()
|
||||
auto_delete.Discard(); //discard autodelete
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(device_attr->debug_maker)
|
||||
{
|
||||
device_attr->debug_maker->SetPhysicalDevice(*physical_device,"[debug maker] Physical Device:"+AnsiString(physical_device->GetDeviceName()));
|
||||
device_attr->debug_maker->SetDevice(device_attr->device,"[debug maker] Device:"+AnsiString(physical_device->GetDeviceName()));
|
||||
device_attr->debug_maker->SetSurfaceKHR(surface,"[debug maker] Surface");
|
||||
device_attr->debug_maker->SetCommandPool(device_attr->cmd_pool,"[debug maker] Main Command Pool");
|
||||
device_attr->debug_maker->SetDescriptorPool(device_attr->desc_pool,"[debug maker] Main Descriptor Pool");
|
||||
device_attr->debug_maker->SetPipelineCache(device_attr->pipeline_cache,"[debug maker] Main Pipeline Cache");
|
||||
}
|
||||
device_attr->debug_utils=CreateDebugUtils(device_attr->device);
|
||||
|
||||
if(device_attr->debug_utils)
|
||||
{
|
||||
device_attr->debug_utils->SetPhysicalDevice(*physical_device,"[debug utils] Physical Device:"+AnsiString(physical_device->GetDeviceName()));
|
||||
device_attr->debug_utils->SetDevice(device_attr->device,"[debug utils] Device:"+AnsiString(physical_device->GetDeviceName()));
|
||||
device_attr->debug_utils->SetSurfaceKHR(surface,"[debug utils] Surface");
|
||||
device_attr->debug_utils->SetCommandPool(device_attr->cmd_pool,"[debug utils] Main Command Pool");
|
||||
device_attr->debug_utils->SetDescriptorPool(device_attr->desc_pool,"[debug utils] Main Descriptor Pool");
|
||||
device_attr->debug_utils->SetPipelineCache(device_attr->pipeline_cache,"[debug utils] Main Pipeline Cache");
|
||||
device_attr->debug_utils->SetPhysicalDevice(*physical_device,"Physical Device:"+AnsiString(physical_device->GetDeviceName()));
|
||||
device_attr->debug_utils->SetDevice(device_attr->device,"Device:"+AnsiString(physical_device->GetDeviceName()));
|
||||
device_attr->debug_utils->SetSurfaceKHR(surface,"Surface");
|
||||
device_attr->debug_utils->SetCommandPool(device_attr->cmd_pool,"Main Command Pool");
|
||||
device_attr->debug_utils->SetDescriptorPool(device_attr->desc_pool,"Main Descriptor Pool");
|
||||
device_attr->debug_utils->SetPipelineCache(device_attr->pipeline_cache,"Main Pipeline Cache");
|
||||
}
|
||||
#endif//_DEBUG
|
||||
|
||||
|
@@ -13,10 +13,8 @@ void GPUDevice::InitRenderPassManage()
|
||||
device_render_pass=render_pass_manage->AcquireRenderPass(&rbi);
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(attr->debug_maker)
|
||||
attr->debug_maker->SetRenderPass(device_render_pass->GetVkRenderPass(),"[debug maker] MainDeviceRenderPass");
|
||||
if(attr->debug_utils)
|
||||
attr->debug_utils->SetRenderPass(device_render_pass->GetVkRenderPass(),"[debug utils] MainDeviceRenderPass");
|
||||
attr->debug_utils->SetRenderPass(device_render_pass->GetVkRenderPass(),"MainDeviceRenderPass");
|
||||
#endif//_DEBUG
|
||||
}
|
||||
|
||||
|
@@ -74,11 +74,8 @@ namespace
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(dev_attr->debug_maker)
|
||||
dev_attr->debug_maker->SetSwapchainKHR(swap_chain,"[debug maker] SwapChain");
|
||||
|
||||
if(dev_attr->debug_utils)
|
||||
dev_attr->debug_utils->SetSwapchainKHR(swap_chain,"[debug utils] SwapChain");
|
||||
dev_attr->debug_utils->SetSwapchainKHR(swap_chain,"SwapChain");
|
||||
#endif//_DEBUG
|
||||
|
||||
return(swap_chain);
|
||||
@@ -101,17 +98,11 @@ bool GPUDevice::CreateSwapchainFBO(Swapchain *swapchain)
|
||||
return(false);
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(attr->debug_maker)
|
||||
{
|
||||
attr->debug_maker->SetImage(swapchain->sc_depth->GetImage(),"[debug maker] SwapchainDepthImage");
|
||||
attr->debug_maker->SetDeviceMemory(swapchain->sc_depth->GetDeviceMemory(),"[debug maker] SwapchainDepthMemory");
|
||||
}
|
||||
|
||||
if(attr->debug_utils)
|
||||
{
|
||||
attr->debug_utils->SetImage(swapchain->sc_depth->GetImage(),"[debug utils] SwapchainDepthImage");
|
||||
attr->debug_utils->SetImageView(swapchain->sc_depth->GetVulkanImageView(),"[debug utils] SwapchainDepthImageView");
|
||||
attr->debug_utils->SetDeviceMemory(swapchain->sc_depth->GetDeviceMemory(),"[debug utils] SwapchainDepthMemory");
|
||||
attr->debug_utils->SetImage(swapchain->sc_depth->GetImage(),"SwapchainDepthImage");
|
||||
attr->debug_utils->SetImageView(swapchain->sc_depth->GetVulkanImageView(),"SwapchainDepthImageView");
|
||||
attr->debug_utils->SetDeviceMemory(swapchain->sc_depth->GetDeviceMemory(),"SwapchainDepthMemory");
|
||||
}
|
||||
#endif//_DEBUG
|
||||
|
||||
@@ -130,21 +121,13 @@ bool GPUDevice::CreateSwapchainFBO(Swapchain *swapchain)
|
||||
swapchain->sc_depth->GetImageView());
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(attr->debug_maker)
|
||||
{
|
||||
attr->debug_maker->SetImage(swapchain->sc_color[i]->GetImage(),"[debug maker] SwapchainColorImage_"+AnsiString::numberOf(i));
|
||||
attr->debug_maker->SetDeviceMemory(swapchain->sc_color[i]->GetDeviceMemory(),"[debug maker] SwapchainColorMemory_"+AnsiString::numberOf(i));
|
||||
|
||||
attr->debug_maker->SetFramebuffer(swapchain->sc_fbo[i]->GetFramebuffer(),"[debug maker] SwapchainFBO_"+AnsiString::numberOf(i));
|
||||
}
|
||||
|
||||
if(attr->debug_utils)
|
||||
{
|
||||
attr->debug_utils->SetImage(swapchain->sc_color[i]->GetImage(),"[debug utils] SwapchainColorImage_"+AnsiString::numberOf(i));
|
||||
attr->debug_utils->SetImageView(swapchain->sc_color[i]->GetVulkanImageView(),"[debug utils] SwapchainColorImageView_"+AnsiString::numberOf(i));
|
||||
attr->debug_utils->SetDeviceMemory(swapchain->sc_color[i]->GetDeviceMemory(),"[debug utils] SwapchainColorMemory_"+AnsiString::numberOf(i));
|
||||
attr->debug_utils->SetImage(swapchain->sc_color[i]->GetImage(),"SwapchainColorImage_"+AnsiString::numberOf(i));
|
||||
attr->debug_utils->SetImageView(swapchain->sc_color[i]->GetVulkanImageView(),"SwapchainColorImageView_"+AnsiString::numberOf(i));
|
||||
attr->debug_utils->SetDeviceMemory(swapchain->sc_color[i]->GetDeviceMemory(),"SwapchainColorMemory_"+AnsiString::numberOf(i));
|
||||
|
||||
attr->debug_utils->SetFramebuffer(swapchain->sc_fbo[i]->GetFramebuffer(),"[debug utils] SwapchainFBO_"+AnsiString::numberOf(i));
|
||||
attr->debug_utils->SetFramebuffer(swapchain->sc_fbo[i]->GetFramebuffer(),"SwapchainFBO_"+AnsiString::numberOf(i));
|
||||
}
|
||||
#endif//_DEBUG
|
||||
}
|
||||
|
@@ -40,18 +40,12 @@ bool Primitive::Set(const AnsiString &name,VBO *vbo,VkDeviceSize offset)
|
||||
buffer_list.Add(name,bd);
|
||||
|
||||
#ifdef _DEBUG
|
||||
auto *da=device->GetDeviceAttribute();
|
||||
DebugUtils *du=device->GetDebugUtils();
|
||||
|
||||
if(da->debug_maker)
|
||||
if(du)
|
||||
{
|
||||
da->debug_maker->SetBuffer(vbo->GetBuffer(),"[debug maker] "+prim_name+":VBO:Buffer:"+name);
|
||||
da->debug_maker->SetDeviceMemory(vbo->GetVkMemory(),"[debug maker] "+prim_name+":VBO:Memory:"+name);
|
||||
}
|
||||
|
||||
if(da->debug_utils)
|
||||
{
|
||||
da->debug_utils->SetBuffer(vbo->GetBuffer(),"[debug utils] "+prim_name+":VBO:Buffer:"+name);
|
||||
da->debug_utils->SetDeviceMemory(vbo->GetVkMemory(),"[debug utils] "+prim_name+":VBO:Memory:"+name);
|
||||
du->SetBuffer(vbo->GetBuffer(),prim_name+":VBO:Buffer:"+name);
|
||||
du->SetDeviceMemory(vbo->GetVkMemory(),prim_name+":VBO:Memory:"+name);
|
||||
}
|
||||
#endif//_DEBUG
|
||||
|
||||
@@ -91,18 +85,12 @@ bool Primitive::Set(IndexBuffer *ib,VkDeviceSize offset)
|
||||
index_buffer_data.offset=offset;
|
||||
|
||||
#ifdef _DEBUG
|
||||
auto *da=device->GetDeviceAttribute();
|
||||
DebugUtils *du=device->GetDebugUtils();
|
||||
|
||||
if(da->debug_maker)
|
||||
if(du)
|
||||
{
|
||||
da->debug_maker->SetBuffer(ib->GetBuffer(),"[debug maker] "+prim_name+":IBO:Buffer");
|
||||
da->debug_maker->SetDeviceMemory(ib->GetVkMemory(),"[debug maker] "+prim_name+":IBO:Memory");
|
||||
}
|
||||
|
||||
if(da->debug_utils)
|
||||
{
|
||||
da->debug_utils->SetBuffer(ib->GetBuffer(),"[debug utils] "+prim_name+":IBO:Buffer");
|
||||
da->debug_utils->SetDeviceMemory(ib->GetVkMemory(),"[debug utils] "+prim_name+":IBO:Memory");
|
||||
du->SetBuffer(ib->GetBuffer(),prim_name+":IBO:Buffer");
|
||||
du->SetDeviceMemory(ib->GetVkMemory(),prim_name+":IBO:Memory");
|
||||
}
|
||||
#endif//_DEBUG
|
||||
return(true);
|
||||
|
@@ -150,13 +150,14 @@ Texture2D *RenderResource::LoadTexture2D(const OSString &filename,bool auto_mipm
|
||||
Add(tex);
|
||||
|
||||
#ifdef _DEBUG
|
||||
GPUDeviceAttribute *da=device->GetDeviceAttribute();
|
||||
const UTF8String name=ToUTF8String(filename);
|
||||
DebugUtils *du=device->GetDebugUtils();
|
||||
|
||||
if(du)
|
||||
{
|
||||
const UTF8String name=ToUTF8String(filename);
|
||||
|
||||
if(da->debug_maker)
|
||||
da->debug_maker->SetImage(tex->GetImage(),"[debug maker] Tex2D:"+name);
|
||||
if(da->debug_utils)
|
||||
da->debug_utils->SetImage(tex->GetImage(),"[debug utils] Tex2D:"+name);
|
||||
du->SetImage(tex->GetImage(),"Tex2D:"+name);
|
||||
}
|
||||
#endif//_DEBUG
|
||||
}
|
||||
|
||||
@@ -171,19 +172,13 @@ Texture2DArray *RenderResource::CreateTexture2DArray(const AnsiString &name,cons
|
||||
Add(ta);
|
||||
|
||||
#ifdef _DEBUG
|
||||
GPUDeviceAttribute *da=device->GetDeviceAttribute();
|
||||
DebugUtils *du=device->GetDebugUtils();
|
||||
|
||||
if(da->debug_maker)
|
||||
if(du)
|
||||
{
|
||||
da->debug_maker->SetImage(ta->GetImage(),"[debug maker] Tex2DArrayImage:"+name);
|
||||
da->debug_maker->SetDeviceMemory(ta->GetDeviceMemory(),"[debug maker] Tex2DArrayMemory:"+name);
|
||||
}
|
||||
|
||||
if(da->debug_utils)
|
||||
{
|
||||
da->debug_utils->SetImage(ta->GetImage(),"[debug utils] Tex2DArrayImage:"+name);
|
||||
da->debug_utils->SetImageView(ta->GetVulkanImageView(),"[debug utils] Tex2DArrayImageView:"+name);
|
||||
da->debug_utils->SetDeviceMemory(ta->GetDeviceMemory(),"[debug utils] Tex2DArrayMemory:"+name);
|
||||
du->SetImage(ta->GetImage(),"Tex2DArrayImage:"+name);
|
||||
du->SetImageView(ta->GetVulkanImageView(),"Tex2DArrayImageView:"+name);
|
||||
du->SetDeviceMemory(ta->GetDeviceMemory(),"Tex2DArrayMemory:"+name);
|
||||
}
|
||||
#endif//_DEBUG
|
||||
|
||||
|
@@ -65,13 +65,10 @@ const ShaderModule *RenderResource::CreateShaderModule(const AnsiString &sm_name
|
||||
|
||||
#ifdef _DEBUG
|
||||
{
|
||||
auto da=device->GetDeviceAttribute();
|
||||
DebugUtils *du=device->GetDebugUtils();
|
||||
|
||||
if(da->debug_maker)
|
||||
da->debug_maker->SetShaderModule(*sm,"[debug maker] Shader:"+sm_name+AnsiString(":")+GetShaderStageName(sci->GetShaderStage()));
|
||||
|
||||
if(da->debug_utils)
|
||||
da->debug_utils->SetShaderModule(*sm,"[debug utils] Shader:"+sm_name+AnsiString(":")+GetShaderStageName(sci->GetShaderStage()));
|
||||
if(du)
|
||||
du->SetShaderModule(*sm,"Shader:"+sm_name+AnsiString(":")+GetShaderStageName(sci->GetShaderStage()));
|
||||
}
|
||||
#endif//_DEBUG
|
||||
|
||||
@@ -140,12 +137,10 @@ Material *RenderResource::CreateMaterial(const mtl::MaterialCreateInfo *mci)
|
||||
mtl->pipeline_layout_data=device->CreatePipelineLayoutData(mtl->desc_manager);
|
||||
|
||||
#ifdef _DEBUG
|
||||
GPUDeviceAttribute *da=device->GetDeviceAttribute();
|
||||
DebugUtils *du=device->GetDebugUtils();
|
||||
|
||||
if(da->debug_maker)
|
||||
da->debug_maker->SetPipelineLayout(mtl->GetPipelineLayout(),"[debug maker] PipelineLayout:"+mtl->GetName());
|
||||
if(da->debug_utils)
|
||||
da->debug_utils->SetPipelineLayout(mtl->GetPipelineLayout(),"[debug utils] PipelineLayout:"+mtl->GetName());
|
||||
if(du)
|
||||
du->SetPipelineLayout(mtl->GetPipelineLayout(),"PipelineLayout:"+mtl->GetName());
|
||||
#endif//_DEBUG
|
||||
|
||||
if(mtl->desc_manager)
|
||||
@@ -157,22 +152,13 @@ Material *RenderResource::CreateMaterial(const mtl::MaterialCreateInfo *mci)
|
||||
mtl->mp_array[dst]=device->CreateMP(mtl->desc_manager,mtl->pipeline_layout_data,(DescriptorSetType)dst);
|
||||
|
||||
#ifdef _DEBUG
|
||||
GPUDeviceAttribute *da=device->GetDeviceAttribute();
|
||||
|
||||
AnsiString debug_name=mtl->GetName()+AnsiString(":")+GetDescriptorSetTypeName((DescriptorSetType)dst);
|
||||
|
||||
if(da->debug_maker)
|
||||
if(du)
|
||||
{
|
||||
da->debug_maker->SetDescriptorSet(mtl->mp_array[dst]->GetVkDescriptorSet(),"[debug maker] DescSet:"+debug_name);
|
||||
du->SetDescriptorSet(mtl->mp_array[dst]->GetVkDescriptorSet(),"DescSet:"+debug_name);
|
||||
|
||||
da->debug_maker->SetDescriptorSetLayout(mtl->pipeline_layout_data->layouts[dst],"[debug maker] DescSetLayout:"+debug_name);
|
||||
}
|
||||
|
||||
if(da->debug_utils)
|
||||
{
|
||||
da->debug_utils->SetDescriptorSet(mtl->mp_array[dst]->GetVkDescriptorSet(),"[debug utils] DescSet:"+debug_name);
|
||||
|
||||
da->debug_utils->SetDescriptorSetLayout(mtl->pipeline_layout_data->layouts[dst],"[debug utils] DescSetLayout:"+debug_name);
|
||||
du->SetDescriptorSetLayout(mtl->pipeline_layout_data->layouts[dst],"DescSetLayout:"+debug_name);
|
||||
}
|
||||
#endif//_DEBUG
|
||||
}
|
||||
|
Reference in New Issue
Block a user