diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/emit.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 4cad7b28d..22dcf4333 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -2708,18 +2708,12 @@ struct EmitVisitor for(auto attr : decl->GetModifiersOfType<HLSLUncheckedAttribute>()) { - if(getText(attr->getName()) == "loop") - { - Emit("[loop]"); - } - else if(getText(attr->getName()) == "unroll") - { - Emit("[unroll]"); - } - else if(getText(attr->getName()) == "allow_uav_condition") - { - Emit("[allow_uav_condition]"); - } + // Emit whatever attributes the user might have attached, + // whether or not we think they make semantic sense. + // + Emit("["); + emit(attr->getName()); + Emit("]"); } } |
