Advertisement

vkCreateComputePipelines has returned VK_INCOMPLETE

Started by June 06, 2019 07:17 AM
2 comments, last by AndreyVK_D3D 5 years, 8 months ago

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:


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:

Test Project are based on VulkanCompute from Adreno Vulkan SDK.

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 ?

 

Thank you for advance.

 

3DGraphics,Direct3D12,Vulkan,OpenCL,Algorithms

It seems the compute shader is just not a valid compute shader, so when you attach it it is not valid and hence pipeline creation fails with incomplete because there is no compute shader (the handle will be invalid VK_NULL_HANDLE.)

Is your compute shader perhaps using a feature/profile that isn't supported by the Adreno 506, but IS supported by the G71/G76? You can try running it through the validator tool.

Advertisement

hi @deadc0deh

5 hours ago, deadc0deh said:

It seems the compute shader is just not a valid compute shader, so when you attach it it is not valid and hence pipeline creation fails with incomplete because there is no compute shader (the handle will be invalid VK_NULL_HANDLE.)

I have no error for vkCreateShaderModule, VkShaderModule is not VK_NULL_HANDLE.

5 hours ago, deadc0deh said:

You can try running it through the validator tool.

Yes, i have no error afrer running spirv-val.exe spirv.spv

i have run glslangValidator.exe CSShaderGPUInstanceCulling.comp.hlsl -V -D -e CullObjects

I have another spirv file, the size smaller than result using C++ compilation with glslang library. Now, I have no error after 

vkCreateComputePipelines. I will fix 3DEngine code for shader compilation using glslang, i think i should add some compilation options.

So, anyway i think adreno driver has some shader problem  inside driver side. Thank you for suggestion.



 

3DGraphics,Direct3D12,Vulkan,OpenCL,Algorithms

This topic is closed to new replies.

Advertisement