Jump to content
  • Advertisement
Andrey OGL_D3D

Vulkan vkCreateComputePipelines has returned VK_INCOMPLETE

Recommended Posts

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.

 

Share this post


Link to post
Share on other sites
Advertisement
Posted (edited)

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.

Edited by deadc0deh

Share this post


Link to post
Share on other sites

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.


 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!