reordered the creating vkdevice
This commit is contained in:
parent
d05f1109b5
commit
b72144a28b
@ -133,7 +133,7 @@ SET(VK_TEXTURE_LOADER_SOURCE ${SG_INCLUDE_PATH}/VKTextureCreateInfo.h
|
||||
Vulkan/Texture/VKTexture2DLoader.cpp
|
||||
Vulkan/Texture/VKTextureCubeLoader.cpp)
|
||||
|
||||
SET(VK_DEVICE_MAIN_SOURCE ${SG_INCLUDE_PATH}/VKDevice.h
|
||||
SET(VK_DEVICE_CREATER_SOURCE ${SG_INCLUDE_PATH}/VKDevice.h
|
||||
${SG_INCLUDE_PATH}/VKDeviceAttribute.h
|
||||
${SG_INCLUDE_PATH}/VKDeviceCreater.h
|
||||
Vulkan/VKDeviceAttribute.cpp
|
||||
@ -158,7 +158,7 @@ SET(VK_PHYSICAL_DEVICE_SOURCE ${SG_INCLUDE_PATH}/VKPhysicalDevice.h
|
||||
Vulkan/Debug/VKPhysicalDeviceCapsOutput.cpp)
|
||||
|
||||
SOURCE_GROUP("Vulkan\\Device" FILES ${VK_DEVICE_SOURCE})
|
||||
SOURCE_GROUP("Vulkan\\Device\\Main" FILES ${VK_DEVICE_MAIN_SOURCE})
|
||||
SOURCE_GROUP("Vulkan\\Device\\Creater" FILES ${VK_DEVICE_CREATER_SOURCE})
|
||||
SOURCE_GROUP("Vulkan\\Device\\Debug" FILES ${VK_DEBUG_SOURCE})
|
||||
SOURCE_GROUP("Vulkan\\Device\\Instance" FILES ${VK_INST_SOURCE})
|
||||
SOURCE_GROUP("Vulkan\\Device\\Physical Device" FILES ${VK_PHYSICAL_DEVICE_SOURCE})
|
||||
@ -258,7 +258,7 @@ SET(VULKAN_RENDER_SOURCE ${VK_RR_SOURCE}
|
||||
${VK_DEBUG_SOURCE}
|
||||
${VK_MEMORY_SOURCE}
|
||||
${VK_DEVICE_SOURCE}
|
||||
${VK_DEVICE_MAIN_SOURCE}
|
||||
${VK_DEVICE_CREATER_SOURCE}
|
||||
${VK_DEVICE_TEXTURE_SOURCE}
|
||||
${VK_TEXTURE_LOADER_SOURCE}
|
||||
${VK_PHYSICAL_DEVICE_SOURCE}
|
||||
|
@ -287,10 +287,6 @@ GPUDevice *VulkanDeviceCreater::CreateRenderDevice()
|
||||
SetDeviceExtension(&ext_list,physical_device,require);
|
||||
SetDeviceFeatures(&features,physical_device->GetFeatures10(),require);
|
||||
|
||||
ChooseSurfaceFormat();
|
||||
|
||||
device_attr->surface_format=surface_format;
|
||||
|
||||
device_attr->device=CreateDevice(device_attr->graphics_family);
|
||||
|
||||
if(!device_attr->device)
|
||||
@ -301,6 +297,10 @@ GPUDevice *VulkanDeviceCreater::CreateRenderDevice()
|
||||
device_attr->debug_utils=CreateDebugUtils(device_attr->device);
|
||||
#endif//_DEBUG
|
||||
|
||||
ChooseSurfaceFormat();
|
||||
|
||||
device_attr->surface_format=surface_format;
|
||||
|
||||
GetDeviceQueue(device_attr);
|
||||
|
||||
device_attr->cmd_pool=CreateCommandPool(device_attr->device,device_attr->graphics_family);
|
||||
|
Loading…
x
Reference in New Issue
Block a user