baldurk / renderdoc

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

spirv-cross.exe error when editing shaders #3353

Closed Goshido closed 3 weeks ago

Goshido commented 3 weeks ago

Description

After pressing Edit Shader button I got error message:

Running "D:/Programs/RenderDoc/plugins/spirv/spirv-cross.exe" --vulkan-semantics --entry main --stage frag --output C:/Users/Goshido/AppData/Local/Temp/shader_output C:/Users/Goshido/AppData/Local/Temp/shader_input
Could not find an entry point main with stage: frag

Process exited with code 1.
Output file is 0 bytes

Here is an example of shader blob point_light.ps.zip

It was compiled with flags:

dxc.exe                                                 ^
    -HV 2021                                            ^
    -spirv                                              ^
    -fvk-use-dx-layout                                  ^
    -fspv-reduce-load-size                              ^
    -fspv-target-env=vulkan1.1                          ^
    -enable-16bit-types                                 ^
    -WX                                                 ^
    -I .\..\..\..\hlsl                                  ^
    -I .\..\..\..\cpp\include\pbr                       ^
    -O3                                                 ^
    -E PS                                               ^
    -T ps_6_8                                           ^
    -Fo .\..\..\..\assets\shaders\point_light.ps.spv    ^
    .\..\..\..\hlsl\point_light.ps

Steps to reproduce

  1. Take Vulkan application which is using DXC as Vulkan SPIR-V blob provider
  2. Make application capture
  3. Select drawcall in event viewer
  4. Go to fragment shader pipeline stage and press Edit

Problem: The shader code window is empty and error log shows message.

Expected: Shader code presents in window.

Environment