diff options
| author | Yong He <yonghe@outlook.com> | 2017-10-19 19:38:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-19 19:38:07 -0400 |
| commit | 7ba937faa3f72b0f319150c3dde041d8a353c007 (patch) | |
| tree | 4e4ac0f96ca2d9a7647f64e108498ea0d69c5acf /source | |
| parent | 88023aea669f258d66e53eab10215337a7f72853 (diff) | |
| parent | 5a18dc704a2f5eecebcbdd77682a40ba8316d253 (diff) | |
Merge pull request #225 from csyonghe/master
Support running compute shaders in testing framework
Diffstat (limited to 'source')
| -rw-r--r-- | source/core/text-io.h | 22 | ||||
| -rw-r--r-- | source/slang/glsl.meta.slang | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/source/core/text-io.h b/source/core/text-io.h index c914e340a..e4bdc6e2d 100644 --- a/source/core/text-io.h +++ b/source/core/text-io.h @@ -311,6 +311,28 @@ namespace Slang stream = 0; } }; + + inline List<String> Split(String text, char c) + { + List<String> result; + StringBuilder sb; + for (int i = 0; i < text.Length(); i++) + { + if (text[i] == c) + { + auto str = sb.ToString(); + if (str.Length() != 0) + result.Add(str); + sb.Clear(); + } + else + sb << text[i]; + } + auto lastStr = sb.ToString(); + if (lastStr.Length()) + result.Add(lastStr); + return result; + } } #endif diff --git a/source/slang/glsl.meta.slang b/source/slang/glsl.meta.slang index 878cea188..5cfb5e7c0 100644 --- a/source/slang/glsl.meta.slang +++ b/source/slang/glsl.meta.slang @@ -172,7 +172,7 @@ sb << "syntax patch : GLSLPatchModifier;\n"; // [GLSL 4.5] Interpolation Qualifiers sb << "syntax smooth : SimpleModifier;\n"; sb << "syntax flat : SimpleModifier;\n"; -sb << "syntax noperspectie : SimpleModifier;\n"; +sb << "syntax noperspective : SimpleModifier;\n"; // [GLSL 4.3.2] Constant Qualifier |
