diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2022-04-28 18:22:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 18:22:15 +0300 |
commit | 6ae7ddb92a24d0433b29a7aeeb7d8adf1faaf595 (patch) | |
tree | 99917ab91c331dd111fa610c97f052061222c2f5 | |
parent | 960edcd396ad777bd01c29c38060a41f1e1952af (diff) | |
parent | 10a7631d50f81c0a466b9a602e5f79f9855df912 (diff) |
Merge pull request #1930 from KhronosGroup/fix-1928
HLSL: Add more comprehensible reserved identifier list.
-rw-r--r-- | spirv_hlsl.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/spirv_hlsl.cpp b/spirv_hlsl.cpp index 7cd6102f..d15de2f4 100644 --- a/spirv_hlsl.cpp +++ b/spirv_hlsl.cpp @@ -1302,7 +1302,33 @@ void CompilerHLSL::replace_illegal_names() { static const unordered_set<string> keywords = { // Additional HLSL specific keywords. - "line", "linear", "matrix", "point", "row_major", "sampler", "vector" + // From https://docs.microsoft.com/en-US/windows/win32/direct3dhlsl/dx-graphics-hlsl-appendix-keywords + "AppendStructuredBuffer", "asm", "asm_fragment", + "BlendState", "bool", "break", "Buffer", "ByteAddressBuffer", + "case", "cbuffer", "centroid", "class", "column_major", "compile", + "compile_fragment", "CompileShader", "const", "continue", "ComputeShader", + "ConsumeStructuredBuffer", + "default", "DepthStencilState", "DepthStencilView", "discard", "do", + "double", "DomainShader", "dword", + "else", "export", "false", "float", "for", "fxgroup", + "GeometryShader", "groupshared", "half", "HullShader", + "if", "in", "inline", "inout", "InputPatch", "int", "interface", + "line", "lineadj", "linear", "LineStream", + "matrix", "min16float", "min10float", "min16int", "min16uint", + "namespace", "nointerpolation", "noperspective", "NULL", + "out", "OutputPatch", + "packoffset", "pass", "pixelfragment", "PixelShader", "point", + "PointStream", "precise", "RasterizerState", "RenderTargetView", + "return", "register", "row_major", "RWBuffer", "RWByteAddressBuffer", + "RWStructuredBuffer", "RWTexture1D", "RWTexture1DArray", "RWTexture2D", + "RWTexture2DArray", "RWTexture3D", "sample", "sampler", "SamplerState", + "SamplerComparisonState", "shared", "snorm", "stateblock", "stateblock_state", + "static", "string", "struct", "switch", "StructuredBuffer", "tbuffer", + "technique", "technique10", "technique11", "texture", "Texture1D", + "Texture1DArray", "Texture2D", "Texture2DArray", "Texture2DMS", "Texture2DMSArray", + "Texture3D", "TextureCube", "TextureCubeArray", "true", "typedef", "triangle", + "triangleadj", "TriangleStream", "uint", "uniform", "unorm", "unsigned", + "vector", "vertexfragment", "VertexShader", "void", "volatile", "while", }; CompilerGLSL::replace_illegal_names(keywords); |