Intel® ARC™ Graphics
Get answers to your questions or issues when gaming on the world’s best discrete video cards with the latest news surrounding Intel® ARC™ Graphics
1711 Discussions

Intel driver crashing on simple float16_t (half) usage.

Alecazam
Beginner
2,632 Views

We use half on mobile devices, and on other desktop gpus.  Intel Vulkan drivers post full support for half/fp16/float16_t usage.

 

When we run our shaders on the latest Intel driver, the code crashes.  If we replace float16_t/f16vec2/3/4 with float and vec2/3/4, then the crashes do not occur.  But that's obviously not performant.

 

The code that kills the driver is little more that a mediump vec3 *= float16_t.   I'm running the Vulkan 1.3 driver, but our shaders are only compiled for 1.2.  We are also running glslc from 1.5 years back.   This kind of construct shouldn't cause a driver crash. 

 

It happens when we call vkCreateGraphicsPipelines, but the shader load produces no errors.    We get the following message:

Unhandled exception at 0x00007FFF1AE38BD8 (igc64.dll) in App.exe: An invalid parameter was passed to a function that considers invalid parameters fatal.

 

This is running on a Gen12 Alderlake gpu with Intel UHD Graphics 770.  

 

Here's a permalink with the spriv source.

https://shader-playground.timjones.io/d8ffbb592f4bf8087c52040f20b9267f

 

```

#version 460
 
// allow half math in the shader
#extension GL_EXT_shader_explicit_arithmetic_types : require
 
// store half in input/output (not on Adreno/Nvidia)
// and push constants (not on AMD) 
// also Uniforms and SSBO
#extension GL_EXT_shader_16bit_storage : require
 
precision highp int;
precision highp float;
 
layout (location = 0) out vec4 fragColor;
 
struct LightingInfo
{
    mediump vec3 ambDir;
};
 
struct ShInfo
{
    float16_t ao;
};
 
void main()
{
    // This breaks driver
LightingInfo light;
light.ambDir = vec3(0.0);
 
ShInfo normTap;
 
// this crashes, storing half in a struct then multiply mvec3 by it
normTap.ao = float16_t(2.0);
light.ambDir *= normTap.ao;
 
// This works
//light.ambDir *= half(2.0);
 
// this works
// mfloat scalar = 2.0;
// light.ambDir *= scalar;
 
fragColor = vec4(light.ambDir, 1.0);
}
```
0 Kudos
5 Replies
Carlos_L_Intel
Employee
2,560 Views

Hi @Alecazam,


Thank you for posting on the Intel® communities. I'm sorry for the inconvenience this might have caused you. Please help me with the following information in order to assist you:


  • Does this only happen on our latest driver? 
  • To get more information from your system, please install the Intel® System Support Utility (Intel® SSU): https://downloadcenter.intel.com/download/25293/Intel-System-Support-Utility-for-Windows- Open the application and select "Everything" click on "Scan" to see the system and device information. By default, Intel® SSU will take you to the "Summary View". Click on the menu where it says "Summary" to change to "Detailed View". Click on "Next", save the report and attach it to your response.


Best regards, 


Carlos L.  

Intel Customer Support Technician.


0 Kudos
Alecazam
Beginner
2,542 Views

This is on latest Vulkan 1.3 driver.  I only have an Alderlake w/integrated UHD Graphics 770.  But I do have a discrete Arc A750 that I can try.  It would be the same driver, so I suspect the same issue.

 

Note this is a reduced case of several shaders that were failing.  So this may not be the only usage that crashes.  But I hope this repros on your side.   I did compare Spriv output from our old tools vs. shader playground, and the code is fairly similar.  It's just promoting the fp16 to fp32, and them multiplying that against the fp32 vec3.   That shouldn't cause a driver exception.

0 Kudos
PeteBrubaker
Employee
2,530 Views

Hey Carlos,

 

I'm a DevTech engineer on the Game Team and I'm already working with the driver and compiler team to get this sorted out!

 

Cheers,

 

Pete

0 Kudos
Carlos_L_Intel
Employee
2,472 Views

Hi @PeteBrubaker, @Alecazam,


 Thank you for your posts. Since Pete is already working to resolve this with his team we are going to proceed to close this thread. I appreciate your help. 



Best regards, 


Carlos L.  

Intel Customer Support Technician.


0 Kudos
Alecazam
Beginner
1,988 Views

I'm testing the fp16 support in Intel 31.0.101.5084, 12/21/23 release, and the driver is still broken for fp16 shaders.

 

These are the exceptions the driver throws when we feed it a small amount of fp16 shader data for our Avatar code.  So we pass a nullptr pipeline, and get back nullptr, but with VK_SUCCESS.  So I've added an assert for that.  This shouldn't be returning success if the pipeline failed to build internally.

 

```

VkResult err = vkCreateGraphicsPipelines( m_device.device, m_device.cache, 1, &info, nullptr, &pipeline );

GFX_ASSERT_MSG( err == VK_SUCCESS, "Failed building shader pipeline %s: %s", shader.name, VulkanErrorString( err ) );

GFX_ASSERT_MSG( pipeline, "Intel driver probably returned success and nullptr pipeline for shaders using fp16 for shader %s", shader.name );

Intel 31.0.101.5084, 12/21/23 release

Exception thrown at 0x00007FFE6513CF19 in Sky.exe: Microsoft C++ exception: VK::Exception at memory location 0x0000009A907F8350.

Exception thrown at 0x00007FFE6513CF19 in Sky.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

Exception thrown at 0x00007FFE6513CF19 in Sky.exe: Microsoft C++ exception: VK::Exception at memory location 0x0000009A907F8350.

Exception thrown at 0x00007FFE6513CF19 in Sky.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

Exception thrown at 0x00007FFE6513CF19 in Sky.exe: Microsoft C++ exception: VK::Exception at memory location 0x0000009A907F8350.

Exception thrown at 0x00007FFE6513CF19 in Sky.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.

Exception thrown at 0x00007FFE6513CF19 in Sky.exe: Microsoft C++ exception: VK::Exception at memory location 0x0000009A907F8350.

```

0 Kudos
Reply