cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

Journeyman III
Journeyman III

Crash in amdvlk64.dll with newer drivers

Hi,

I am developing a vulkan application and noticed that some shader code that used to work started crashing in vkCreateComputePipelines. Exception thrown at 0x00007FFAA445BDAF (amdvlk64.dll) 


The crash occurs when using nonuniformEXT several times in a row with the same index to read from an array of textures, and that index can't be determined at compile time.
This glsl code causes a crash for example: 

uint index = buff[0]; // some uniform buffer with some value
vec3 tex0 = textureLod(textureArrayRGBA[nonuniformEXT(index)], uv0, lod).rgb;
vec3 tex1 = textureLod(textureArrayRGBA[nonuniformEXT(index)], uv1, lod).rgb;

These examples work however:

uint index = 0;
vec3 tex0 = textureLod(textureArrayRGBA[nonuniformEXT(index)], uv0, lod).rgb; vec3 tex1 = textureLod(textureArrayRGBA[nonuniformEXT(index)], uv1, lod).rgb;
uint index = buff[0]; // some uniform buffer
if(some bool not determined at compile time) tex0 = textureLod(textureArrayRGBA[nonuniformEXT(index)], uv0, lod).rgb;
if(some other bool not determined at compile time) tex1 = textureLod(textureArrayRGBA[nonuniformEXT(index)], uv1, lod).rgb;
uint index = buff[0]; // some uniform buffer
uint index1 = (index << 1) >> 1; // works as long as you don't care about the last bit vec3 tex0 = textureLod(textureArrayRGBA[nonuniformEXT(index)], uv0, lod).rgb; vec3 tex1 = textureLod(textureArrayRGBA[nonuniformEXT(index1)], uv1, lod).rgb;


This crash occurs on rx 5700 xt and 5500 xt with both the newest recommended driver (20.11.2) and the newest optional (20.12.1). It does not occur on vega 64 with the same drivers or on older drivers.

If optimization is turned off when creating the pipeline by using the flag VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT then this crash does not occur either.

0 Kudos
Reply
7 Replies
Adept III
Adept III

Re: Crash in amdvlk64.dll with newer drivers

Hi @Vihior,

You need upload a minimal test case(with original shader source and spir-v) to reproduce issue, otherwise is difficult to solve problem

 

 

0 Kudos
Reply
Journeyman III
Journeyman III

Re: Crash in amdvlk64.dll with newer drivers

I have made a minimal visual studio project that only tries to create the pipeline but either succeeds or crashes depending on GPU. GLSL and SPIR-V files are in the shader folder.

https://drive.google.com/file/d/15WyaznAkIJcsjopBQN6eOS_ob928ZmXt/view?usp=sharing 

0 Kudos
Reply
Adept III
Adept III

Re: Crash in amdvlk64.dll with newer drivers

AMD Radeon RX 560 driver 04.12.2020

Console ouput:

Vulkan Instanciated

Vendor: AMD
GPU: Radeon RX 560 Series

Selected GPU: Radeon RX 560 Series
Trying to create pipeline
Pipeline successfully created!!

 

do you see any validation's errors from validation layers ?

0 Kudos
Reply
Journeyman III
Journeyman III

Re: Crash in amdvlk64.dll with newer drivers

Yeah we didn't experience any problems with those cards, only navi, but have not tested big navi. The trublesome cards are 5700 xt and 5500 xt with either the newest recommended driver (20.11.2) or the newest optional (20.12.1). There are no validation errors (we have tested this with vulkan sdk 1.2.162.0), just a crash when calling vkCreateComputePipelines

i. e it does not return any of the following:

  • VK_SUCCESS
  • VK_PIPELINE_COMPILE_REQUIRED_EXT
  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_INVALID_SHADER_NV

It just crashes in amdvlk64.dll. This is reproduced across several computers running windows 10. And like mentioned before, this does not happen if VkComputePipelineCreateInfo contains the VkPipelineCreateFlagBits  VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT.

 

0 Kudos
Reply
Adept III
Adept III

Re: Crash in amdvlk64.dll with newer drivers

@Vihior 

I have another idea, you test you pipeline's creation using RGA on  navi(big navi) and submit additional bug to RGA github issue

Some time ago, I created bug about crashing during pipeline's creation : https://github.com/GPUOpen-Tools/radeon_gpu_analyzer/issues/49

0 Kudos
Reply
Journeyman III
Journeyman III

Re: Crash in amdvlk64.dll with newer drivers

Alright, I tried it and every single RDNA gpu seems to fail and revert to vk-spv-offline mode which then succeeds.

All other gpus you can select work. It also works on RDNA with VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT in the pipeline state editor. 

Same issue with both the amdvlk64 provided by RGA and the one I have on my computer.

So should I just submit a bug to RGA then?

0 Kudos
Reply
Adept III
Adept III

Re: Crash in amdvlk64.dll with newer drivers

@Vihior 

> So should I just submit a bug to RGA then?

Yes, why not ? it can help to fix driver's error

 

 

0 Kudos
Reply