DiligentGraphics / DiligentSamples

Sample projects demonstrating the usage of Diligent Engine
http://diligentgraphics.com/diligent-engine/samples/
Apache License 2.0
320 stars 80 forks source link

Tessellation demo crashes on Android/Vulkan #63

Open mgood7123 opened 3 years ago

mgood7123 commented 3 years ago

additional info

where:

PipelineWrapper VulkanLogicalDevice::CreateGraphicsPipeline(const VkGraphicsPipelineCreateInfo& PipelineCI,
                                                            VkPipelineCache                     cache,
                                                            const char*                         DebugName) const
{
    VERIFY_EXPR(PipelineCI.sType == VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO);

    if (DebugName == nullptr)
        DebugName = "";

    VkPipeline vkPipeline = VK_NULL_HANDLE;

    // see stack_after.cpp for what happens when this is entered
>    auto err = vkCreateGraphicsPipelines(m_VkDevice, cache, 1, &PipelineCI, m_VkAllocator, &vkPipeline);
    CHECK_VK_ERROR_AND_THROW(err, "Failed to create graphics pipeline '", DebugName, '\'');

    if (*DebugName != 0)
        SetPipelineName(m_VkDevice, vkPipeline, DebugName);

    return PipelineWrapper{GetSharedPtr(), std::move(vkPipeline)};
}

stack after stepping into vkCreateGraphicsPipelines

art_sigsegv_fault 0x00000079dadfbf90
art::FaultManager::HandleFault(int, siginfo*, void*) 0x00000079dadfc4b8
art::SignalChain::Handler(int, siginfo*, void*) 0x000000624b37fde8
<unknown> 0x0000007a6256f7c0
<unknown> 0x00000079698897fc

debug variables

cache = {VkPipelineCache | 0x0} NULL
DebugName = {const char * | 0x79d168d130} "Terrain PSO"
 *DebugName = {const char} 84 'T'
PipelineCI = {const VkGraphicsPipelineCreateInfo &} 
 basePipelineHandle = {VkPipeline | 0x0} NULL
 basePipelineIndex = {int32_t} -1
 flags = {VkPipelineCreateFlags} 1
 layout = {VkPipelineLayout | 0x79d1919408} 0x00000079d1919408
 pColorBlendState = {const VkPipelineColorBlendStateCreateInfo * | 0x79cabfa750} 0x00000079cabfa750
  attachmentCount = {uint32_t} 1
  blendConstants = {float [4]} (0, 0, 0, 0)
   [0] = {float} 0
   [1] = {float} 0
   [2] = {float} 0
   [3] = {float} 0
  flags = {VkPipelineColorBlendStateCreateFlags} 0
  logicOp = {VkLogicOp} VK_LOGIC_OP_NO_OP
  logicOpEnable = {VkBool32} 0
  pAttachments = {const VkPipelineColorBlendAttachmentState * | 0x79cdc044c0} 0x00000079cdc044c0
   alphaBlendOp = {VkBlendOp} VK_BLEND_OP_ADD
   blendEnable = {VkBool32} 0
   colorBlendOp = {VkBlendOp} VK_BLEND_OP_ADD
   colorWriteMask = {VkColorComponentFlags} 15
   dstAlphaBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ZERO
   dstColorBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ZERO
   srcAlphaBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ONE
   srcColorBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ONE
  pNext = {const void * | 0x0} NULL
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
 pDepthStencilState = {const VkPipelineDepthStencilStateCreateInfo * | 0x79cabfa4e8} 0x00000079cabfa4e8
  back = {VkStencilOpState} 
   compareMask = {uint32_t} 255
   compareOp = {VkCompareOp} VK_COMPARE_OP_ALWAYS
   depthFailOp = {VkStencilOp} VK_STENCIL_OP_KEEP
   failOp = {VkStencilOp} VK_STENCIL_OP_KEEP
   passOp = {VkStencilOp} VK_STENCIL_OP_KEEP
   reference = {uint32_t} 0
   writeMask = {uint32_t} 255
  depthBoundsTestEnable = {VkBool32} 0
  depthCompareOp = {VkCompareOp} VK_COMPARE_OP_LESS
  depthTestEnable = {VkBool32} 1
  depthWriteEnable = {VkBool32} 1
  flags = {VkPipelineDepthStencilStateCreateFlags} 0
  front = {VkStencilOpState} 
   compareMask = {uint32_t} 255
   compareOp = {VkCompareOp} VK_COMPARE_OP_ALWAYS
   depthFailOp = {VkStencilOp} VK_STENCIL_OP_KEEP
   failOp = {VkStencilOp} VK_STENCIL_OP_KEEP
   passOp = {VkStencilOp} VK_STENCIL_OP_KEEP
   reference = {uint32_t} 0
   writeMask = {uint32_t} 255
  maxDepthBounds = {float} 1
  minDepthBounds = {float} 0
  pNext = {const void * | 0x0} NULL
  stencilTestEnable = {VkBool32} 0
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
 pDynamicState = {const VkPipelineDynamicStateCreateInfo * | 0x79cabfa490} 0x00000079cabfa490
  dynamicStateCount = {uint32_t} 3
  flags = {VkPipelineDynamicStateCreateFlags} 0
  pDynamicStates = {const VkDynamicState * | 0x79d168d360} 0x00000079d168d360
   *pDynamicStates = {VkDynamicState} VK_DYNAMIC_STATE_VIEWPORT
  pNext = {const void * | 0x0} NULL
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
 pInputAssemblyState = {const VkPipelineInputAssemblyStateCreateInfo * | 0x79cabfa620} 0x00000079cabfa620
  flags = {VkPipelineInputAssemblyStateCreateFlags} 0
  pNext = {const void * | 0x0} NULL
  primitiveRestartEnable = {VkBool32} 0
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
  topology = {VkPrimitiveTopology} VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
 pMultisampleState = {const VkPipelineMultisampleStateCreateInfo * | 0x79cabfa550} 0x00000079cabfa550
  alphaToCoverageEnable = {VkBool32} 0
  alphaToOneEnable = {VkBool32} 0
  flags = {VkPipelineMultisampleStateCreateFlags} 0
  minSampleShading = {float} 0
  pNext = {const void * | 0x0} NULL
  pSampleMask = {const VkSampleMask * | 0x79cabfa790} 0x00000079cabfa790
   *pSampleMask = {VkSampleMask} 4294967295
  rasterizationSamples = {VkSampleCountFlagBits} VK_SAMPLE_COUNT_1_BIT
  sampleShadingEnable = {VkBool32} 0
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
 pNext = {const void * | 0x0} NULL
 pRasterizationState = {const VkPipelineRasterizationStateCreateInfo * | 0x79cabfa580} 0x00000079cabfa580
  cullMode = {VkCullModeFlags} 2
  depthBiasClamp = {float} 0
  depthBiasConstantFactor = {float} 0
  depthBiasEnable = {VkBool32} 0
  depthBiasSlopeFactor = {float} 0
  depthClampEnable = {VkBool32} 0
  flags = {VkPipelineRasterizationStateCreateFlags} 0
  frontFace = {VkFrontFace} VK_FRONT_FACE_CLOCKWISE
  lineWidth = {float} 1
  pNext = {const void * | 0x0} NULL
  polygonMode = {VkPolygonMode} VK_POLYGON_MODE_FILL
  rasterizerDiscardEnable = {VkBool32} 0
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
 pStages = {const VkPipelineShaderStageCreateInfo * | 0x79cdca2c00} 0x00000079cdca2c00
  flags = {VkPipelineShaderStageCreateFlags} 0
  module = {VkShaderModule | 0x79d13c4fc0} 0x00000079d13c4fc0
  pName = {const char * | 0x79d1846049} "TerrainVS"
   *pName = {const char} 84 'T'
  pNext = {const void * | 0x0} NULL
  pSpecializationInfo = {const VkSpecializationInfo * | 0x0} NULL
  stage = {VkShaderStageFlagBits} VK_SHADER_STAGE_VERTEX_BIT
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
 pTessellationState = {const VkPipelineTessellationStateCreateInfo * | 0x79cabfa608} 0x00000079cabfa608
  flags = {VkPipelineTessellationStateCreateFlags} 0
  patchControlPoints = {uint32_t} 1
  pNext = {const void * | 0x0} NULL
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
 pVertexInputState = {const VkPipelineVertexInputStateCreateInfo * | 0x79cabfa680} 0x00000079cabfa680
  flags = {VkPipelineVertexInputStateCreateFlags} 0
  pNext = {const void * | 0x0} NULL
  pVertexAttributeDescriptions = {const VkVertexInputAttributeDescription * | 0x79cabfa818} 0x00000079cabfa818
   binding = {uint32_t} 121
   format = {VkFormat} 3401558096
   location = {uint32_t} 3514994840
   offset = {uint32_t} 121
  pVertexBindingDescriptions = {const VkVertexInputBindingDescription * | 0x79cabfa918} 0x00000079cabfa918
   binding = {uint32_t} 3514994816
   inputRate = {VkVertexInputRate} 3401558352
   stride = {uint32_t} 121
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
  vertexAttributeDescriptionCount = {uint32_t} 0
  vertexBindingDescriptionCount = {uint32_t} 0
 pViewportState = {const VkPipelineViewportStateCreateInfo * | 0x79cabfa5d0} 0x00000079cabfa5d0
  flags = {VkPipelineViewportStateCreateFlags} 0
  pNext = {const void * | 0x0} NULL
  pScissors = {const VkRect2D * | 0x79cabfa5c0} 0x00000079cabfa5c0
   extent = {VkExtent2D} 
    height = {uint32_t} 8192
    width = {uint32_t} 8192
   offset = {VkOffset2D} 
    x = {int32_t} 0
    y = {int32_t} 0
  pViewports = {const VkViewport * | 0x0} NULL
  scissorCount = {uint32_t} 1
  sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
  viewportCount = {uint32_t} 1
 renderPass = {VkRenderPass | 0x79d1641e78} 0x00000079d1641e78
 stageCount = {uint32_t} 5
 sType = {VkStructureType} VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
 subpass = {uint32_t} 0
this = {const VulkanUtilities::VulkanLogicalDevice * | 0x79d2476100} 0x00000079d2476100
 m_EnabledExtFeatures = {VulkanUtilities::VulkanLogicalDevice::ExtensionFeatures} 
  AccelStruct = {VkPhysicalDeviceAccelerationStructureFeaturesKHR} 
   accelerationStructure = {VkBool32} 0
   accelerationStructureCaptureReplay = {VkBool32} 0
   accelerationStructureHostCommands = {VkBool32} 0
   accelerationStructureIndirectBuild = {VkBool32} 0
   descriptorBindingAccelerationStructureUpdateAfterBind = {VkBool32} 0
   pNext = {void * | 0x0} NULL
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
  BufferDeviceAddress = {VkPhysicalDeviceBufferDeviceAddressFeaturesKHR} 
   bufferDeviceAddress = {VkBool32} 0
   bufferDeviceAddressCaptureReplay = {VkBool32} 0
   bufferDeviceAddressMultiDevice = {VkBool32} 0
   pNext = {void * | 0x0} NULL
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
  DescriptorIndexing = {VkPhysicalDeviceDescriptorIndexingFeaturesEXT} 
   descriptorBindingPartiallyBound = {VkBool32} 0
   descriptorBindingSampledImageUpdateAfterBind = {VkBool32} 0
   descriptorBindingStorageBufferUpdateAfterBind = {VkBool32} 0
   descriptorBindingStorageImageUpdateAfterBind = {VkBool32} 0
   descriptorBindingStorageTexelBufferUpdateAfterBind = {VkBool32} 0
   descriptorBindingUniformBufferUpdateAfterBind = {VkBool32} 0
   descriptorBindingUniformTexelBufferUpdateAfterBind = {VkBool32} 0
   descriptorBindingUpdateUnusedWhilePending = {VkBool32} 0
   descriptorBindingVariableDescriptorCount = {VkBool32} 0
   pNext = {void * | 0x0} NULL
   runtimeDescriptorArray = {VkBool32} 0
   shaderInputAttachmentArrayDynamicIndexing = {VkBool32} 0
   shaderInputAttachmentArrayNonUniformIndexing = {VkBool32} 0
   shaderSampledImageArrayNonUniformIndexing = {VkBool32} 0
   shaderStorageBufferArrayNonUniformIndexing = {VkBool32} 0
   shaderStorageImageArrayNonUniformIndexing = {VkBool32} 0
   shaderStorageTexelBufferArrayDynamicIndexing = {VkBool32} 0
   shaderStorageTexelBufferArrayNonUniformIndexing = {VkBool32} 0
   shaderUniformBufferArrayNonUniformIndexing = {VkBool32} 0
   shaderUniformTexelBufferArrayDynamicIndexing = {VkBool32} 0
   shaderUniformTexelBufferArrayNonUniformIndexing = {VkBool32} 0
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
  HasPortabilitySubset = {bool} false
  MeshShader = {VkPhysicalDeviceMeshShaderFeaturesNV} 
   meshShader = {VkBool32} 0
   pNext = {void * | 0x0} NULL
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
   taskShader = {VkBool32} 0
  PortabilitySubset = {VkPhysicalDevicePortabilitySubsetFeaturesKHR} 
   constantAlphaColorBlendFactors = {VkBool32} 0
   events = {VkBool32} 0
   imageView2DOn3DImage = {VkBool32} 0
   imageViewFormatReinterpretation = {VkBool32} 0
   imageViewFormatSwizzle = {VkBool32} 0
   multisampleArrayImage = {VkBool32} 0
   mutableComparisonSamplers = {VkBool32} 0
   pNext = {void * | 0x0} NULL
   pointPolygons = {VkBool32} 0
   samplerMipLodBias = {VkBool32} 0
   separateStencilMaskRef = {VkBool32} 0
   shaderSampleRateInterpolationFunctions = {VkBool32} 0
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
   tessellationIsolines = {VkBool32} 0
   tessellationPointMode = {VkBool32} 0
   triangleFans = {VkBool32} 0
   vertexAttributeAccessBeyondStride = {VkBool32} 0
  RayQuery = {VkPhysicalDeviceRayQueryFeaturesKHR} 
   pNext = {void * | 0x0} NULL
   rayQuery = {VkBool32} 0
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
  RayTracingPipeline = {VkPhysicalDeviceRayTracingPipelineFeaturesKHR} 
   pNext = {void * | 0x0} NULL
   rayTracingPipeline = {VkBool32} 0
   rayTracingPipelineShaderGroupHandleCaptureReplay = {VkBool32} 0
   rayTracingPipelineShaderGroupHandleCaptureReplayMixed = {VkBool32} 0
   rayTracingPipelineTraceRaysIndirect = {VkBool32} 0
   rayTraversalPrimitiveCulling = {VkBool32} 0
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
  ShaderFloat16Int8 = {VkPhysicalDeviceShaderFloat16Int8FeaturesKHR} 
   pNext = {void * | 0x0} NULL
   shaderFloat16 = {VkBool32} 0
   shaderInt8 = {VkBool32} 0
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
  Spirv14 = {bool} false
  Spirv15 = {bool} false
  Storage8Bit = {VkPhysicalDevice8BitStorageFeaturesKHR} 
   pNext = {void * | 0x0} NULL
   storageBuffer8BitAccess = {VkBool32} 0
   storagePushConstant8 = {VkBool32} 0
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
   uniformAndStorageBuffer8BitAccess = {VkBool32} 0
  Storage16Bit = {VkPhysicalDevice16BitStorageFeaturesKHR} 
   pNext = {void * | 0x0} NULL
   storageBuffer16BitAccess = {VkBool32} 1
   storageInputOutput16 = {VkBool32} 1
   storagePushConstant16 = {VkBool32} 1
   sType = {VkStructureType} VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES
   uniformAndStorageBuffer16BitAccess = {VkBool32} 1
  SubgroupOps = {bool} false
  TimelineSemaphore = {VkPhysicalDeviceTimelineSemaphoreFeaturesKHR} 
   pNext = {void * | 0x0} NULL
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
   timelineSemaphore = {VkBool32} 0
  VertexAttributeDivisor = {VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT} 
   pNext = {void * | 0x0} NULL
   sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
   vertexAttributeInstanceRateDivisor = {VkBool32} 0
   vertexAttributeInstanceRateZeroDivisor = {VkBool32} 0
 m_EnabledFeatures = {VkPhysicalDeviceFeatures} 
  alphaToOne = {VkBool32} 0
  depthBiasClamp = {VkBool32} 1
  depthBounds = {VkBool32} 0
  depthClamp = {VkBool32} 0
  drawIndirectFirstInstance = {VkBool32} 1
  dualSrcBlend = {VkBool32} 0
  fillModeNonSolid = {VkBool32} 0
  fragmentStoresAndAtomics = {VkBool32} 1
  fullDrawIndexUint32 = {VkBool32} 1
  geometryShader = {VkBool32} 1
  imageCubeArray = {VkBool32} 1
  independentBlend = {VkBool32} 1
  largePoints = {VkBool32} 0
  logicOp = {VkBool32} 0
  multiDrawIndirect = {VkBool32} 0
  multiViewport = {VkBool32} 0
  occlusionQueryPrecise = {VkBool32} 1
  pipelineStatisticsQuery = {VkBool32} 0
  robustBufferAccess = {VkBool32} 0
  samplerAnisotropy = {VkBool32} 0
  sampleRateShading = {VkBool32} 0
  shaderClipDistance = {VkBool32} 0
  shaderCullDistance = {VkBool32} 0
  shaderFloat64 = {VkBool32} 0
  shaderImageGatherExtended = {VkBool32} 0
  shaderInt16 = {VkBool32} 1
  shaderInt64 = {VkBool32} 0
  shaderResourceMinLod = {VkBool32} 0
  shaderResourceResidency = {VkBool32} 0
  shaderSampledImageArrayDynamicIndexing = {VkBool32} 1
  shaderStorageBufferArrayDynamicIndexing = {VkBool32} 1
  shaderStorageImageArrayDynamicIndexing = {VkBool32} 1
  shaderStorageImageExtendedFormats = {VkBool32} 1
  shaderStorageImageMultisample = {VkBool32} 0
  shaderStorageImageReadWithoutFormat = {VkBool32} 0
  shaderStorageImageWriteWithoutFormat = {VkBool32} 1
  shaderTessellationAndGeometryPointSize = {VkBool32} 0
  shaderUniformBufferArrayDynamicIndexing = {VkBool32} 1
  sparseBinding = {VkBool32} 0
  sparseResidency2Samples = {VkBool32} 0
  sparseResidency4Samples = {VkBool32} 0
  sparseResidencyBuffer = {VkBool32} 0
  sparseResidencyImage2D = {VkBool32} 0
  sparseResidencyImage3D = {VkBool32} 0
  tessellationShader = {VkBool32} 1
  textureCompressionASTC_LDR = {VkBool32} 0
  textureCompressionBC = {VkBool32} 0
  textureCompressionETC2 = {VkBool32} 0
  vertexPipelineStoresAndAtomics = {VkBool32} 0
  wideLines = {VkBool32} 0
 m_SupportedStagesMask = {std::__ndk1::vector<unsigned int, std::__ndk1::allocator>} size=1
  [0] = {unsigned int} 131071
 m_VkAllocator = {const VkAllocationCallbacks *const | 0x0} NULL
 m_VkDevice = {VkDevice | 0x79d1597000} 0x00000079d1597000
 std::__ndk1::enable_shared_from_this<VulkanUtilities::VulkanLogicalDevice> = {std::__ndk1::enable_shared_from_this<VulkanUtilities::VulkanLogicalDevice>} 
  __weak_this_ = {std::__ndk1::weak_ptr<VulkanUtilities::VulkanLogicalDevice>} std::__ndk1::weak_ptr<VulkanUtilities::VulkanLogicalDevice>::element_type @ 0x00000079d2476100 strong=83 weak=2
vkPipeline = {VkPipeline | 0x0} NULL
TheMostDiligent commented 3 years ago

Is there anything in the logcat?

mgood7123 commented 3 years ago

Is there anything in the logcat?

i did not see any errors in the logcat

TheMostDiligent commented 3 years ago

Did you run the Debug build?

mgood7123 commented 3 years ago

Did you run the Debug build?

I did