diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-07 13:27:00 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-07 13:27:00 -0700 |
| commit | f70699c78235c33f909ffff87f8edf4b58b30c51 (patch) | |
| tree | 1ab9e7ac3ec8b45b84a166faa5d9a6dc8f9ea9f5 /source/slang/emit.cpp | |
| parent | 20ac581f09a9451f7c84cb0a1ae8764f5e9349be (diff) | |
Don't emit `[unroll]` or `[loop]` to GLSL
- I really ought to make these semantically understood attributes, which might make this logic easier
- Long-term if we start emitting SPIR-V directly, we should translte these, of course
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 6a10c4f03..5d85b4d57 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -1837,6 +1837,10 @@ struct EmitVisitor void EmitLoopAttributes(RefPtr<StatementSyntaxNode> decl) { + // Don't emit these attributes for GLSL, because it doesn't understand them + if (context->shared->target == CodeGenTarget::GLSL) + return; + // TODO(tfoley): There really ought to be a semantic checking step for attributes, // that turns abstract syntax into a concrete hierarchy of attribute types (e.g., // a specific `LoopModifier` or `UnrollModifier`). |
