Forums - vkCreateComputePipelines has returned VK_INCOMPLETE

3 posts / 0 new
Last post
vkCreateComputePipelines has returned VK_INCOMPLETE
AndreyVK_D3D
Profile picture
Join Date: 10 Jun 13
Location: Moscow
Posts: 36
Posted: Sat, 2019-05-25 07:39

Hi All, I have problem on Adreno 506.

vkCreateComputePipelines has returned VK_INCOMPLETE. I have no error message from Vulkan debug layers,
but i see an error message from Adreno Driver(Android Studio/logcat):
31569-31637/com.qualcomm.vulkan.compute.d I/Adreno: Shader compilation failed for shaderType: 5

Sample code:

void VkSample::Test(VkDevice mDevice)
{
	const VkDescriptorSetLayoutBinding vkDescriptorSetLayoutBinding[4] = {
			{0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, NULL },
			{1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, NULL },
			{2, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, NULL },
			{3, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, NULL },
	};

	VkDescriptorSetLayoutCreateInfo vkDescriptorSetLayoutCreateInfo = {};
	vkDescriptorSetLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
	vkDescriptorSetLayoutCreateInfo.bindingCount = 4;
	vkDescriptorSetLayoutCreateInfo.pBindings = vkDescriptorSetLayoutBinding;

	VkDescriptorSetLayout vkDescriptorSetLayout = VK_NULL_HANDLE;
	VkResult res =  vkCreateDescriptorSetLayout(mDevice, &vkDescriptorSetLayoutCreateInfo, NULL, &vkDescriptorSetLayout);

	VkPipelineLayout vkPipelineLayout = VK_NULL_HANDLE;

	VkPipelineLayoutCreateInfo vkPipelineLayoutCreateInfo = {};

	vkPipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
	vkPipelineLayoutCreateInfo.setLayoutCount = 1;
	vkPipelineLayoutCreateInfo.pSetLayouts = &vkDescriptorSetLayout;

	res =  vkCreatePipelineLayout(mDevice, &vkPipelineLayoutCreateInfo, NULL, &vkPipelineLayout);

	VkComputePipelineCreateInfo vkComputePipelineCreateInfo = {};

	VkPipelineShaderStageCreateInfo& vkPipelineShaderStageCreateInfo = vkComputePipelineCreateInfo.stage;
	vkPipelineShaderStageCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
	vkPipelineShaderStageCreateInfo.flags = 0;
	vkPipelineShaderStageCreateInfo.pNext = NULL;
	vkPipelineShaderStageCreateInfo.stage = VK_SHADER_STAGE_COMPUTE_BIT;
	vkPipelineShaderStageCreateInfo.module = CreateShaderModuleFromAsset("shaders/spirv.spv");
	vkPipelineShaderStageCreateInfo.pName = "CullObjects";
	vkPipelineShaderStageCreateInfo.pSpecializationInfo = NULL;

	vkComputePipelineCreateInfo.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO;
	vkComputePipelineCreateInfo.layout = vkPipelineLayout;
	VkPipeline vkComputePipeline = VK_NULL_HANDLE;

	res =  vkCreateComputePipelines(mDevice, NULL, 1, &vkComputePipelineCreateInfo, NULL, &vkComputePipeline);
}

Original Shader was compiled using glslang tool(https://github.com/KhronosGroup/glslang)

Simple project(Android Studio) are based on Vulkan-Compute sample from Adreno Vulkan SDK:

 DropboxvkCreateComputePipelines_VK_INCOMPLETE.7z

Shared with Dropbox

 

See Sample.cpp, line 634, method void VkSample::Test. I added original shader CSShaderGPUInstanceCulling.hlsl, Spir-v shader spirv.spv, and logcat.log to archive.

I have no problem on Mali G71, G76, AMD(Windows/Linux), nVidia(Windows), Intel(Windows)

What do you think about it ?

  • Up0
  • Down0
AndreyVK_D3D
Profile picture
Join Date: 10 Jun 13
Location: Moscow
Posts: 36
Posted: Thu, 2019-06-06 22:47
I fixed compute shader issue for Adreno 506. I should use the same compilation options that is used in glslangvalidator.exe. I should fix code used for shader compilation with glslang tool. Anyway Adreno has a bug inside driver.
  • Up0
  • Down0
AndreyVK_D3D
Profile picture
Join Date: 10 Jun 13
Location: Moscow
Posts: 36
Posted: Wed, 2020-05-13 23:13

I have updated smartphone with Android 9 for Adreno 506 GPU, but I have the same problem.

does Adreno Vulkan Drivers require optimized version for SPIR-V ? Why  ?

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.