baldurk / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org
MIT License
8.92k stars 1.34k forks source link

Better error messages when compiler tools paths are outdated. #2751

Closed dorian-apanel-intel closed 2 years ago

dorian-apanel-intel commented 2 years ago

Description

I noticed that when I tried to edit shader module, opened decompiled tab is empty. Then Error tab shows such message:

Running "E:/dapanel/RenderDoc_Custom_v1.21.2_64/plugins/spirv/spirv-cross.exe" --vulkan-semantics --entry main --stage frag --output C:/Users/myuser/AppData/Local/Temp/shader_output C:/Users/myuser/AppData/Local/Temp/shader_input

Process exited with code 0.
Output file is 0 bytes

E:/dapanel/RenderDoc_Custom_v1.21.2_64 path does not exist. It used to be there, but now I'm using E:/dapanel/RenderDoc_Custom_v1.22.0_64.

Under debugger I noticed, that E:/dapanel/RenderDoc_Custom_v1.21.2_64 path is read from persistent UI config file: C:/Users/myuser/AppData/Roaming/qrenderdoc/UI.config

I don't remember if I changed those tools path manually.

It would be nice to have more descriptive message, like: Renderdoc printing "E:/dapanel/RenderDoc_Custom_v1.21.2_64/plugins/spirv/spirv-cross.exe" does not exist. Adjust Shader Processing Tools paths in Settings->Shader Viewer->Shader Processing Tools. In Errors tab.

Steps to reproduce

I was not able to reproduce it by unzipping new renderdoc, using it and renaming its folder. This time it was using VulkanSDK boundled tools.

Environment

baldurk commented 2 years ago

That commit should fix it, using a different error code from Qt's process launching to detect this case.