turanszkij / WickedEngine

3D engine with modern graphics
https://wickedengine.net
Other
5.86k stars 617 forks source link

dxcompiler May 2024 breaks Linux version on Intel Xe and Radeon #856

Closed brakhane closed 6 months ago

brakhane commented 6 months ago

The current master causes a crash during start due to a failed assertion (Intel Xe iGPU):

[... unimportant assert_fail stack frames omitted ...]
#6  0x000055c497f12a74 in wi::graphics::GraphicsDevice_Vulkan::CreateShader (this=0x55c49a2842d0,               
    stage=wi::graphics::ShaderStage::CS, shadercode=0x7fc854550480, shadercode_size=43268,                      
    shader=0x55c4990773c0 <wi::renderer::shaders+3936>)                                                         
    at /home/dennis/src/WickedEngine/WickedEngine/wiGraphicsDevice_Vulkan.cpp:4936                              
#7  0x000055c49808d455 in wi::renderer::LoadShader (stage=wi::graphics::ShaderStage::CS, shader=...,            
    filename="lightCullingCS_ADVANCED.cso", minshadermodel=wi::graphics::ShaderModel::SM_6_0,                   
    permutation_defines=std::vector of length 0, capacity 0)                                                    
    at /home/dennis/src/WickedEngine/WickedEngine/wiRenderer.cpp:740                                            
#8  0x000055c498092a51 in operator() (__closure=0x7fc896fff8e0, args=...)
    at /home/dennis/src/WickedEngine/WickedEngine/wiRenderer.cpp:925

CreateShader returns VK_ERROR_UNKNOWN (An unknown error has occurred; either the application has provided invalid input, or an implementation failure has occurred.).

Using git bisect I managed to find the offending commit to be ced5b7ae8efb454c6ae7cb379ed19af24699583f, which updates dxcompiler to the May 2024 version.

Given the Vulkan error code, it could be a bug in the Intel driver, but since there have been other reports in the Discord about the recent Linux builds crashing on CreateShader on Radeon, there might be more to it.

brakhane commented 6 months ago

Update: the Radeon user just confirmed that reverting that commit (and the following "fix linux" commit) also fixes it for them.

turanszkij commented 6 months ago

Reverted to previous shader compiler release for linux

brakhane commented 6 months ago

That seems to have fixed it. There's another segfault happening right after shader compilation, but that seems to be unrelated, I'll open a new bugreport for that once I have more information