diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-03-30 16:53:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-30 16:53:07 -0700 |
| commit | bd66d4f90086eeff339f076f8cedfbf78e1989b6 (patch) | |
| tree | 4fe943e2bc47015ea39444fb025e7b2f533dcac8 /source/slang/hlsl.meta.slang.h | |
| parent | 87c50cf1644454cdc9e7f6d1262bee29bfc86e80 (diff) | |
Fix several issues discovered by Falcor (#467)
Fixes #466
Most of these are Vulkan-related regressions.
* Kludge the definition of `GroupMemoryBarrierWithGroupSync()` for GLSL so that it works around parentheses that the emit logic now introduces.
* Don't emit `static` for global constants when targetting GLSL
* Emit the `flat` modifier for varying input/output with integer type, when targetting GLSL
* Avoid checking parameter default-value expressions more than once, because this can crash when the checking introduces syntax that is not expected to appear in the input AST
Diffstat (limited to 'source/slang/hlsl.meta.slang.h')
| -rw-r--r-- | source/slang/hlsl.meta.slang.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang/hlsl.meta.slang.h b/source/slang/hlsl.meta.slang.h index 134a3172f..4d241041b 100644 --- a/source/slang/hlsl.meta.slang.h +++ b/source/slang/hlsl.meta.slang.h @@ -589,7 +589,12 @@ SLANG_RAW("// Group memory barrier\n") SLANG_RAW("__target_intrinsic(glsl, \"groupMemoryBarrier\")\n") SLANG_RAW("void GroupMemoryBarrier();\n") SLANG_RAW("\n") -SLANG_RAW("__target_intrinsic(glsl, \"groupMemoryBarrier(); barrier()\")\n") +SLANG_RAW("// Note: the unmatched parentheses in the GLSL lowering are\n") +SLANG_RAW("// to cancel out the parens that the emit logic uses, so that\n") +SLANG_RAW("// we can emit this as if it were an expression.\n") +SLANG_RAW("//\n") +SLANG_RAW("// TODO: investigate whether we can just use \"operator comma\" here.\n") +SLANG_RAW("__target_intrinsic(glsl, \"groupMemoryBarrier()); (barrier()\")\n") SLANG_RAW("void GroupMemoryBarrierWithGroupSync();\n") SLANG_RAW("\n") SLANG_RAW("// Atomics\n") |
