diff --git a/CMSceneGraph b/CMSceneGraph index 1251e2a7..f5740162 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 1251e2a735c87995b57c0e7fa3bd41981dee086f +Subproject commit f57401620a52eaf3fdaaf5410beb9528aadaa49a diff --git a/example/Vulkan/TextureFormat.cpp b/example/Vulkan/TextureFormat.cpp index fffb06bd..2af79e95 100644 --- a/example/Vulkan/TextureFormat.cpp +++ b/example/Vulkan/TextureFormat.cpp @@ -106,12 +106,9 @@ int main(int,char **) char olb[]="[ ]"; - if(fp.optimalTilingFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) - olb[1]='O'; - if(fp.linearTilingFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) - olb[2]='L'; - if(fp.bufferFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) - olb[2]='B'; + if(fp.optimalTilingFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT )olb[1]='O'; + if(fp.linearTilingFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT )olb[2]='L'; + if(fp.bufferFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT )olb[2]='B'; std::cout<GetCount(VertexInputGroup::BoneID); + const uint joint_id_binding_count=vil->GetCount(VertexInputGroup::JointID); - if(boneId_binding_count>0) //有骨骼矩阵信息 + if(joint_id_binding_count>0) //有矩阵信息 { - count+=boneId_binding_count; + count+=joint_id_binding_count; - if(countGetCount(VertexInputGroup::BoneWeight); + const uint joing_weight_binding_count=vil->GetCount(VertexInputGroup::JointWeight); - if(boneWeight_binding_count!=1) + if(joing_weight_binding_count!=1) { ++count; } - else //BoneWieght不为1是个bug,除非未来支持8骨骼权重 + else //JointWieght不为1是个bug,除非未来支持8权重 { return(false); } } - else //有BoneID没有BoneWeight? 这是个BUG + else //有JointID没有JointWeight? 这是个BUG { return(false); } diff --git a/src/SceneGraph/Vulkan/VKDevice.cpp b/src/SceneGraph/Vulkan/VKDevice.cpp index b4df5030..a44318a6 100644 --- a/src/SceneGraph/Vulkan/VKDevice.cpp +++ b/src/SceneGraph/Vulkan/VKDevice.cpp @@ -47,7 +47,7 @@ bool GPUDevice::Resize(const VkExtent2D &extent) swapchainRT=CreateSwapchainRenderTarget(); - return(true); + return(swapchainRT); } VkCommandBuffer GPUDevice::CreateCommandBuffer() diff --git a/src/SceneGraph/Vulkan/VKDeviceSwapchain.cpp b/src/SceneGraph/Vulkan/VKDeviceSwapchain.cpp index 08527588..ddd4845b 100644 --- a/src/SceneGraph/Vulkan/VKDeviceSwapchain.cpp +++ b/src/SceneGraph/Vulkan/VKDeviceSwapchain.cpp @@ -60,10 +60,16 @@ namespace } VkSwapchainKHR swap_chain; + VkResult result; - if(vkCreateSwapchainKHR(dev_attr->device,&swapchain_ci,nullptr,&swap_chain)==VK_SUCCESS) + result=vkCreateSwapchainKHR(dev_attr->device,&swapchain_ci,nullptr,&swap_chain); + + if(result==VK_SUCCESS) return(swap_chain); + //LOG_ERROR(OS_TEXT("vkCreateSwapchainKHR failed, result = ")+OSString(result)); + os_err<<"vkCreateSwapchainKHR failed, result="<