You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Slang to create compute shaders for use in Godot. In Godot, the shader source code must include the #[compute] directive at the top of the file.
I attempted to achieve this by adding the following line to the computeMain function.
__requirePrelude(R"(#[compute])");
However, compilation to GLSL fails with the following error:
internal error 99999: unimplemented feature in Slang compiler: unexpected IR opcode during code emit
__requirePrelude(R"(#[compute])");
Question
Is it possible to support the addition of custom GLSL code (e.g., directives like #[compute]) in Slang shaders? If not, are there any alternative approaches or workarounds for embedding such directives in the generated GLSL code for compatibility with Godot?
Steps to Reproduce
Use Slang to create a compute shader.
Add __requirePrelude(R"(#[compute])"); inside the compute function.
Compile the shader to GLSL using the Slang compiler.
Expected Behavior
The #[compute] directive should be successfully added to the GLSL output for compatibility with Godot.
Actual Behavior
The compilation fails with an internal error.
The text was updated successfully, but these errors were encountered:
Description
I am using Slang to create compute shaders for use in Godot. In Godot, the shader source code must include the
#[compute]
directive at the top of the file.I attempted to achieve this by adding the following line to the computeMain function.
However, compilation to GLSL fails with the following error:
Question
Is it possible to support the addition of custom GLSL code (e.g., directives like
#[compute]
) in Slang shaders? If not, are there any alternative approaches or workarounds for embedding such directives in the generated GLSL code for compatibility with Godot?Steps to Reproduce
__requirePrelude(R"(#[compute])");
inside the compute function.Expected Behavior
The
#[compute]
directive should be successfully added to the GLSL output for compatibility with Godot.Actual Behavior
The compilation fails with an internal error.
The text was updated successfully, but these errors were encountered: