google / google/shaderc

Compiling without linking (and linking afterwards)

Open
#315 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
445
Avg merge
11h 6m
Merged PRs (30d)
6

Description

Hello,

I'm trying to use glslc to check each of my files for errors before joining them in a single file and compiling them all together. However, the `-c` flag doesn't seem to work as expected. The manual specifies that the `-c` flag only does preprocessing and compiling, and not linking. However, if I try to compile the following code with the `-std=450 -fshader-stage=compute -c` flags:

```
int sum(int a, int b) {
return a + b;
}
```

I get the following error:

```
sum.glsl: error: Linking compute stage: Missing entry point: Each stage requires one entry point
```

This clearly means that `glslc` is trying to link the source into a binary. How can I only preprocess and compile the GLSL shader, and not link it into a final binary?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.