This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

mali offline compiler cannot find entry point for vulkan fragment shader

The fragment shader only has one function:

And I have tried to use the mali offline compier by following commands:

-n <NAME>, --name <NAME>
Name the program entrypoint.

The malioc.exe tells me to use -n or --name, I have tried both, all without luck.

Can someone kindly points out what's going wrong? Thanks!

Parents
  • I'm not sure what I actually compiled last night, but I can confirm it doesn't work =)

    We use glslangValidator for our GLSL to SPIR-V compilation, which strictly adheres to the Khronos specifications. For GLSL the entry point must be "void main()" - alternative names are out-of-spec. The shader in this case is trying to use "void main_00000000_00000000()" as the entry point which is incorrect and not accepted by glslangValidator, but accepted by some other front-ends such as DXC.

    For this particular case, you can work around this issue with the preprocessor. However, this can be a little fragile in the general case as any instance of the string will get replaced, not just the entry point name.

        malioc --vulkan -D main_00000000_00000000=main vulkan.frag

    We will implement this workaround for Vulkan source compiles that set --name for a future offline compiler release.

Reply
  • I'm not sure what I actually compiled last night, but I can confirm it doesn't work =)

    We use glslangValidator for our GLSL to SPIR-V compilation, which strictly adheres to the Khronos specifications. For GLSL the entry point must be "void main()" - alternative names are out-of-spec. The shader in this case is trying to use "void main_00000000_00000000()" as the entry point which is incorrect and not accepted by glslangValidator, but accepted by some other front-ends such as DXC.

    For this particular case, you can work around this issue with the preprocessor. However, this can be a little fragile in the general case as any instance of the string will get replaced, not just the entry point name.

        malioc --vulkan -D main_00000000_00000000=main vulkan.frag

    We will implement this workaround for Vulkan source compiles that set --name for a future offline compiler release.

Children