From a00dc69ca8dfbc346940c7d03d67c1cb229577fb Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 3 Feb 2023 12:18:49 +0800 Subject: Use SPIR-V opcode names rather than numbers (#2571) * s/emititng blobal/emitting global * Use SPIR-V opcode names rather than numbers * regenerate Visual Studio project files * Use names for extended SPIR-V GLSL instructions * Add missing operand for SPIR-V extended instruction * Add warning aginst modifying generated hashing files * Squash warnings on MSVC --- build/visual-studio/core/core.vcxproj | 782 +++++++++---------- build/visual-studio/core/core.vcxproj.filters | 764 +++++++++---------- .../cpu-com-example/cpu-com-example.vcxproj | 602 +++++++-------- .../cpu-com-example.vcxproj.filters | 34 +- .../generate-lookup-tables.vcxproj | 181 +++++ .../run-generators/run-generators.vcxproj | 131 +--- .../slang-lookup-generator.vcxproj | 287 +++++++ .../slang-lookup-generator.vcxproj.filters | 13 + build/visual-studio/slang-rt/slang-rt.vcxproj | 826 ++++++++++----------- .../slang-rt/slang-rt.vcxproj.filters | 776 +++++++++---------- build/visual-studio/slang/slang.vcxproj | 3 + build/visual-studio/slang/slang.vcxproj.filters | 9 + build/visual-studio/slangd/slangd.vcxproj | 578 +++++++------- build/visual-studio/slangd/slangd.vcxproj.filters | 24 +- .../test-process/test-process.vcxproj | 572 +++++++------- .../test-process/test-process.vcxproj.filters | 24 +- .../visual-studio/test-server/test-server.vcxproj | 588 +++++++-------- .../test-server/test-server.vcxproj.filters | 52 +- premake5.lua | 76 +- slang.sln | 34 + source/slang/hlsl.meta.slang | 240 +++--- source/slang/slang-emit-spirv.cpp | 7 +- source/slang/slang-ir-spirv-snippet.cpp | 75 +- source/slang/slang-lookup-glslstd450.cpp | 137 ++++ source/slang/slang-lookup-spirv.h | 10 + source/slang/slang-lookup-spvop.cpp | 762 +++++++++++++++++++ .../lookup-generator-main.cpp | 374 ++++++++++ 27 files changed, 4885 insertions(+), 3076 deletions(-) create mode 100644 build/visual-studio/generate-lookup-tables/generate-lookup-tables.vcxproj create mode 100644 build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj create mode 100644 build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj.filters create mode 100644 source/slang/slang-lookup-glslstd450.cpp create mode 100644 source/slang/slang-lookup-spirv.h create mode 100644 source/slang/slang-lookup-spvop.cpp create mode 100644 tools/slang-lookup-generator/lookup-generator-main.cpp diff --git a/build/visual-studio/core/core.vcxproj b/build/visual-studio/core/core.vcxproj index ecd6b54fe..32a416e80 100644 --- a/build/visual-studio/core/core.vcxproj +++ b/build/visual-studio/core/core.vcxproj @@ -1,392 +1,392 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Debug - ARM64 - - - Debug aarch64 - Win32 - - - Debug aarch64 - x64 - - - Debug aarch64 - ARM64 - - - Release - Win32 - - - Release - x64 - - - Release - ARM64 - - - Release aarch64 - Win32 - - - Release aarch64 - x64 - - - Release aarch64 - ARM64 - - - - {F9BE7957-8399-899E-0C49-E714FDDD4B65} - true - Win32Proj - core - - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - - - StaticLibrary - true - Unicode - v142 - true - - - StaticLibrary - false - Unicode - v142 - - - StaticLibrary - false - Unicode - v142 - - - StaticLibrary - false - Unicode - v142 - true - - - - - - - - - - - - - - - - - - - - - - - - - ..\..\..\bin\windows-x86\debug\ - ..\..\..\intermediate\windows-x86\debug\core\ - core - .lib - - - ..\..\..\bin\windows-x64\debug\ - ..\..\..\intermediate\windows-x64\debug\core\ - core - .lib - - - ..\..\..\bin\windows-aarch64\debug\ - ..\..\..\intermediate\windows-aarch64\debug\core\ - core - .lib - - - ..\..\..\bin\windows-x86\release\ - ..\..\..\intermediate\windows-x86\release\core\ - core - .lib - - - ..\..\..\bin\windows-x64\release\ - ..\..\..\intermediate\windows-x64\release\core\ - core - .lib - - - ..\..\..\bin\windows-aarch64\release\ - ..\..\..\intermediate\windows-aarch64\release\core\ - core - .lib - - - - NotUsing - Level4 - _DEBUG;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - Level4 - _DEBUG;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - Level4 - _DEBUG;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - - - NotUsing - Level4 - NDEBUG;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - - - - - NotUsing - Level4 - NDEBUG;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - - - - - NotUsing - Level4 - NDEBUG;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {F9BE7957-8399-899E-0C49-E714FDDD4B65} + true + Win32Proj + core + + + + StaticLibrary + true + Unicode + v142 + + + StaticLibrary + true + Unicode + v142 + + + StaticLibrary + true + Unicode + v142 + true + + + StaticLibrary + false + Unicode + v142 + + + StaticLibrary + false + Unicode + v142 + + + StaticLibrary + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\core\ + core + .lib + + + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\core\ + core + .lib + + + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\core\ + core + .lib + + + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\core\ + core + .lib + + + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\core\ + core + .lib + + + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\core\ + core + .lib + + + + NotUsing + Level4 + _DEBUG;%(PreprocessorDefinitions) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Windows + true + + + + + NotUsing + Level4 + _DEBUG;%(PreprocessorDefinitions) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Windows + true + + + + + NotUsing + Level4 + _DEBUG;%(PreprocessorDefinitions) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Windows + true + + + + + NotUsing + Level4 + NDEBUG;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + true + + + Windows + true + true + + + + + NotUsing + Level4 + NDEBUG;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + true + + + Windows + true + true + + + + + NotUsing + Level4 + NDEBUG;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + true + + + Windows + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/visual-studio/core/core.vcxproj.filters b/build/visual-studio/core/core.vcxproj.filters index 144c5259f..5e0df7483 100644 --- a/build/visual-studio/core/core.vcxproj.filters +++ b/build/visual-studio/core/core.vcxproj.filters @@ -1,383 +1,383 @@ - - - - - {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - + + + + + {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + \ No newline at end of file diff --git a/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj index 5f2f7ac73..56ca77d6d 100644 --- a/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj +++ b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj @@ -1,302 +1,302 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Debug - ARM64 - - - Debug aarch64 - Win32 - - - Debug aarch64 - x64 - - - Debug aarch64 - ARM64 - - - Release - Win32 - - - Release - x64 - - - Release - ARM64 - - - Release aarch64 - Win32 - - - Release aarch64 - x64 - - - Release aarch64 - ARM64 - - - - {0996B38F-F512-A7D2-1E90-A7E60A6C4366} - true - Win32Proj - cpu-com-example - - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - true - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - true - - - - - - - - - - - - - - - - - - - - - - - - - true - ..\..\..\bin\windows-x86\debug\ - ..\..\..\intermediate\windows-x86\debug\cpu-com-example\ - cpu-com-example - .exe - - - true - ..\..\..\bin\windows-x64\debug\ - ..\..\..\intermediate\windows-x64\debug\cpu-com-example\ - cpu-com-example - .exe - - - true - ..\..\..\bin\windows-aarch64\debug\ - ..\..\..\intermediate\windows-aarch64\debug\cpu-com-example\ - cpu-com-example - .exe - - - false - ..\..\..\bin\windows-x86\release\ - ..\..\..\intermediate\windows-x86\release\cpu-com-example\ - cpu-com-example - .exe - - - false - ..\..\..\bin\windows-x64\release\ - ..\..\..\intermediate\windows-x64\release\cpu-com-example\ - cpu-com-example - .exe - - - false - ..\..\..\bin\windows-aarch64\release\ - ..\..\..\intermediate\windows-aarch64\release\cpu-com-example\ - cpu-com-example - .exe - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - - - - - - - {37BED5B5-23FA-D81F-8C0C-F1167867813A} - - - {DB00DA62-0533-4AFD-B59F-A67D5B3A0808} - - - {222F7498-B40C-4F3F-A704-DDEB91A4484A} - - - {F5ADB74E-02A7-44FB-AA3B-FC02F8AC7A4B} - - - {3565FE5E-4FA3-11EB-AE93-0242AC130002} - - - {F9BE7957-8399-899E-0C49-E714FDDD4B65} - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {0996B38F-F512-A7D2-1E90-A7E60A6C4366} + true + Win32Proj + cpu-com-example + + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + true + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\cpu-com-example\ + cpu-com-example + .exe + + + true + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\cpu-com-example\ + cpu-com-example + .exe + + + true + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\cpu-com-example\ + cpu-com-example + .exe + + + false + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\cpu-com-example\ + cpu-com-example + .exe + + + false + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\cpu-com-example\ + cpu-com-example + .exe + + + false + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\cpu-com-example\ + cpu-com-example + .exe + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + + + + + + + {37BED5B5-23FA-D81F-8C0C-F1167867813A} + + + {DB00DA62-0533-4AFD-B59F-A67D5B3A0808} + + + {222F7498-B40C-4F3F-A704-DDEB91A4484A} + + + {F5ADB74E-02A7-44FB-AA3B-FC02F8AC7A4B} + + + {3565FE5E-4FA3-11EB-AE93-0242AC130002} + + + {F9BE7957-8399-899E-0C49-E714FDDD4B65} + + + + + \ No newline at end of file diff --git a/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters index ad9cb293f..a2d531032 100644 --- a/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters +++ b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters @@ -1,18 +1,18 @@ - - - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - - - Source Files - - - - - Source Files - - + + + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Source Files + + + + + Source Files + + \ No newline at end of file diff --git a/build/visual-studio/generate-lookup-tables/generate-lookup-tables.vcxproj b/build/visual-studio/generate-lookup-tables/generate-lookup-tables.vcxproj new file mode 100644 index 000000000..3d27b3cb2 --- /dev/null +++ b/build/visual-studio/generate-lookup-tables/generate-lookup-tables.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {5FFA0764-4BF4-30B6-3461-C7C620FA9622} + true + Win32Proj + generate-lookup-tables + + + + Utility + v142 + + + Utility + v142 + + + Utility + v142 + + + Utility + v142 + + + Utility + v142 + + + Utility + v142 + + + + + + + + + + + + + + + + + + + + + + + + + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\generate-lookup-tables\ + + + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\generate-lookup-tables\ + + + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\generate-lookup-tables\ + + + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\generate-lookup-tables\ + + + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\generate-lookup-tables\ + + + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\generate-lookup-tables\ + + + + + + + + + + + + + + + + Document + "../../../bin/windows-x86/debug/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-glslstd450.cpp GLSLstd450 GLSLstd450 spirv/unified1/GLSL.std.450.h + "../../../bin/windows-x64/debug/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-glslstd450.cpp GLSLstd450 GLSLstd450 spirv/unified1/GLSL.std.450.h + "../../../bin/windows-aarch64/debug/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-glslstd450.cpp GLSLstd450 GLSLstd450 spirv/unified1/GLSL.std.450.h + "../../../bin/windows-x86/release/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-glslstd450.cpp GLSLstd450 GLSLstd450 spirv/unified1/GLSL.std.450.h + "../../../bin/windows-x64/release/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-glslstd450.cpp GLSLstd450 GLSLstd450 spirv/unified1/GLSL.std.450.h + "../../../bin/windows-aarch64/release/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-glslstd450.cpp GLSLstd450 GLSLstd450 spirv/unified1/GLSL.std.450.h + ../../../source/slang/slang-lookup-glslstd450.cpp + slang-lookup-generator for slang-lookup-glslstd450.cpp + ../../../external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json;../../../bin/windows-x86/debug/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json;../../../bin/windows-x64/debug/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json;../../../bin/windows-aarch64/debug/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json;../../../bin/windows-x86/release/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json;../../../bin/windows-x64/release/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json;../../../bin/windows-aarch64/release/slang-lookup-generator.exe + + + Document + "../../../bin/windows-x86/debug/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-spvop.cpp SpvOp Spv spirv/unified1/spirv.h + "../../../bin/windows-x64/debug/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-spvop.cpp SpvOp Spv spirv/unified1/spirv.h + "../../../bin/windows-aarch64/debug/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-spvop.cpp SpvOp Spv spirv/unified1/spirv.h + "../../../bin/windows-x86/release/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-spvop.cpp SpvOp Spv spirv/unified1/spirv.h + "../../../bin/windows-x64/release/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-spvop.cpp SpvOp Spv spirv/unified1/spirv.h + "../../../bin/windows-aarch64/release/slang-lookup-generator" %(FullPath) $(SolutionDir)/source/slang/slang-lookup-spvop.cpp SpvOp Spv spirv/unified1/spirv.h + ../../../source/slang/slang-lookup-spvop.cpp + slang-lookup-generator for slang-lookup-spvop.cpp + ../../../external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json;../../../bin/windows-x86/debug/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json;../../../bin/windows-x64/debug/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json;../../../bin/windows-aarch64/debug/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json;../../../bin/windows-x86/release/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json;../../../bin/windows-x64/release/slang-lookup-generator.exe + ../../../external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json;../../../bin/windows-aarch64/release/slang-lookup-generator.exe + + + + + + \ No newline at end of file diff --git a/build/visual-studio/run-generators/run-generators.vcxproj b/build/visual-studio/run-generators/run-generators.vcxproj index 8f5fae750..045601edf 100644 --- a/build/visual-studio/run-generators/run-generators.vcxproj +++ b/build/visual-studio/run-generators/run-generators.vcxproj @@ -58,42 +58,28 @@ - StaticLibrary - true - Unicode + Utility v142 - StaticLibrary - true - Unicode + Utility v142 - StaticLibrary - true - Unicode + Utility v142 - true - StaticLibrary - false - Unicode + Utility v142 - StaticLibrary - false - Unicode + Utility v142 - StaticLibrary - false - Unicode + Utility v142 - true @@ -120,143 +106,38 @@ ..\..\..\bin\windows-x86\debug\ ..\..\..\intermediate\windows-x86\debug\run-generators\ - run-generators - .lib ..\..\..\bin\windows-x64\debug\ ..\..\..\intermediate\windows-x64\debug\run-generators\ - run-generators - .lib ..\..\..\bin\windows-aarch64\debug\ ..\..\..\intermediate\windows-aarch64\debug\run-generators\ - run-generators - .lib ..\..\..\bin\windows-x86\release\ ..\..\..\intermediate\windows-x86\release\run-generators\ - run-generators - .lib ..\..\..\bin\windows-x64\release\ ..\..\..\intermediate\windows-x64\release\run-generators\ - run-generators - .lib ..\..\..\bin\windows-aarch64\release\ ..\..\..\intermediate\windows-aarch64\release\run-generators\ - run-generators - .lib - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - diff --git a/build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj b/build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj new file mode 100644 index 000000000..dc5e68656 --- /dev/null +++ b/build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj @@ -0,0 +1,287 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D} + true + Win32Proj + slang-lookup-generator + + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + true + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\slang-lookup-generator\ + slang-lookup-generator + .exe + + + true + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\slang-lookup-generator\ + slang-lookup-generator + .exe + + + true + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\slang-lookup-generator\ + slang-lookup-generator + .exe + + + false + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\slang-lookup-generator\ + slang-lookup-generator + .exe + + + false + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\slang-lookup-generator\ + slang-lookup-generator + .exe + + + false + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\slang-lookup-generator\ + slang-lookup-generator + .exe + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + + + + {12C1E89D-F5D0-41D3-8E8D-FB3F358F8126} + + + {F9BE7957-8399-899E-0C49-E714FDDD4B65} + + + + + + \ No newline at end of file diff --git a/build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj.filters b/build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj.filters new file mode 100644 index 000000000..f54968534 --- /dev/null +++ b/build/visual-studio/slang-lookup-generator/slang-lookup-generator.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Source Files + + + \ No newline at end of file diff --git a/build/visual-studio/slang-rt/slang-rt.vcxproj b/build/visual-studio/slang-rt/slang-rt.vcxproj index 92191667c..380637f34 100644 --- a/build/visual-studio/slang-rt/slang-rt.vcxproj +++ b/build/visual-studio/slang-rt/slang-rt.vcxproj @@ -1,414 +1,414 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Debug - ARM64 - - - Debug aarch64 - Win32 - - - Debug aarch64 - x64 - - - Debug aarch64 - ARM64 - - - Release - Win32 - - - Release - x64 - - - Release - ARM64 - - - Release aarch64 - Win32 - - - Release aarch64 - x64 - - - Release aarch64 - ARM64 - - - - {DFC79D72-91DE-434C-871B-B3943B488BEB} - true - Win32Proj - slang-rt - - - - DynamicLibrary - true - Unicode - v142 - - - DynamicLibrary - true - Unicode - v142 - - - DynamicLibrary - true - Unicode - v142 - true - - - DynamicLibrary - false - Unicode - v142 - - - DynamicLibrary - false - Unicode - v142 - - - DynamicLibrary - false - Unicode - v142 - true - - - - - - - - - - - - - - - - - - - - - - - - - true - ..\..\..\bin\windows-x86\debug\ - ..\..\..\intermediate\windows-x86\debug\slang-rt\ - slang-rt - .dll - - - true - ..\..\..\bin\windows-x64\debug\ - ..\..\..\intermediate\windows-x64\debug\slang-rt\ - slang-rt - .dll - - - true - ..\..\..\bin\windows-aarch64\debug\ - ..\..\..\intermediate\windows-aarch64\debug\slang-rt\ - slang-rt - .dll - - - false - ..\..\..\bin\windows-x86\release\ - ..\..\..\intermediate\windows-x86\release\slang-rt\ - slang-rt - .dll - - - false - ..\..\..\bin\windows-x64\release\ - ..\..\..\intermediate\windows-x64\release\slang-rt\ - slang-rt - .dll - - - false - ..\..\..\bin\windows-aarch64\release\ - ..\..\..\intermediate\windows-aarch64\release\slang-rt\ - slang-rt - .dll - - - - NotUsing - Level4 - _DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ..\..\..\bin\windows-x86\debug\slang-rt.lib - - - - - NotUsing - Level4 - _DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ..\..\..\bin\windows-x64\debug\slang-rt.lib - - - - - NotUsing - Level4 - _DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Windows - true - ..\..\..\bin\windows-aarch64\debug\slang-rt.lib - - - - - NotUsing - Level4 - NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - ..\..\..\bin\windows-x86\release\slang-rt.lib - - - - - NotUsing - Level4 - NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - ..\..\..\bin\windows-x64\release\slang-rt.lib - - - - - NotUsing - Level4 - NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) - Full - true - true - false - true - MultiThreaded - true - - - Windows - true - true - ..\..\..\bin\windows-aarch64\release\slang-rt.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {E76ACB11-4A12-4F0A-BE1E-CE0B8836EB7F} - - - {E1EC8075-823E-46E5-BC38-C124CCCDF878} - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {DFC79D72-91DE-434C-871B-B3943B488BEB} + true + Win32Proj + slang-rt + + + + DynamicLibrary + true + Unicode + v142 + + + DynamicLibrary + true + Unicode + v142 + + + DynamicLibrary + true + Unicode + v142 + true + + + DynamicLibrary + false + Unicode + v142 + + + DynamicLibrary + false + Unicode + v142 + + + DynamicLibrary + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\slang-rt\ + slang-rt + .dll + + + true + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\slang-rt\ + slang-rt + .dll + + + true + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\slang-rt\ + slang-rt + .dll + + + false + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\slang-rt\ + slang-rt + .dll + + + false + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\slang-rt\ + slang-rt + .dll + + + false + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\slang-rt\ + slang-rt + .dll + + + + NotUsing + Level4 + _DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Windows + true + ..\..\..\bin\windows-x86\debug\slang-rt.lib + + + + + NotUsing + Level4 + _DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Windows + true + ..\..\..\bin\windows-x64\debug\slang-rt.lib + + + + + NotUsing + Level4 + _DEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Windows + true + ..\..\..\bin\windows-aarch64\debug\slang-rt.lib + + + + + NotUsing + Level4 + NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + true + + + Windows + true + true + ..\..\..\bin\windows-x86\release\slang-rt.lib + + + + + NotUsing + Level4 + NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + true + + + Windows + true + true + ..\..\..\bin\windows-x64\release\slang-rt.lib + + + + + NotUsing + Level4 + NDEBUG;SLANG_RT_DYNAMIC;SLANG_RT_DYNAMIC_EXPORT;%(PreprocessorDefinitions) + Full + true + true + false + true + MultiThreaded + true + + + Windows + true + true + ..\..\..\bin\windows-aarch64\release\slang-rt.lib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {E76ACB11-4A12-4F0A-BE1E-CE0B8836EB7F} + + + {E1EC8075-823E-46E5-BC38-C124CCCDF878} + + + + + \ No newline at end of file diff --git a/build/visual-studio/slang-rt/slang-rt.vcxproj.filters b/build/visual-studio/slang-rt/slang-rt.vcxproj.filters index b99c077ae..72d5bb088 100644 --- a/build/visual-studio/slang-rt/slang-rt.vcxproj.filters +++ b/build/visual-studio/slang-rt/slang-rt.vcxproj.filters @@ -1,389 +1,389 @@ - - - - - {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - + + + + + {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Source Files + + \ No newline at end of file diff --git a/build/visual-studio/slang/slang.vcxproj b/build/visual-studio/slang/slang.vcxproj index af73baa7e..00b7076dd 100644 --- a/build/visual-studio/slang/slang.vcxproj +++ b/build/visual-studio/slang/slang.vcxproj @@ -447,6 +447,7 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-aarch64\release\slang-glsla + @@ -631,6 +632,8 @@ IF EXIST ..\..\..\external\slang-glslang\bin\windows-aarch64\release\slang-glsla + + diff --git a/build/visual-studio/slang/slang.vcxproj.filters b/build/visual-studio/slang/slang.vcxproj.filters index a55efb887..f79d322ae 100644 --- a/build/visual-studio/slang/slang.vcxproj.filters +++ b/build/visual-studio/slang/slang.vcxproj.filters @@ -447,6 +447,9 @@ Header Files + + Header Files + Header Files @@ -995,6 +998,12 @@ Source Files + + Source Files + + + Source Files + Source Files diff --git a/build/visual-studio/slangd/slangd.vcxproj b/build/visual-studio/slangd/slangd.vcxproj index a4a80b220..bd6b2cb03 100644 --- a/build/visual-studio/slangd/slangd.vcxproj +++ b/build/visual-studio/slangd/slangd.vcxproj @@ -1,290 +1,290 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Debug - ARM64 - - - Debug aarch64 - Win32 - - - Debug aarch64 - x64 - - - Debug aarch64 - ARM64 - - - Release - Win32 - - - Release - x64 - - - Release - ARM64 - - - Release aarch64 - Win32 - - - Release aarch64 - x64 - - - Release aarch64 - ARM64 - - - - {B2D63B45-92B0-40F7-B242-CCA4DFD64341} - true - Win32Proj - slangd - - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - true - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - true - - - - - - - - - - - - - - - - - - - - - - - - - true - ..\..\..\bin\windows-x86\debug\ - ..\..\..\intermediate\windows-x86\debug\slangd\ - slangd - .exe - - - true - ..\..\..\bin\windows-x64\debug\ - ..\..\..\intermediate\windows-x64\debug\slangd\ - slangd - .exe - - - true - ..\..\..\bin\windows-aarch64\debug\ - ..\..\..\intermediate\windows-aarch64\debug\slangd\ - slangd - .exe - - - false - ..\..\..\bin\windows-x86\release\ - ..\..\..\intermediate\windows-x86\release\slangd\ - slangd - .exe - - - false - ..\..\..\bin\windows-x64\release\ - ..\..\..\intermediate\windows-x64\release\slangd\ - slangd - .exe - - - false - ..\..\..\bin\windows-aarch64\release\ - ..\..\..\intermediate\windows-aarch64\release\slangd\ - slangd - .exe - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - - - - {12C1E89D-F5D0-41D3-8E8D-FB3F358F8126} - - - {F9BE7957-8399-899E-0C49-E714FDDD4B65} - - - {DB00DA62-0533-4AFD-B59F-A67D5B3A0808} - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {B2D63B45-92B0-40F7-B242-CCA4DFD64341} + true + Win32Proj + slangd + + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + true + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\slangd\ + slangd + .exe + + + true + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\slangd\ + slangd + .exe + + + true + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\slangd\ + slangd + .exe + + + false + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\slangd\ + slangd + .exe + + + false + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\slangd\ + slangd + .exe + + + false + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\slangd\ + slangd + .exe + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + + + + {12C1E89D-F5D0-41D3-8E8D-FB3F358F8126} + + + {F9BE7957-8399-899E-0C49-E714FDDD4B65} + + + {DB00DA62-0533-4AFD-B59F-A67D5B3A0808} + + + + + \ No newline at end of file diff --git a/build/visual-studio/slangd/slangd.vcxproj.filters b/build/visual-studio/slangd/slangd.vcxproj.filters index 5028415fd..95c658398 100644 --- a/build/visual-studio/slangd/slangd.vcxproj.filters +++ b/build/visual-studio/slangd/slangd.vcxproj.filters @@ -1,13 +1,13 @@ - - - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - - - Source Files - - + + + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Source Files + + \ No newline at end of file diff --git a/build/visual-studio/test-process/test-process.vcxproj b/build/visual-studio/test-process/test-process.vcxproj index 80809d689..115d3bff3 100644 --- a/build/visual-studio/test-process/test-process.vcxproj +++ b/build/visual-studio/test-process/test-process.vcxproj @@ -1,287 +1,287 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Debug - ARM64 - - - Debug aarch64 - Win32 - - - Debug aarch64 - x64 - - - Debug aarch64 - ARM64 - - - Release - Win32 - - - Release - x64 - - - Release - ARM64 - - - Release aarch64 - Win32 - - - Release aarch64 - x64 - - - Release aarch64 - ARM64 - - - - {BE412850-4BB9-429A-877C-BFBC4B34186C} - true - Win32Proj - test-process - - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - true - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - true - - - - - - - - - - - - - - - - - - - - - - - - - true - ..\..\..\bin\windows-x86\debug\ - ..\..\..\intermediate\windows-x86\debug\test-process\ - test-process - .exe - - - true - ..\..\..\bin\windows-x64\debug\ - ..\..\..\intermediate\windows-x64\debug\test-process\ - test-process - .exe - - - true - ..\..\..\bin\windows-aarch64\debug\ - ..\..\..\intermediate\windows-aarch64\debug\test-process\ - test-process - .exe - - - false - ..\..\..\bin\windows-x86\release\ - ..\..\..\intermediate\windows-x86\release\test-process\ - test-process - .exe - - - false - ..\..\..\bin\windows-x64\release\ - ..\..\..\intermediate\windows-x64\release\test-process\ - test-process - .exe - - - false - ..\..\..\bin\windows-aarch64\release\ - ..\..\..\intermediate\windows-aarch64\release\test-process\ - test-process - .exe - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - - - - {12C1E89D-F5D0-41D3-8E8D-FB3F358F8126} - - - {F9BE7957-8399-899E-0C49-E714FDDD4B65} - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {BE412850-4BB9-429A-877C-BFBC4B34186C} + true + Win32Proj + test-process + + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + true + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\test-process\ + test-process + .exe + + + true + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\test-process\ + test-process + .exe + + + true + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\test-process\ + test-process + .exe + + + false + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\test-process\ + test-process + .exe + + + false + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\test-process\ + test-process + .exe + + + false + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\test-process\ + test-process + .exe + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + + + + {12C1E89D-F5D0-41D3-8E8D-FB3F358F8126} + + + {F9BE7957-8399-899E-0C49-E714FDDD4B65} + + + + + \ No newline at end of file diff --git a/build/visual-studio/test-process/test-process.vcxproj.filters b/build/visual-studio/test-process/test-process.vcxproj.filters index 96d7f8b1d..27a707798 100644 --- a/build/visual-studio/test-process/test-process.vcxproj.filters +++ b/build/visual-studio/test-process/test-process.vcxproj.filters @@ -1,13 +1,13 @@ - - - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - - - Source Files - - + + + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Source Files + + \ No newline at end of file diff --git a/build/visual-studio/test-server/test-server.vcxproj b/build/visual-studio/test-server/test-server.vcxproj index 3d6d22174..eb4da3a17 100644 --- a/build/visual-studio/test-server/test-server.vcxproj +++ b/build/visual-studio/test-server/test-server.vcxproj @@ -1,295 +1,295 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Debug - ARM64 - - - Debug aarch64 - Win32 - - - Debug aarch64 - x64 - - - Debug aarch64 - ARM64 - - - Release - Win32 - - - Release - x64 - - - Release - ARM64 - - - Release aarch64 - Win32 - - - Release aarch64 - x64 - - - Release aarch64 - ARM64 - - - - {23149706-C12F-4329-B6AA-8266407C32D3} - true - Win32Proj - test-server - - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - - - Application - true - Unicode - v142 - true - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - - - Application - false - Unicode - v142 - true - - - - - - - - - - - - - - - - - - - - - - - - - true - ..\..\..\bin\windows-x86\debug\ - ..\..\..\intermediate\windows-x86\debug\test-server\ - test-server - .exe - - - true - ..\..\..\bin\windows-x64\debug\ - ..\..\..\intermediate\windows-x64\debug\test-server\ - test-server - .exe - - - true - ..\..\..\bin\windows-aarch64\debug\ - ..\..\..\intermediate\windows-aarch64\debug\test-server\ - test-server - .exe - - - false - ..\..\..\bin\windows-x86\release\ - ..\..\..\intermediate\windows-x86\release\test-server\ - test-server - .exe - - - false - ..\..\..\bin\windows-x64\release\ - ..\..\..\intermediate\windows-x64\release\test-server\ - test-server - .exe - - - false - ..\..\..\bin\windows-aarch64\release\ - ..\..\..\intermediate\windows-aarch64\release\test-server\ - test-server - .exe - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - _DEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - ProgramDatabase - Disabled - false - MultiThreadedDebug - true - - - Console - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - NotUsing - Level3 - NDEBUG;%(PreprocessorDefinitions) - ..\..\..;%(AdditionalIncludeDirectories) - Full - true - true - false - true - MultiThreaded - true - - - Console - true - true - - - - - - - - - - - - - {12C1E89D-F5D0-41D3-8E8D-FB3F358F8126} - - - {F9BE7957-8399-899E-0C49-E714FDDD4B65} - - - {DB00DA62-0533-4AFD-B59F-A67D5B3A0808} - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM64 + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM64 + + + Release + Win32 + + + Release + x64 + + + Release + ARM64 + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM64 + + + + {23149706-C12F-4329-B6AA-8266407C32D3} + true + Win32Proj + test-server + + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + true + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\test-server\ + test-server + .exe + + + true + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\test-server\ + test-server + .exe + + + true + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\test-server\ + test-server + .exe + + + false + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\test-server\ + test-server + .exe + + + false + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\test-server\ + test-server + .exe + + + false + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\test-server\ + test-server + .exe + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + false + MultiThreadedDebug + true + + + Console + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + true + + + Console + true + true + + + + + + + + + + + + + {12C1E89D-F5D0-41D3-8E8D-FB3F358F8126} + + + {F9BE7957-8399-899E-0C49-E714FDDD4B65} + + + {DB00DA62-0533-4AFD-B59F-A67D5B3A0808} + + + + + \ No newline at end of file diff --git a/build/visual-studio/test-server/test-server.vcxproj.filters b/build/visual-studio/test-server/test-server.vcxproj.filters index 2a5d2b9d3..e8578e394 100644 --- a/build/visual-studio/test-server/test-server.vcxproj.filters +++ b/build/visual-studio/test-server/test-server.vcxproj.filters @@ -1,27 +1,27 @@ - - - - - {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} - - - {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - + + + + + {21EB8090-0D4E-1035-B6D3-48EBA215DCB7} + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + \ No newline at end of file diff --git a/premake5.lua b/premake5.lua index 3b0807a3d..be4487497 100644 --- a/premake5.lua +++ b/premake5.lua @@ -722,7 +722,7 @@ end -- build items needed for other dependencies --- -function generatorProject(name, sourcePath, isSharedLib) +function generatorProject(name, sourcePath, projectKind) -- We use the `group` command here to specify that the -- next project we create shold be placed into a group -- named "generator" in a generated IDE solution/workspace. @@ -736,12 +736,12 @@ function generatorProject(name, sourcePath, isSharedLib) -- Set up the project, but do NOT add any source files. baseSlangProject(name, sourcePath) - -- By default, just use static lib to force something - -- to build. - if isSharedLib then - kind "SharedLib" + -- By default the generator projects run a custom tool and don't + -- require any premake machinery to compile a binary for them. + if projectKind == nil then + kind "Utility" else - kind "StaticLib" + kind (projectKind) end end @@ -866,6 +866,11 @@ tool "slang-cpp-extractor" links { "compiler-core", "core" } +tool "slang-lookup-generator" + uuid "3242baa7-fc4c-4f76-83bc-e4403099dc1d" + includedirs { "." } + + links { "compiler-core", "core" } tool "test-process" uuid "BE412850-4BB9-429A-877C-BFBC4B34186C" @@ -1242,10 +1247,9 @@ generatorProject("run-generators", nil) "source/core/slang-string.cpp", } - -- First, we need to ensure that `slang-generate`/`slang-cpp-extactor` - -- gets built before `slang`, so we declare a non-linking dependency between + -- First, we need to ensure that various source-generation tools + -- get built before `slang`, so we declare a non-linking dependency between -- the projects here: - -- dependson { "slang-cpp-extractor", "slang-generate", "slang-embed" } local executableSuffix = getExecutableSuffix() @@ -1268,6 +1272,51 @@ generatorProject("run-generators", nil) filter { } +generatorProject("generate-lookup-tables") + tables = { + { + json = "external/spirv-headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json", + header = "spirv/unified1/GLSL.std.450.h", + prefix = "GLSLstd450", + type = "GLSLstd450" + }, + { + json = "external/spirv-headers/include/spirv/unified1/spirv.core.grammar.json", + header = "spirv/unified1/spirv.h", + prefix = "Spv", + type = "SpvOp" + } + } + for _, t in pairs(tables) do + files {t.json} + end + + dependson { "slang-lookup-generator" } + + local builddir = getBuildDir() + if executeBinary then + for _, t in pairs(tables) do + filter("files:" .. t.json) + + local inJson = "%{file.abspath}" + local cppFilename = "slang-lookup-" .. t.type:lower() .. ".cpp" + local cppPath = "%{wks.location}/source/slang/" .. cppFilename + local buildcmd = '"' .. builddir .. '/slang-lookup-generator" ' + .. inJson .. " " + .. cppPath .. " " + .. t.type .. " " + .. t.prefix .. " " + .. t.header + + buildmessage ("slang-lookup-generator for " .. cppFilename) + buildcommands { buildcmd } + buildinputs { inJson, builddir .. "/slang-lookup-generator" .. getExecutableSuffix() } + buildoutputs (cppPath) + end + end + + filter { } + if enableEmbedStdLib then standardProject("slangc-bootstrap", "source/slangc") uuid "6339BF31-AC99-4819-B719-679B63451EF0" @@ -1314,7 +1363,7 @@ if enableEmbedStdLib then end if enableEmbedStdLib then - generatorProject("embed-stdlib-generator", nil, true) + generatorProject("embed-stdlib-generator", nil, "SharedLib") -- We include these, even though they are not really part of the dummy -- build, so that the filters below can pick up the appropriate locations. @@ -1422,6 +1471,12 @@ standardProject("slang", "source/slang") "prelude/slang-cpp-host-prelude.h.cpp" } + -- Similarly for any generated lookup tables + files { + "source/slang/slang-lookup-spvop.cpp", + "source/slang/slang-lookup-glslstd450.cpp" + } + -- -- The most challenging part of building `slang` is that we need -- to invoke generators such as slang-cpp-extractor and slang-generate @@ -1430,6 +1485,7 @@ standardProject("slang", "source/slang") if not skipSourceGeneration then dependson { "run-generators" } + dependson { "generate-lookup-tables" } end -- If we have slang-llvm copy it diff --git a/slang.sln b/slang.sln index 903a699e9..a10569253 100644 --- a/slang.sln +++ b/slang.sln @@ -23,6 +23,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slang-embed", "build\visual EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slang-generate", "build\visual-studio\slang-generate\slang-generate.vcxproj", "{66174227-8541-41FC-A6DF-4764FC66F78E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slang-lookup-generator", "build\visual-studio\slang-lookup-generator\slang-lookup-generator.vcxproj", "{3242BAA7-FC4C-4F76-83BC-E4403099DC1D}" +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slangd", "build\visual-studio\slangd\slangd.vcxproj", "{B2D63B45-92B0-40F7-B242-CCA4DFD64341}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-process", "build\visual-studio\test-process\test-process.vcxproj", "{BE412850-4BB9-429A-877C-BFBC4B34186C}" @@ -59,6 +61,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "triangle", "build\visual-st EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "generator", "generator", "{F3AB4ED5-5F37-BC99-6848-3F8ED452189A}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generate-lookup-tables", "build\visual-studio\generate-lookup-tables\generate-lookup-tables.vcxproj", "{5FFA0764-4BF4-30B6-3461-C7C620FA9622}" + ProjectSection(ProjectDependencies) = postProject + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D} = {3242BAA7-FC4C-4F76-83BC-E4403099DC1D} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "run-generators", "build\visual-studio\run-generators\run-generators.vcxproj", "{E145B2B8-CD13-A6BE-B6A7-16E5A2148223}" ProjectSection(ProjectDependencies) = postProject {CA8A30D1-8FA9-4330-B7F7-84709246D8DC} = {CA8A30D1-8FA9-4330-B7F7-84709246D8DC} @@ -73,6 +80,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slang", "build\visual-studio\slang\slang.vcxproj", "{DB00DA62-0533-4AFD-B59F-A67D5B3A0808}" ProjectSection(ProjectDependencies) = postProject {E145B2B8-CD13-A6BE-B6A7-16E5A2148223} = {E145B2B8-CD13-A6BE-B6A7-16E5A2148223} + {5FFA0764-4BF4-30B6-3461-C7C620FA9622} = {5FFA0764-4BF4-30B6-3461-C7C620FA9622} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slang-rt", "build\visual-studio\slang-rt\slang-rt.vcxproj", "{DFC79D72-91DE-434C-871B-B3943B488BEB}" @@ -183,6 +191,18 @@ Global {66174227-8541-41FC-A6DF-4764FC66F78E}.Release|Win32.Build.0 = Release|Win32 {66174227-8541-41FC-A6DF-4764FC66F78E}.Release|x64.ActiveCfg = Release|x64 {66174227-8541-41FC-A6DF-4764FC66F78E}.Release|x64.Build.0 = Release|x64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Debug|aarch64.ActiveCfg = Debug aarch64|ARM64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Debug|aarch64.Build.0 = Debug aarch64|ARM64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Debug|Win32.Build.0 = Debug|Win32 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Debug|x64.ActiveCfg = Debug|x64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Debug|x64.Build.0 = Debug|x64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Release|aarch64.ActiveCfg = Release aarch64|ARM64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Release|aarch64.Build.0 = Release aarch64|ARM64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Release|Win32.ActiveCfg = Release|Win32 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Release|Win32.Build.0 = Release|Win32 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Release|x64.ActiveCfg = Release|x64 + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D}.Release|x64.Build.0 = Release|x64 {B2D63B45-92B0-40F7-B242-CCA4DFD64341}.Debug|aarch64.ActiveCfg = Debug aarch64|ARM64 {B2D63B45-92B0-40F7-B242-CCA4DFD64341}.Debug|aarch64.Build.0 = Debug aarch64|ARM64 {B2D63B45-92B0-40F7-B242-CCA4DFD64341}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -375,6 +395,18 @@ Global {3BB99068-27C9-3C39-9082-A1577CB12BD2}.Release|Win32.Build.0 = Release|Win32 {3BB99068-27C9-3C39-9082-A1577CB12BD2}.Release|x64.ActiveCfg = Release|x64 {3BB99068-27C9-3C39-9082-A1577CB12BD2}.Release|x64.Build.0 = Release|x64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Debug|aarch64.ActiveCfg = Debug aarch64|ARM64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Debug|aarch64.Build.0 = Debug aarch64|ARM64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Debug|Win32.Build.0 = Debug|Win32 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Debug|x64.ActiveCfg = Debug|x64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Debug|x64.Build.0 = Debug|x64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Release|aarch64.ActiveCfg = Release aarch64|ARM64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Release|aarch64.Build.0 = Release aarch64|ARM64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Release|Win32.ActiveCfg = Release|Win32 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Release|Win32.Build.0 = Release|Win32 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Release|x64.ActiveCfg = Release|x64 + {5FFA0764-4BF4-30B6-3461-C7C620FA9622}.Release|x64.Build.0 = Release|x64 {E145B2B8-CD13-A6BE-B6A7-16E5A2148223}.Debug|aarch64.ActiveCfg = Debug aarch64|ARM64 {E145B2B8-CD13-A6BE-B6A7-16E5A2148223}.Debug|aarch64.Build.0 = Debug aarch64|ARM64 {E145B2B8-CD13-A6BE-B6A7-16E5A2148223}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -507,6 +539,7 @@ Global {CA8A30D1-8FA9-4330-B7F7-84709246D8DC} = {FD47AE19-69FD-260F-F2F1-20E65EA61D13} {7F773DD9-EB8F-2403-B43C-B49C2014B99C} = {FD47AE19-69FD-260F-F2F1-20E65EA61D13} {66174227-8541-41FC-A6DF-4764FC66F78E} = {FD47AE19-69FD-260F-F2F1-20E65EA61D13} + {3242BAA7-FC4C-4F76-83BC-E4403099DC1D} = {FD47AE19-69FD-260F-F2F1-20E65EA61D13} {B2D63B45-92B0-40F7-B242-CCA4DFD64341} = {FD47AE19-69FD-260F-F2F1-20E65EA61D13} {BE412850-4BB9-429A-877C-BFBC4B34186C} = {FD47AE19-69FD-260F-F2F1-20E65EA61D13} {23149706-C12F-4329-B6AA-8266407C32D3} = {FD47AE19-69FD-260F-F2F1-20E65EA61D13} @@ -521,6 +554,7 @@ Global {25512BFB-1138-EDF2-BA88-5310A64E6659} = {EB5FC2C6-D72D-B6CC-C0C1-26F3AC2E9231} {0FC5DE93-FBEA-A8FA-E430-2EC6D0F5CDC6} = {EB5FC2C6-D72D-B6CC-C0C1-26F3AC2E9231} {3BB99068-27C9-3C39-9082-A1577CB12BD2} = {EB5FC2C6-D72D-B6CC-C0C1-26F3AC2E9231} + {5FFA0764-4BF4-30B6-3461-C7C620FA9622} = {F3AB4ED5-5F37-BC99-6848-3F8ED452189A} {E145B2B8-CD13-A6BE-B6A7-16E5A2148223} = {F3AB4ED5-5F37-BC99-6848-3F8ED452189A} {092DAB9F-1DA5-4538-ADD7-1A8D1DBFD519} = {57B5AA5E-C340-1823-CC51-9B17385C7423} {61F7EB00-7281-4BF3-9470-7C2EA92620C3} = {57B5AA5E-C340-1823-CC51-9B17385C7423} diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index ed150a4c0..f5b138f25 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -221,14 +221,14 @@ struct StructuredBuffer out uint stride); __target_intrinsic(glsl, "$0._data[$1]") - __target_intrinsic(spirv_direct, "%addr = 65 resultType*StorageBuffer resultId _0 const(int, 0) _1; 61 resultType resultId %addr;") + __target_intrinsic(spirv_direct, "%addr = OpAccessChain resultType*StorageBuffer resultId _0 const(int, 0) _1; OpLoad resultType resultId %addr;") T Load(int location); T Load(int location, out uint status); __subscript(uint index) -> T { __target_intrinsic(glsl, "$0._data[$1]") - __target_intrinsic(spirv_direct, "%addr = 65 resultType*StorageBuffer resultId _0 const(int, 0) _1; 61 resultType resultId %addr;") + __target_intrinsic(spirv_direct, "%addr = OpAccessChain resultType*StorageBuffer resultId _0 const(int, 0) _1; OpLoad resultType resultId %addr;") get; }; }; @@ -697,14 +697,14 @@ struct $(item.name) uint IncrementCounter(); __target_intrinsic(glsl, "$0._data[$1]") - __target_intrinsic(spirv_direct, "%addr = 65 resultType*StorageBuffer resultId _0 const(int, 0) _1; 61 resultType resultId %addr;") + __target_intrinsic(spirv_direct, "%addr = OpAccessChain resultType*StorageBuffer resultId _0 const(int, 0) _1; OpLoad resultType resultId %addr;") T Load(int location); T Load(int location, out uint status); __subscript(uint index) -> T { __target_intrinsic(glsl, "$0._data[$1]") - __target_intrinsic(spirv_direct, "*StorageBuffer 65 resultType resultId _0 const(int, 0) _1") + __target_intrinsic(spirv_direct, "*StorageBuffer OpAccessChain resultType resultId _0 const(int, 0) _1") ref; } }; @@ -797,7 +797,7 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_abs($0)") __target_intrinsic(cpp, "$P_abs($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fi(4,5) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fi(FAbs, SAbs) _0") T abs(T x); /*{ // Note: this simple definition may not be appropriate for floating-point inputs @@ -807,7 +807,7 @@ T abs(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fi(4,5) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fi(FAbs, SAbs) _0") vector abs(vector x) { VECTOR_MAP_UNARY(T, N, abs, x); @@ -825,13 +825,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_abs($0)") __target_intrinsic(cpp, "$P_abs($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fi(4,5) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fi(FAbs, SAbs) _0") T abs(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fi(4,5) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fi(FAbs, SAbs) _0") vector abs(vector x) { VECTOR_MAP_UNARY(T, N, abs, x); @@ -851,13 +851,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_acos($0)") __target_intrinsic(cpp, "$P_acos($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 17 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Acos _0") T acos(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 17 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Acos _0") vector acos(vector x) { VECTOR_MAP_UNARY(T, N, acos, x); @@ -952,7 +952,7 @@ bool any(matrix x); __target_intrinsic(hlsl) __target_intrinsic(glsl, "packDouble2x32(uvec2($0, $1))") -__target_intrinsic(spirv_direct, "%v = 80 _type(uint2) resultId _0 _1; 12 resultType resultId glsl450 59 %v") +__target_intrinsic(spirv_direct, "%v = OpCompositeConstruct _type(uint2) resultId _0 _1; OpExtInst resultType resultId glsl450 59 %v") __glsl_extension(GL_ARB_gpu_shader5) double asdouble(uint lowbits, uint highbits); @@ -960,18 +960,18 @@ double asdouble(uint lowbits, uint highbits); __target_intrinsic(hlsl) __target_intrinsic(glsl, "intBitsToFloat") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") float asfloat(int x); __target_intrinsic(hlsl) __target_intrinsic(glsl, "uintBitsToFloat") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") float asfloat(uint x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "intBitsToFloat") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") vector asfloat(vector< int, N> x) { VECTOR_MAP_UNARY(float, N, asfloat, x); @@ -980,7 +980,7 @@ vector asfloat(vector< int, N> x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "uintBitsToFloat") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") vector asfloat(vector x) { VECTOR_MAP_UNARY(float, N, asfloat, x); @@ -1021,13 +1021,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_asin($0)") __target_intrinsic(cpp, "$P_asin($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 16 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Asin _0") T asin(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 16 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Asin _0") vector asin(vector x) { VECTOR_MAP_UNARY(T,N,asin,x); @@ -1044,18 +1044,18 @@ matrix asin(matrix x) __target_intrinsic(hlsl) __target_intrinsic(glsl, "floatBitsToInt") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") int asint(float x); __target_intrinsic(hlsl) __target_intrinsic(glsl, "int($0)") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") int asint(uint x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "floatBitsToInt") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") vector asint(vector x) { VECTOR_MAP_UNARY(int, N, asint, x); @@ -1064,7 +1064,7 @@ vector asint(vector x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "ivec$N0($0)") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") vector asint(vector x) { VECTOR_MAP_UNARY(int, N, asint, x); @@ -1110,18 +1110,18 @@ void asuint(double value, out uint lowbits, out uint highbits); __target_intrinsic(hlsl) __target_intrinsic(glsl, "floatBitsToUint") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") uint asuint(float x); __target_intrinsic(hlsl) __target_intrinsic(glsl, "uint($0)") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") uint asuint(int x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "floatBitsToUint") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") vector asuint(vector x) { VECTOR_MAP_UNARY(uint, N, asuint, x); @@ -1130,7 +1130,7 @@ vector asuint(vector x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "uvec$N0($0)") -__target_intrinsic(spirv_direct, "124 resultType resultId _0") +__target_intrinsic(spirv_direct, "OpBitcast resultType resultId _0") vector asuint(vector x) { VECTOR_MAP_UNARY(uint, N, asuint, x); @@ -1242,13 +1242,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_atan($0)") __target_intrinsic(cpp, "$P_atan($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 18 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Atan _0") T atan(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 18 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Atan _0") vector atan(vector x) { VECTOR_MAP_UNARY(T, N, atan, x); @@ -1266,13 +1266,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl,"atan($0,$1)") __target_intrinsic(cuda, "$P_atan2($0, $1)") __target_intrinsic(cpp, "$P_atan2($0, $1)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 25 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Atan2 _0 _1") T atan2(T y, T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl,"atan($0,$1)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 25 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Atan2 _0 _1") vector atan2(vector y, vector x) { VECTOR_MAP_BINARY(T, N, atan2, y, x); @@ -1291,13 +1291,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_ceil($0)") __target_intrinsic(cpp, "$P_ceil($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 9 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Ceil _0") T ceil(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 9 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Ceil _0") vector ceil(vector x) { VECTOR_MAP_UNARY(T, N, ceil, x); @@ -1318,7 +1318,7 @@ bool CheckAccessFullyMapped(uint status); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(43,44,45) _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FClamp, UClamp, SClamp) _0 _1 _2") T clamp(T x, T minBound, T maxBound) { return min(max(x, minBound), maxBound); @@ -1327,7 +1327,7 @@ T clamp(T x, T minBound, T maxBound) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(43,44,45) _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FClamp, UClamp, SClamp) _0 _1 _2") vector clamp(vector x, vector minBound, vector maxBound) { return min(max(x, minBound), maxBound); @@ -1343,7 +1343,7 @@ matrix clamp(matrix x, matrix minBound, matrix maxBo __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(43,44,45) _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FClamp, UClamp, SClamp) _0 _1 _2") T clamp(T x, T minBound, T maxBound) { return min(max(x, minBound), maxBound); @@ -1352,7 +1352,7 @@ T clamp(T x, T minBound, T maxBound) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(43,44,45) _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FClamp, UClamp, SClamp) _0 _1 _2") vector clamp(vector x, vector minBound, vector maxBound) { return min(max(x, minBound), maxBound); @@ -1393,13 +1393,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_cos($0)") __target_intrinsic(cpp, "$P_cos($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 14 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Cos _0") T cos(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 14 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Cos _0") vector cos(vector x) { VECTOR_MAP_UNARY(T,N, cos, x); @@ -1418,13 +1418,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_cosh($0)") __target_intrinsic(cpp, "$P_cosh($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 20 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Cosh _0") T cosh(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 20 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Cosh _0") vector cosh(vector x) { VECTOR_MAP_UNARY(T,N, cosh, x); @@ -1449,7 +1449,7 @@ uint countbits(uint value); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 68 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Cross _0 _1") vector cross(vector left, vector right) { return vector( @@ -1599,7 +1599,7 @@ matrix ddy_fine(matrix x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 12 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Degrees _0") T degrees(T x) { return x * (T(180) / T.getPi()); @@ -1608,7 +1608,7 @@ T degrees(T x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 12 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Degrees _0") vector degrees(vector x) { VECTOR_MAP_UNARY(T, N, degrees, x); @@ -1626,7 +1626,7 @@ matrix degrees(matrix x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 33 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Determinant _0") T determinant(matrix m); // Barrier for device memory @@ -1643,7 +1643,7 @@ void DeviceMemoryBarrierWithGroupSync(); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 67 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Distance _0 _1") T distance(vector x, vector y) { return length(x - y); @@ -1695,12 +1695,12 @@ RWStructuredBuffer __getEquivalentStructuredBuffer(RWByteAddressBuffer b); __generic __target_intrinsic(glsl, interpolateAtCentroid) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 76 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 InterpolateAtCentroid _0") T EvaluateAttributeAtCentroid(T x); __generic __target_intrinsic(glsl, interpolateAtCentroid) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 76 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 InterpolateAtCentroid _0") vector EvaluateAttributeAtCentroid(vector x); __generic @@ -1712,12 +1712,12 @@ matrix EvaluateAttributeAtCentroid(matrix x) __generic __target_intrinsic(glsl, "interpolateAtSample($0, int($1))") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 77 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 InterpolateAtSample _0 _1") T EvaluateAttributeAtSample(T x, uint sampleindex); __generic __target_intrinsic(glsl, "interpolateAtSample($0, int($1))") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 77 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 InterpolateAtSample _0 _1") vector EvaluateAttributeAtSample(vector x, uint sampleindex); __generic @@ -1734,12 +1734,12 @@ matrix EvaluateAttributeAtSample(matrix x, uint sampleindex) __generic __target_intrinsic(glsl, "interpolateAtOffset($0, vec2($1) / 16.0f)") -__target_intrinsic(spirv_direct, "%foffset = 111 _type(float2) resultId _1; %offsetdiv16 = 136 _type(float2) resultId %foffset const(float2, 16.0, 16.0); 12 resultType resultId glsl450 78 _0 %offsetdiv16") +__target_intrinsic(spirv_direct, "%foffset = OpConvertSToF _type(float2) resultId _1; %offsetdiv16 = 136 _type(float2) resultId %foffset const(float2, 16.0, 16.0); OpExtInst resultType resultId glsl450 78 _0 %offsetdiv16") T EvaluateAttributeSnapped(T x, int2 offset); __generic __target_intrinsic(glsl, "interpolateAtOffset($0, vec2($1) / 16.0f)") -__target_intrinsic(spirv_direct, "%foffset = 111 _type(float2) resultId _1; %offsetdiv16 = 136 _type(float2) resultId %foffset const(float2, 16.0, 16.0); 12 resultType resultId glsl450 78 _0 %offsetdiv16") +__target_intrinsic(spirv_direct, "%foffset = OpConvertSToF _type(float2) resultId _1; %offsetdiv16 = 136 _type(float2) resultId %foffset const(float2, 16.0, 16.0); OpExtInst resultType resultId glsl450 78 _0 %offsetdiv16") vector EvaluateAttributeSnapped(vector x, int2 offset); __generic @@ -1761,13 +1761,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_exp($0)") __target_intrinsic(cpp, "$P_exp($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 27 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Exp _0") T exp(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 27 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Exp _0") vector exp(vector x) { VECTOR_MAP_UNARY(T, N, exp, x); @@ -1787,13 +1787,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_exp2($0)") __target_intrinsic(cpp, "$P_exp2($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 29 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Exp2 _0") T exp2(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 29 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Exp2 _0") vector exp2(vector x) { VECTOR_MAP_UNARY(T, N, exp2, x); @@ -1886,12 +1886,12 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl,"findMSB") __target_intrinsic(cuda, "$P_firstbithigh($0)") __target_intrinsic(cpp, "$P_firstbithigh($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 74 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindSMsb _0") int firstbithigh(int value); __target_intrinsic(hlsl) __target_intrinsic(glsl,"findMSB") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 74 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindSMsb _0") __generic vector firstbithigh(vector value) { @@ -1902,12 +1902,12 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl,"findMSB") __target_intrinsic(cuda, "$P_firstbithigh($0)") __target_intrinsic(cpp, "$P_firstbithigh($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 75 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindUMsb _0") uint firstbithigh(uint value); __target_intrinsic(hlsl) __target_intrinsic(glsl,"findMSB") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 75 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindUMsb _0") __generic vector firstbithigh(vector value) { @@ -1919,12 +1919,12 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl,"findLSB") __target_intrinsic(cuda, "$P_firstbitlow($0)") __target_intrinsic(cpp, "$P_firstbitlow($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 73 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindILsb _0") int firstbitlow(int value); __target_intrinsic(hlsl) __target_intrinsic(glsl,"findLSB") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 73 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindILsb _0") __generic vector firstbitlow(vector value) { @@ -1935,13 +1935,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl,"findLSB") __target_intrinsic(cuda, "$P_firstbitlow($0)") __target_intrinsic(cpp, "$P_firstbitlow($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 73 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindILsb _0") uint firstbitlow(uint value); __target_intrinsic(hlsl) __target_intrinsic(glsl,"findLSB") __generic -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 73 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FindILsb _0") vector firstbitlow(vector value) { VECTOR_MAP_UNARY(uint, N, firstbitlow, value); @@ -1954,13 +1954,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_floor($0)") __target_intrinsic(cpp, "$P_floor($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 8 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Floor _0") T floor(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 8 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Floor _0") vector floor(vector x) { VECTOR_MAP_UNARY(T, N, floor, x); @@ -1978,13 +1978,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_fma($0, $1, $2)") __target_intrinsic(cpp, "$P_fma($0, $1, $2)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 50 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Fma _0 _1 _2") double fma(double a, double b, double c); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 50 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Fma _0 _1 _2") vector fma(vector a, vector b, vector c) { VECTOR_MAP_TRINARY(double, N, fma, a, b, c); @@ -2027,13 +2027,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl, fract) __target_intrinsic(cuda, "$P_frac($0)") __target_intrinsic(cpp, "$P_frac($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 10 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Fract _0") T frac(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, fract) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 10 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Fract _0") vector frac(vector x) { VECTOR_MAP_UNARY(T, N, frac, x); @@ -2049,13 +2049,13 @@ matrix frac(matrix x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 51 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Frexp _0 _1") T frexp(T x, out T exp); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 51 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Frexp _0 _1") vector frexp(vector x, out vector exp) { VECTOR_MAP_BINARY(T, N, frexp, x, exp); @@ -2367,7 +2367,7 @@ matrix isnan(matrix x) __generic __target_intrinsic(hlsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 53 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Ldexp _0 _1") T ldexp(T x, T exp) { return x * exp2(exp); @@ -2375,7 +2375,7 @@ T ldexp(T x, T exp) __generic __target_intrinsic(hlsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 53 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Ldexp _0 _1") vector ldexp(vector x, vector exp) { return x * exp2(exp); @@ -2392,7 +2392,7 @@ matrix ldexp(matrix x, matrix exp) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 66 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Length _0") T length(vector x) { return sqrt(dot(x, x)); @@ -2402,7 +2402,7 @@ T length(vector x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, mix) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 46 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FMix _0 _1 _2") T lerp(T x, T y, T s) { return x * (T(1.0f) - s) + y * s; @@ -2411,7 +2411,7 @@ T lerp(T x, T y, T s) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, mix) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 46 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 FMix _0 _1 _2") vector lerp(vector x, vector y, vector s) { return x * (T(1.0f) - s) + y * s; @@ -2440,13 +2440,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_log($0)") __target_intrinsic(cpp, "$P_log($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 28 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Log _0") T log(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 28 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Log _0") vector log(vector x) { VECTOR_MAP_UNARY(T, N, log, x); @@ -2465,13 +2465,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl, "(log( $0 ) * $S0( 0.43429448190325182765112891891661) )" ) __target_intrinsic(cuda, "$P_log10($0)") __target_intrinsic(cpp, "$P_log10($0)") -__target_intrinsic(spirv_direct, "%baseElog = 12 resultType resultId glsl450 28 _0; 133 resultType resultId _0 %baseElog const(_p,0.43429448190325182765112891891661)") +__target_intrinsic(spirv_direct, "%baseElog = OpExtInst resultType resultId glsl450 Log _0; OpFMul resultType resultId _0 %baseElog const(_p,0.43429448190325182765112891891661)") T log10(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "(log( $0 ) * $S0(0.43429448190325182765112891891661) )" ) -__target_intrinsic(spirv_direct, "%baseElog = 12 resultType resultId glsl450 28 _0; 142 resultType resultId _0 %baseElog const(_p,0.43429448190325182765112891891661)") +__target_intrinsic(spirv_direct, "%baseElog = OpExtInst resultType resultId glsl450 Log _0; OpVectorTimesScalar resultType resultId _0 %baseElog const(_p,0.43429448190325182765112891891661)") vector log10(vector x) { VECTOR_MAP_UNARY(T, N, log10, x); @@ -2490,13 +2490,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_log2($0)") __target_intrinsic(cpp, "$P_log2($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 30 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Log2 _0") T log2(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 30 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Log2 _0") vector log2(vector x) { VECTOR_MAP_UNARY(T, N, log2, x); @@ -2516,13 +2516,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl, fma) __target_intrinsic(cuda, "$P_fma($0, $1, $2)") __target_intrinsic(cpp, "$P_fma($0, $1, $2)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 50 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Fma _0 _1 _2") T mad(T mvalue, T avalue, T bvalue); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, fma) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 50 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Fma _0 _1 _2") vector mad(vector mvalue, vector avalue, vector bvalue) { VECTOR_MAP_TRINARY(T, N, mad, mvalue, avalue, bvalue); @@ -2541,7 +2541,7 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_max($0, $1)") __target_intrinsic(cpp, "$P_max($0, $1)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(40,41,42) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMax, UMax, SMax) _0") T max(T x, T y); // Note: a stdlib implementation of `max` (or `min`) will require splitting // floating-point and integer cases apart, because the floating-point @@ -2551,7 +2551,7 @@ T max(T x, T y); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(40,41,42) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMax, UMax, SMax) _0") vector max(vector x, vector y) { VECTOR_MAP_BINARY(T, N, max, x, y); @@ -2569,13 +2569,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_max($0, $1)") __target_intrinsic(cpp, "$P_max($0, $1)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(40,41,42) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMax, UMax, SMax) _0") T max(T x, T y); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(40,41,42) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMax, UMax, SMax) _0") vector max(vector x, vector y) { VECTOR_MAP_BINARY(T, N, max, x, y); @@ -2594,13 +2594,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_min($0, $1)") __target_intrinsic(cpp, "$P_min($0, $1)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(37,38,39) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMin, UMin, SMin) _0") T min(T x, T y); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(37,38,39) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMin, UMin, SMin) _0") vector min(vector x, vector y) { VECTOR_MAP_BINARY(T, N, min, x, y); @@ -2618,13 +2618,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_min($0, $1)") __target_intrinsic(cpp, "$P_min($0, $1)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(37,38,39) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMin, UMin, SMin) _0") T min(T x, T y); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fus(37,38,39) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fus(FMin, UMin, SMin) _0") vector min(vector x, vector y) { VECTOR_MAP_BINARY(T, N, min, x, y); @@ -2928,7 +2928,7 @@ int NonUniformResourceIndex(int index) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 69 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Normalize _0") vector normalize(vector x) { return x / length(x); @@ -2940,13 +2940,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_pow($0, $1)") __target_intrinsic(cpp, "$P_pow($0, $1)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 26 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Pow _0 _1") T pow(T x, T y); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 26 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Pow _0 _1") vector pow(vector x, vector y) { VECTOR_MAP_BINARY(T, N, pow, x, y); @@ -3100,7 +3100,7 @@ void ProcessTriTessFactorsMin( __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 11 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Radians _0") T radians(T x) { return x * (T.getPi() / T(180.0f)); @@ -3109,7 +3109,7 @@ T radians(T x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 11 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Radians _0") vector radians(vector x) { return x * (T.getPi() / T(180.0f)); @@ -3148,7 +3148,7 @@ matrix rcp(matrix x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 71 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Reflect _0 _1") vector reflect(vector i, vector n) { return i - T(2) * dot(n,i) * n; @@ -3158,7 +3158,7 @@ vector reflect(vector i, vector n) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 72 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Refract _0 _1 _2") vector refract(vector i, vector n, T eta) { let dotNI = dot(n,i); @@ -3187,13 +3187,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_round($0)") __target_intrinsic(cpp, "$P_round($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 1 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Round _0") T round(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 1 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Round _0") vector round(vector x) { VECTOR_MAP_UNARY(T, N, round, x); @@ -3212,7 +3212,7 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl, "inversesqrt($0)") __target_intrinsic(cuda, "$P_rsqrt($0)") __target_intrinsic(cpp, "$P_rsqrt($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 32 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 InverseSqrt _0") T rsqrt(T x) { return T(1.0) / sqrt(x); @@ -3221,7 +3221,7 @@ T rsqrt(T x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "inversesqrt($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 32 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 InverseSqrt _0") vector rsqrt(vector x) { VECTOR_MAP_UNARY(T, N, rsqrt, x); @@ -3265,13 +3265,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl, "int(sign($0))") __target_intrinsic(cuda, "$P_sign($0)") __target_intrinsic(cpp, "$P_sign($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fi(6,7) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fi(FSign, SSign) _0") int sign(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl, "ivec$N0(sign($0))") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 fi(6,7) _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 fi(FSign, SSign) _0") vector sign(vector x) { VECTOR_MAP_UNARY(int, N, sign, x); @@ -3292,13 +3292,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_sin($0)") __target_intrinsic(cpp, "$P_sin($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 13 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Sin _0") T sin(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 13 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Sin _0") vector sin(vector x) { VECTOR_MAP_UNARY(T, N, sin, x); @@ -3343,13 +3343,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_sinh($0)") __target_intrinsic(cpp, "$P_sinh($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 19 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Sinh _0") T sinh(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 19 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Sinh _0") vector sinh(vector x) { VECTOR_MAP_UNARY(T, N, sinh, x); @@ -3366,7 +3366,7 @@ matrix sinh(matrix x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 49 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 SmoothStep _0 _1 _2") T smoothstep(T min, T max, T x) { let t = saturate((x - min) / (max - min)); @@ -3376,7 +3376,7 @@ T smoothstep(T min, T max, T x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 49 _0 _1 _2") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 SmoothStep _0 _1 _2") vector smoothstep(vector min, vector max, vector x) { VECTOR_MAP_TRINARY(T, N, smoothstep, min, max, x); @@ -3395,13 +3395,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_sqrt($0)") __target_intrinsic(cpp, "$P_sqrt($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 31 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Sqrt _0") T sqrt(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 31 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Sqrt _0") vector sqrt(vector x) { VECTOR_MAP_UNARY(T, N, sqrt, x); @@ -3418,7 +3418,7 @@ matrix sqrt(matrix x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 48 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Step _0 _1") T step(T y, T x) { return x < y ? T(0.0f) : T(1.0f); @@ -3427,7 +3427,7 @@ T step(T y, T x) __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 48 _0 _1") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Step _0 _1") vector step(vector y, vector x) { VECTOR_MAP_BINARY(T, N, step, y, x); @@ -3446,13 +3446,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_tan($0)") __target_intrinsic(cpp, "$P_tan($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 15 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Tan _0") T tan(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 15 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Tan _0") vector tan(vector x) { VECTOR_MAP_UNARY(T, N, tan, x); @@ -3471,13 +3471,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_tanh($0)") __target_intrinsic(cpp, "$P_tanh($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 21 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Tanh _0") T tanh(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 21 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Tanh _0") vector tanh(vector x) { VECTOR_MAP_UNARY(T, N, tanh, x); @@ -3509,13 +3509,13 @@ __target_intrinsic(hlsl) __target_intrinsic(glsl) __target_intrinsic(cuda, "$P_trunc($0)") __target_intrinsic(cpp, "$P_trunc($0)") -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 3 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Trunc _0") T trunc(T x); __generic __target_intrinsic(hlsl) __target_intrinsic(glsl) -__target_intrinsic(spirv_direct, "12 resultType resultId glsl450 3 _0") +__target_intrinsic(spirv_direct, "OpExtInst resultType resultId glsl450 Trunc _0") vector trunc(vector x) { VECTOR_MAP_UNARY(T, N, trunc, x); diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 09ad3be58..47537b108 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -915,6 +915,7 @@ struct SPIRVEmitContext getSection(SpvLogicalSectionID::ExtIntInstImports), nullptr, SpvOpExtInstImport, + kResultID, UnownedStringSlice("GLSL.std.450")); return m_glsl450ExtInst; } @@ -1213,7 +1214,7 @@ struct SPIRVEmitContext // ... default: - SLANG_UNIMPLEMENTED_X("unhandled instruction opcode"); + SLANG_UNIMPLEMENTED_X("unhandled instruction opcode for global instruction"); UNREACHABLE_RETURN(nullptr); } } @@ -1568,7 +1569,7 @@ struct SPIRVEmitContext // The instructions that appear inside the basic blocks of // functions are what we will call "local" instructions. // - // When emititng blobal instructions, we usually have to + // When emitting global instructions, we usually have to // pick the right logical section to emit them into, while // for local instructions they will usually emit into // a known parent (the basic block that contains them). @@ -1579,7 +1580,7 @@ struct SPIRVEmitContext switch( inst->getOp() ) { default: - SLANG_UNIMPLEMENTED_X("unhandled instruction opcode"); + SLANG_UNIMPLEMENTED_X("unhandled instruction opcode for local instruction"); break; case kIROp_Specialize: return nullptr; diff --git a/source/slang/slang-ir-spirv-snippet.cpp b/source/slang/slang-ir-spirv-snippet.cpp index 5109d88c1..120c0accb 100644 --- a/source/slang/slang-ir-spirv-snippet.cpp +++ b/source/slang/slang-ir-spirv-snippet.cpp @@ -1,6 +1,7 @@ // slang-ir-spirv-snippet.cpp -#include"slang-ir-spirv-snippet.h" +#include "slang-ir-spirv-snippet.h" +#include "slang-lookup-spirv.h" #include "../core/slang-token-reader.h" namespace Slang @@ -60,8 +61,58 @@ RefPtr SpvSnippet::parse(UnownedStringSlice definition) mapInstNameToIndex[instName] = (int)snippet->instructions.getCount(); tokenReader.Read(Slang::Misc::TokenType::OpAssign); } - inst.opCode = (SpvWord)tokenReader.ReadInt(); + SpvOp opCode; + switch (tokenReader.NextToken().Type) + { + case Slang::Misc::TokenType::IntLiteral: + opCode = (SpvOp)tokenReader.ReadInt(); + break; + case Slang::Misc::TokenType::Identifier: + { + auto opName = tokenReader.ReadWord(); + if(!lookupSpvOp(opName.getUnownedSlice(), opCode)) + { + throw Misc::TextFormatException( + "Text parsing error: Unrecognized SPIR-V opcode: " + opName); + } + break; + } + default: + throw Misc::TextFormatException( + "Text parsing error: SPIR-V intrinsics must begin with an integer or opcode name"); + } + inst.opCode = opCode; bool insideOperandList = true; + const bool isExtInst = inst.opCode == SpvOpExtInst; + bool isGLSLstd450OpcodeAllowed = false; + auto readExtInstOpcode = [&]() + { + switch (tokenReader.NextToken().Type) + { + case Slang::Misc::TokenType::IntLiteral: + return (SpvWord)tokenReader.ReadInt(); + break; + case Slang::Misc::TokenType::Identifier: + { + if(isGLSLstd450OpcodeAllowed) + { + auto opName = tokenReader.ReadWord(); + GLSLstd450 glslOpcode; + if(!lookupGLSLstd450(opName.getUnownedSlice(), glslOpcode)) + { + throw Misc::TextFormatException( + "Text parsing error: Unrecognized SPIR-V GLSLstd450 opcode: " + opName); + } + printf("BNBBB: %d\n", glslOpcode); + return (SpvWord)glslOpcode; + } + } + // fallthrough + default: + throw Misc::TextFormatException( + "Text parsing error: Failed to read SPIR-V ExtInst Opcode"); + } + }; while (insideOperandList) { ASMOperand operand = {ASMOperandType::SpvWord, 0, 0, 0}; @@ -115,14 +166,16 @@ RefPtr SpvSnippet::parse(UnownedStringSlice definition) { operand.type = SpvSnippet::ASMOperandType::GLSL450ExtInstSet; inst.operands.add(operand); + // Allow the next token to be parsed as a glslsstd450 opcode + isGLSLstd450OpcodeAllowed = isExtInst; } else if (identifier == "fi") { operand.type = SpvSnippet::ASMOperandType::FloatIntegerSelection; tokenReader.Read("("); - operand.content = (SpvWord)tokenReader.ReadInt(); + operand.content = readExtInstOpcode(); tokenReader.Read(","); - operand.content2 = (SpvWord)tokenReader.ReadInt(); + operand.content2 = readExtInstOpcode(); tokenReader.Read(")"); inst.operands.add(operand); } @@ -130,11 +183,11 @@ RefPtr SpvSnippet::parse(UnownedStringSlice definition) { operand.type = SpvSnippet::ASMOperandType::FloatUnsignedSignedSelection; tokenReader.Read("("); - operand.content = (SpvWord)tokenReader.ReadInt(); + operand.content = readExtInstOpcode(); tokenReader.Read(","); - operand.content2 = (SpvWord)tokenReader.ReadInt(); + operand.content2 = readExtInstOpcode(); tokenReader.Read(","); - operand.content3 = (SpvWord)tokenReader.ReadInt(); + operand.content3 = readExtInstOpcode(); tokenReader.Read(")"); inst.operands.add(operand); } @@ -183,6 +236,14 @@ RefPtr SpvSnippet::parse(UnownedStringSlice definition) operand.content = (SpvWord)(snippet->constants.getCount() - 1); inst.operands.add(operand); } + else if(isGLSLstd450OpcodeAllowed) + { + GLSLstd450 glslstd450Opcode; + lookupGLSLstd450(identifier.getUnownedSlice(), glslstd450Opcode); + operand.type = SpvSnippet::ASMOperandType::SpvWord; + operand.content = (SpvWord)glslstd450Opcode; + inst.operands.add(operand); + } else { SLANG_ASSERT(!"Invalid SPV ASM operand."); diff --git a/source/slang/slang-lookup-glslstd450.cpp b/source/slang/slang-lookup-glslstd450.cpp new file mode 100644 index 000000000..46d683dbb --- /dev/null +++ b/source/slang/slang-lookup-glslstd450.cpp @@ -0,0 +1,137 @@ +// Hash function for GLSLstd450 +// +// This file was thoughtfully generated by a machine, +// don't even think about modifying it yourself! +// + +#include "../core/slang-common.h" +#include "../core/slang-string.h" +#include "spirv/unified1/GLSL.std.450.h" + + +namespace Slang +{ + +static const unsigned tableSalt[81] ={ + 2, 1, 5, 1, 1, 0, 1, 0, 3, 0, 3, 0, 0, 4, 6, 3, + 7, 8, 10, 32, 0, 0, 0, 1, 0, 21, 1, 0, 0, 66, 1, 18, + 2, 0, 0, 2, 0, 1, 0, 0, 3, 1, 1, 0, 0, 0, 0, 1, + 4, 2, 2, 0, 2, 0, 0, 2, 0, 2, 3, 0, 0, 1, 5, 4, + 0, 0, 0, 5, 4, 2, 1, 1, 0, 7, 5, 0, 14, 4, 10, 4, + 5 +}; + +struct KV +{ + const char* name; + GLSLstd450 value; +}; + +static const KV words[81] = +{ + {"FindSMsb", GLSLstd450FindSMsb}, + {"SClamp", GLSLstd450SClamp}, + {"UnpackHalf2x16", GLSLstd450UnpackHalf2x16}, + {"Normalize", GLSLstd450Normalize}, + {"Pow", GLSLstd450Pow}, + {"Ceil", GLSLstd450Ceil}, + {"InterpolateAtSample", GLSLstd450InterpolateAtSample}, + {"Cosh", GLSLstd450Cosh}, + {"SMax", GLSLstd450SMax}, + {"PackUnorm2x16", GLSLstd450PackUnorm2x16}, + {"ModfStruct", GLSLstd450ModfStruct}, + {"IMix", GLSLstd450IMix}, + {"Ldexp", GLSLstd450Ldexp}, + {"Atan", GLSLstd450Atan}, + {"Round", GLSLstd450Round}, + {"Cos", GLSLstd450Cos}, + {"UMin", GLSLstd450UMin}, + {"FClamp", GLSLstd450FClamp}, + {"PackHalf2x16", GLSLstd450PackHalf2x16}, + {"SAbs", GLSLstd450SAbs}, + {"FindUMsb", GLSLstd450FindUMsb}, + {"PackUnorm4x8", GLSLstd450PackUnorm4x8}, + {"UnpackDouble2x32", GLSLstd450UnpackDouble2x32}, + {"Fma", GLSLstd450Fma}, + {"RoundEven", GLSLstd450RoundEven}, + {"SmoothStep", GLSLstd450SmoothStep}, + {"Refract", GLSLstd450Refract}, + {"UnpackUnorm4x8", GLSLstd450UnpackUnorm4x8}, + {"NClamp", GLSLstd450NClamp}, + {"Trunc", GLSLstd450Trunc}, + {"Sin", GLSLstd450Sin}, + {"Asinh", GLSLstd450Asinh}, + {"Atanh", GLSLstd450Atanh}, + {"Length", GLSLstd450Length}, + {"Fract", GLSLstd450Fract}, + {"Asin", GLSLstd450Asin}, + {"Determinant", GLSLstd450Determinant}, + {"Floor", GLSLstd450Floor}, + {"SMin", GLSLstd450SMin}, + {"MatrixInverse", GLSLstd450MatrixInverse}, + {"Exp2", GLSLstd450Exp2}, + {"PackSnorm2x16", GLSLstd450PackSnorm2x16}, + {"FindILsb", GLSLstd450FindILsb}, + {"FMax", GLSLstd450FMax}, + {"NMin", GLSLstd450NMin}, + {"Frexp", GLSLstd450Frexp}, + {"InverseSqrt", GLSLstd450InverseSqrt}, + {"Atan2", GLSLstd450Atan2}, + {"InterpolateAtCentroid", GLSLstd450InterpolateAtCentroid}, + {"UClamp", GLSLstd450UClamp}, + {"FMix", GLSLstd450FMix}, + {"FaceForward", GLSLstd450FaceForward}, + {"Tan", GLSLstd450Tan}, + {"Modf", GLSLstd450Modf}, + {"Exp", GLSLstd450Exp}, + {"PackSnorm4x8", GLSLstd450PackSnorm4x8}, + {"UnpackUnorm2x16", GLSLstd450UnpackUnorm2x16}, + {"UMax", GLSLstd450UMax}, + {"FSign", GLSLstd450FSign}, + {"Distance", GLSLstd450Distance}, + {"UnpackSnorm2x16", GLSLstd450UnpackSnorm2x16}, + {"Log", GLSLstd450Log}, + {"PackDouble2x32", GLSLstd450PackDouble2x32}, + {"Sinh", GLSLstd450Sinh}, + {"UnpackSnorm4x8", GLSLstd450UnpackSnorm4x8}, + {"Cross", GLSLstd450Cross}, + {"NMax", GLSLstd450NMax}, + {"Acosh", GLSLstd450Acosh}, + {"Reflect", GLSLstd450Reflect}, + {"Degrees", GLSLstd450Degrees}, + {"Acos", GLSLstd450Acos}, + {"Radians", GLSLstd450Radians}, + {"Sqrt", GLSLstd450Sqrt}, + {"Tanh", GLSLstd450Tanh}, + {"InterpolateAtOffset", GLSLstd450InterpolateAtOffset}, + {"Step", GLSLstd450Step}, + {"FAbs", GLSLstd450FAbs}, + {"FrexpStruct", GLSLstd450FrexpStruct}, + {"Log2", GLSLstd450Log2}, + {"SSign", GLSLstd450SSign}, + {"FMin", GLSLstd450FMin}, +}; + +static UInt32 hash(const UnownedStringSlice& str, UInt32 salt) +{ + UInt64 h = salt; + for(const char c : str) + h = ((h * 0x00000100000001B3) ^ c); + return h % (sizeof(tableSalt)/sizeof(tableSalt[0])); +} + +bool lookupGLSLstd450(const UnownedStringSlice& str, GLSLstd450& value) +{ + const auto i = hash(str, tableSalt[hash(str, 0)]); + if(str == words[i].name) + { + value = words[i].value; + return true; + } + else + { + return false; + } +} + +} diff --git a/source/slang/slang-lookup-spirv.h b/source/slang/slang-lookup-spirv.h new file mode 100644 index 000000000..bc8dfb5a4 --- /dev/null +++ b/source/slang/slang-lookup-spirv.h @@ -0,0 +1,10 @@ +#include "../core/slang-string.h" + +#include "spirv/unified1/spirv.h" +#include "spirv/unified1/GLSL.std.450.h" + +namespace Slang +{ +bool lookupSpvOp(const UnownedStringSlice& str, SpvOp& value); +bool lookupGLSLstd450(const UnownedStringSlice& str, GLSLstd450& value); +} diff --git a/source/slang/slang-lookup-spvop.cpp b/source/slang/slang-lookup-spvop.cpp new file mode 100644 index 000000000..545229eed --- /dev/null +++ b/source/slang/slang-lookup-spvop.cpp @@ -0,0 +1,762 @@ +// Hash function for SpvOp +// +// This file was thoughtfully generated by a machine, +// don't even think about modifying it yourself! +// + +#include "../core/slang-common.h" +#include "../core/slang-string.h" +#include "spirv/unified1/spirv.h" + + +namespace Slang +{ + +static const unsigned tableSalt[670] ={ + 0, 2, 4, 0, 0, 0, 4, 5, 10, 7, 0, 5, 0, 2, 24, 1, + 0, 6, 8, 7, 0, 0, 2, 1, 23, 23, 5, 0, 0, 1, 0, 0, + 5, 0, 0, 1, 0, 10, 6, 1, 9, 6, 0, 0, 0, 12, 0, 20, + 7, 1, 0, 1, 0, 1, 0, 1, 18, 2, 3, 3, 0, 2, 9, 0, + 3, 0, 0, 4, 0, 9, 9, 0, 0, 2, 11, 0, 10, 13, 13, 0, + 0, 0, 38, 23, 0, 16, 7, 1, 1, 7, 63, 15, 5, 16, 12, 9, + 30, 0, 6, 10, 2, 22, 0, 1, 3, 2, 3, 0, 6, 0, 0, 3, + 0, 4, 1, 0, 1, 5, 23, 0, 0, 0, 0, 13, 9, 0, 1, 1, + 1, 2, 0, 5, 1, 5, 4, 1, 5, 8, 10, 3, 3, 10, 4, 2, + 0, 0, 5, 8, 1, 15, 7, 0, 0, 18, 5, 2, 0, 0, 0, 1, + 1, 1, 0, 0, 1, 7, 1, 22, 4, 0, 8, 4, 5, 11, 0, 7, + 0, 1, 3, 0, 4, 1, 8, 1, 2, 2, 0, 1, 0, 2, 0, 3, + 0, 2, 0, 0, 8, 0, 1, 0, 3, 0, 27, 15, 0, 1, 7, 7, + 5, 1, 1, 6, 1, 1, 22, 5, 9, 4, 0, 2, 1, 0, 70, 1, + 0, 4, 4, 0, 4, 0, 76, 0, 0, 36, 0, 0, 44, 80, 0, 1, + 8, 3, 2, 1, 4, 1, 0, 66, 0, 0, 5, 2, 2, 56, 281, 7, + 31, 15, 0, 0, 1, 2, 19, 1, 72, 6, 4, 40, 6, 1, 220, 0, + 0, 3, 104, 222, 2, 333, 0, 0, 2, 7, 7, 11, 28, 0, 19, 563, + 138, 0, 0, 1, 1, 2, 0, 0, 3, 21, 0, 0, 0, 0, 15, 23, + 4, 0, 6, 2, 179, 26, 1, 1, 0, 3, 2, 5, 0, 1, 1, 2, + 1, 1, 3, 7, 7, 1, 5, 1, 3, 1, 1, 0, 2, 4, 5, 1, + 0, 0, 3, 0, 1, 1, 0, 0, 2, 2, 1, 2, 0, 3, 3, 2, + 0, 0, 0, 0, 1, 3, 0, 3, 0, 0, 0, 0, 5, 1, 0, 0, + 1, 1, 1, 1, 0, 2, 0, 0, 1, 0, 4, 3, 2, 3, 2, 0, + 1, 1, 5, 3, 0, 1, 0, 2, 2, 1, 2, 7, 0, 1, 0, 0, + 3, 7, 2, 0, 8, 1, 9, 0, 3, 1, 1, 1, 0, 6, 0, 1, + 3, 15, 0, 0, 0, 3, 0, 0, 1, 1, 12, 9, 1, 1, 7, 12, + 0, 0, 2, 3, 3, 0, 0, 24, 1, 9, 1, 1, 0, 3, 9, 1, + 4, 0, 0, 0, 0, 3, 2, 0, 1, 3, 0, 2, 2, 0, 2, 0, + 17, 4, 0, 1, 1, 2, 0, 0, 0, 4, 0, 1, 2, 6, 0, 1, + 1, 0, 1, 0, 5, 0, 0, 0, 0, 1, 7, 2, 0, 5, 3, 0, + 1, 4, 0, 0, 12, 4, 1, 0, 2, 0, 0, 3, 2, 8, 3, 0, + 0, 6, 3, 0, 1, 7, 1, 1, 0, 0, 1, 0, 3, 20, 1, 1, + 1, 0, 2, 0, 5, 0, 2, 0, 0, 1, 1, 1, 1, 5, 1, 4, + 0, 0, 6, 12, 0, 0, 3, 3, 0, 0, 0, 0, 0, 9, 4, 4, + 0, 2, 0, 5, 2, 0, 2, 0, 4, 1, 0, 5, 16, 3, 0, 1, + 0, 1, 0, 0, 0, 3, 0, 2, 6, 2, 12, 0, 16, 0, 1, 2, + 3, 0, 2, 12, 3, 2, 0, 1, 0, 0, 1, 2, 0, 1, 1, 0, + 1, 1, 1, 4, 0, 1, 0, 4, 0, 3, 5, 0, 1, 1, 3, 2, + 0, 0, 3, 14, 2, 0, 0, 0, 3, 8, 1, 2, 1, 2, 1, 3, + 1, 0, 3, 2, 1, 0, 1, 3, 1, 1, 0, 3, 2, 0, 0, 0, + 3, 0, 1, 0, 9, 4, 2, 0, 1, 8, 5, 5, 0, 0 +}; + +struct KV +{ + const char* name; + SpvOp value; +}; + +static const KV words[670] = +{ + {"OpAtomicOr", SpvOpAtomicOr}, + {"OpIsValidReserveId", SpvOpIsValidReserveId}, + {"OpSubgroupAnyKHR", SpvOpSubgroupAnyKHR}, + {"OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL", SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL}, + {"OpSubgroupAvcRefEvaluateWithDualReferenceINTEL", SpvOpSubgroupAvcRefEvaluateWithDualReferenceINTEL}, + {"OpSubgroupAvcFmeInitializeINTEL", SpvOpSubgroupAvcFmeInitializeINTEL}, + {"OpCompositeInsert", SpvOpCompositeInsert}, + {"OpPtrAccessChain", SpvOpPtrAccessChain}, + {"OpConvertSampledImageToUNV", SpvOpConvertSampledImageToUNV}, + {"OpReadPipeBlockingINTEL", SpvOpReadPipeBlockingINTEL}, + {"OpAtomicIIncrement", SpvOpAtomicIIncrement}, + {"OpBitFieldSExtract", SpvOpBitFieldSExtract}, + {"OpUnordered", SpvOpUnordered}, + {"OpArbitraryFloatAddINTEL", SpvOpArbitraryFloatAddINTEL}, + {"OpLoopMerge", SpvOpLoopMerge}, + {"OpAsmTargetINTEL", SpvOpAsmTargetINTEL}, + {"OpConstantSampler", SpvOpConstantSampler}, + {"OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL", SpvOpSubgroupAvcImeStripSingleReferenceStreamoutINTEL}, + {"OpFOrdNotEqual", SpvOpFOrdNotEqual}, + {"OpRayQueryGetIntersectionCandidateAABBOpaqueKHR", SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR}, + {"OpBuildNDRange", SpvOpBuildNDRange}, + {"OpUndef", SpvOpUndef}, + {"OpConvertPtrToU", SpvOpConvertPtrToU}, + {"OpGroupLogicalOrKHR", SpvOpGroupLogicalOrKHR}, + {"OpNamedBarrierInitialize", SpvOpNamedBarrierInitialize}, + {"OpConstantComposite", SpvOpConstantComposite}, + {"OpImageSparseSampleProjDrefExplicitLod", SpvOpImageSparseSampleProjDrefExplicitLod}, + {"OpSGreaterThanEqual", SpvOpSGreaterThanEqual}, + {"OpBitwiseAnd", SpvOpBitwiseAnd}, + {"OpRayQueryGetIntersectionBarycentricsKHR", SpvOpRayQueryGetIntersectionBarycentricsKHR}, + {"OpULessThan", SpvOpULessThan}, + {"OpUnreachable", SpvOpUnreachable}, + {"OpSubgroupAvcRefConvertToMceResultINTEL", SpvOpSubgroupAvcRefConvertToMceResultINTEL}, + {"OpSubgroupAvcMceConvertToImePayloadINTEL", SpvOpSubgroupAvcMceConvertToImePayloadINTEL}, + {"OpFunctionEnd", SpvOpFunctionEnd}, + {"OpTypeAccelerationStructureNV", SpvOpTypeAccelerationStructureNV}, + {"OpRayQueryConfirmIntersectionKHR", SpvOpRayQueryConfirmIntersectionKHR}, + {"OpFConvert", SpvOpFConvert}, + {"OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL", SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL}, + {"OpIsInf", SpvOpIsInf}, + {"OpGroupCommitReadPipe", SpvOpGroupCommitReadPipe}, + {"OpReadClockKHR", SpvOpReadClockKHR}, + {"OpSubgroupReadInvocationKHR", SpvOpSubgroupReadInvocationKHR}, + {"OpFDiv", SpvOpFDiv}, + {"OpSubgroupAvcMceConvertToImeResultINTEL", SpvOpSubgroupAvcMceConvertToImeResultINTEL}, + {"OpSubgroupAvcImeAdjustRefOffsetINTEL", SpvOpSubgroupAvcImeAdjustRefOffsetINTEL}, + {"OpArbitraryFloatHypotINTEL", SpvOpArbitraryFloatHypotINTEL}, + {"OpFragmentFetchAMD", SpvOpFragmentFetchAMD}, + {"OpISub", SpvOpISub}, + {"OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL", SpvOpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL}, + {"OpEnqueueMarker", SpvOpEnqueueMarker}, + {"OpGroupUMinNonUniformAMD", SpvOpGroupUMinNonUniformAMD}, + {"OpImageQueryLevels", SpvOpImageQueryLevels}, + {"OpIMul", SpvOpIMul}, + {"OpRayQueryGetWorldRayDirectionKHR", SpvOpRayQueryGetWorldRayDirectionKHR}, + {"OpAtomicIAdd", SpvOpAtomicIAdd}, + {"OpGroupNonUniformSMin", SpvOpGroupNonUniformSMin}, + {"OpISubSatINTEL", SpvOpISubSatINTEL}, + {"OpTypePipeStorage", SpvOpTypePipeStorage}, + {"OpGroupNonUniformAllEqual", SpvOpGroupNonUniformAllEqual}, + {"OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL", SpvOpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL}, + {"OpTypeDeviceEvent", SpvOpTypeDeviceEvent}, + {"OpGroupFMax", SpvOpGroupFMax}, + {"OpGroupNonUniformBroadcast", SpvOpGroupNonUniformBroadcast}, + {"OpGroupNonUniformUMax", SpvOpGroupNonUniformUMax}, + {"OpSubgroupAvcRefSetBidirectionalMixDisableINTEL", SpvOpSubgroupAvcRefSetBidirectionalMixDisableINTEL}, + {"OpTypeAvcMcePayloadINTEL", SpvOpTypeAvcMcePayloadINTEL}, + {"OpSubgroupAvcSicGetPackedIpeLumaModesINTEL", SpvOpSubgroupAvcSicGetPackedIpeLumaModesINTEL}, + {"OpFSub", SpvOpFSub}, + {"OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL", SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL}, + {"OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL}, + {"OpGroupNonUniformBroadcastFirst", SpvOpGroupNonUniformBroadcastFirst}, + {"OpGroupReserveReadPipePackets", SpvOpGroupReserveReadPipePackets}, + {"OpRayQueryProceedKHR", SpvOpRayQueryProceedKHR}, + {"OpExecutionModeId", SpvOpExecutionModeId}, + {"OpCapability", SpvOpCapability}, + {"OpDPdyFine", SpvOpDPdyFine}, + {"OpDot", SpvOpDot}, + {"OpFragmentMaskFetchAMD", SpvOpFragmentMaskFetchAMD}, + {"OpGroupReserveWritePipePackets", SpvOpGroupReserveWritePipePackets}, + {"OpArbitraryFloatGTINTEL", SpvOpArbitraryFloatGTINTEL}, + {"OpFixedRecipINTEL", SpvOpFixedRecipINTEL}, + {"OpArbitraryFloatExp10INTEL", SpvOpArbitraryFloatExp10INTEL}, + {"OpWritePipe", SpvOpWritePipe}, + {"OpReserveReadPipePackets", SpvOpReserveReadPipePackets}, + {"OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL", SpvOpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL}, + {"OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL}, + {"OpRestoreMemoryINTEL", SpvOpRestoreMemoryINTEL}, + {"OpLine", SpvOpLine}, + {"OpGroupNonUniformQuadSwap", SpvOpGroupNonUniformQuadSwap}, + {"OpTypeArray", SpvOpTypeArray}, + {"OpRayQueryGetIntersectionInstanceCustomIndexKHR", SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR}, + {"OpFMod", SpvOpFMod}, + {"OpLifetimeStart", SpvOpLifetimeStart}, + {"OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL", SpvOpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL}, + {"OpArbitraryFloatCosINTEL", SpvOpArbitraryFloatCosINTEL}, + {"OpSelect", SpvOpSelect}, + {"OpUCountLeadingZerosINTEL", SpvOpUCountLeadingZerosINTEL}, + {"OpAliasDomainDeclINTEL", SpvOpAliasDomainDeclINTEL}, + {"OpConstantCompositeContinuedINTEL", SpvOpConstantCompositeContinuedINTEL}, + {"OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL", SpvOpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL}, + {"OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL", SpvOpSubgroupAvcMceSetMotionVectorCostFunctionINTEL}, + {"OpCommitWritePipe", SpvOpCommitWritePipe}, + {"OpLogicalOr", SpvOpLogicalOr}, + {"OpAtomicUMax", SpvOpAtomicUMax}, + {"OpRayQueryGetIntersectionTypeKHR", SpvOpRayQueryGetIntersectionTypeKHR}, + {"OpSLessThanEqual", SpvOpSLessThanEqual}, + {"OpSubgroupBallotKHR", SpvOpSubgroupBallotKHR}, + {"OpVectorShuffle", SpvOpVectorShuffle}, + {"OpReturnValue", SpvOpReturnValue}, + {"OpTypeForwardPointer", SpvOpTypeForwardPointer}, + {"OpArrayLength", SpvOpArrayLength}, + {"OpSubgroupAllKHR", SpvOpSubgroupAllKHR}, + {"OpMatrixTimesVector", SpvOpMatrixTimesVector}, + {"OpGroupNonUniformAny", SpvOpGroupNonUniformAny}, + {"OpUSubSatINTEL", SpvOpUSubSatINTEL}, + {"OpUGreaterThanEqual", SpvOpUGreaterThanEqual}, + {"OpIEqual", SpvOpIEqual}, + {"OpCompositeExtract", SpvOpCompositeExtract}, + {"OpSetMeshOutputsEXT", SpvOpSetMeshOutputsEXT}, + {"OpDPdxFine", SpvOpDPdxFine}, + {"OpArbitraryFloatLog2INTEL", SpvOpArbitraryFloatLog2INTEL}, + {"OpCommitReadPipe", SpvOpCommitReadPipe}, + {"OpTypeAvcImeDualReferenceStreaminINTEL", SpvOpTypeAvcImeDualReferenceStreaminINTEL}, + {"OpGroupNonUniformLogicalAnd", SpvOpGroupNonUniformLogicalAnd}, + {"OpAtomicUMin", SpvOpAtomicUMin}, + {"OpPtrEqual", SpvOpPtrEqual}, + {"OpAtomicFMinEXT", SpvOpAtomicFMinEXT}, + {"OpUDotAccSatKHR", SpvOpUDotAccSatKHR}, + {"OpExecuteCallableKHR", SpvOpExecuteCallableKHR}, + {"OpIsHelperInvocationEXT", SpvOpIsHelperInvocationEXT}, + {"OpRayQueryGetIntersectionPrimitiveIndexKHR", SpvOpRayQueryGetIntersectionPrimitiveIndexKHR}, + {"OpTypeAvcSicResultINTEL", SpvOpTypeAvcSicResultINTEL}, + {"OpExtInst", SpvOpExtInst}, + {"OpUMulExtended", SpvOpUMulExtended}, + {"OpLoopControlINTEL", SpvOpLoopControlINTEL}, + {"OpNot", SpvOpNot}, + {"OpCreatePipeFromPipeStorage", SpvOpCreatePipeFromPipeStorage}, + {"OpImageFetch", SpvOpImageFetch}, + {"OpSubgroupAvcSicConfigureIpeLumaChromaINTEL", SpvOpSubgroupAvcSicConfigureIpeLumaChromaINTEL}, + {"OpNop", SpvOpNop}, + {"OpIsNormal", SpvOpIsNormal}, + {"OpArbitraryFloatExpINTEL", SpvOpArbitraryFloatExpINTEL}, + {"OpSubgroupAvcSicConfigureIpeLumaINTEL", SpvOpSubgroupAvcSicConfigureIpeLumaINTEL}, + {"OpShiftRightArithmetic", SpvOpShiftRightArithmetic}, + {"OpUMul32x16INTEL", SpvOpUMul32x16INTEL}, + {"OpIAddSatINTEL", SpvOpIAddSatINTEL}, + {"OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL", SpvOpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL}, + {"OpCopyMemory", SpvOpCopyMemory}, + {"OpGroupSMinNonUniformAMD", SpvOpGroupSMinNonUniformAMD}, + {"OpArbitraryFloatPowNINTEL", SpvOpArbitraryFloatPowNINTEL}, + {"OpAccessChain", SpvOpAccessChain}, + {"OpCooperativeMatrixMulAddNV", SpvOpCooperativeMatrixMulAddNV}, + {"OpGroupNonUniformFMin", SpvOpGroupNonUniformFMin}, + {"OpIsFinite", SpvOpIsFinite}, + {"OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL", SpvOpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL}, + {"OpSubgroupAvcImeGetDualReferenceStreaminINTEL", SpvOpSubgroupAvcImeGetDualReferenceStreaminINTEL}, + {"OpVmeImageINTEL", SpvOpVmeImageINTEL}, + {"OpSubgroupAvcMceGetInterDirectionsINTEL", SpvOpSubgroupAvcMceGetInterDirectionsINTEL}, + {"OpSubgroupImageBlockWriteINTEL", SpvOpSubgroupImageBlockWriteINTEL}, + {"OpArbitraryFloatSubINTEL", SpvOpArbitraryFloatSubINTEL}, + {"OpLogicalEqual", SpvOpLogicalEqual}, + {"OpDecorateString", SpvOpDecorateString}, + {"OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL", SpvOpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL}, + {"OpGroupNonUniformQuadBroadcast", SpvOpGroupNonUniformQuadBroadcast}, + {"OpRayQueryGetWorldRayOriginKHR", SpvOpRayQueryGetWorldRayOriginKHR}, + {"OpCopyMemorySized", SpvOpCopyMemorySized}, + {"OpSubgroupAvcMceSetInterDirectionPenaltyINTEL", SpvOpSubgroupAvcMceSetInterDirectionPenaltyINTEL}, + {"OpLogicalNotEqual", SpvOpLogicalNotEqual}, + {"OpFixedSinINTEL", SpvOpFixedSinINTEL}, + {"OpImageSampleFootprintNV", SpvOpImageSampleFootprintNV}, + {"OpSubgroupBlockReadINTEL", SpvOpSubgroupBlockReadINTEL}, + {"OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL", SpvOpSubgroupAvcImeGetTruncatedSearchIndicationINTEL}, + {"OpOrdered", SpvOpOrdered}, + {"OpImageSampleExplicitLod", SpvOpImageSampleExplicitLod}, + {"OpGroupUMin", SpvOpGroupUMin}, + {"OpFixedSinPiINTEL", SpvOpFixedSinPiINTEL}, + {"OpRayQueryInitializeKHR", SpvOpRayQueryInitializeKHR}, + {"OpTerminateRayKHR", SpvOpTerminateRayKHR}, + {"OpConvertUToSamplerNV", SpvOpConvertUToSamplerNV}, + {"OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL", SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL}, + {"OpAtomicSMax", SpvOpAtomicSMax}, + {"OpBitReverse", SpvOpBitReverse}, + {"OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL}, + {"OpTypeAvcRefResultINTEL", SpvOpTypeAvcRefResultINTEL}, + {"OpTypeBufferSurfaceINTEL", SpvOpTypeBufferSurfaceINTEL}, + {"OpConvertFToS", SpvOpConvertFToS}, + {"OpGetKernelNDrangeSubGroupCount", SpvOpGetKernelNDrangeSubGroupCount}, + {"OpSDotKHR", SpvOpSDotKHR}, + {"OpImageSampleProjImplicitLod", SpvOpImageSampleProjImplicitLod}, + {"OpGenericCastToPtr", SpvOpGenericCastToPtr}, + {"OpRayQueryGetIntersectionObjectRayDirectionKHR", SpvOpRayQueryGetIntersectionObjectRayDirectionKHR}, + {"OpSubgroupAvcSicGetIpeLumaShapeINTEL", SpvOpSubgroupAvcSicGetIpeLumaShapeINTEL}, + {"OpSpecConstantCompositeContinuedINTEL", SpvOpSpecConstantCompositeContinuedINTEL}, + {"OpTraceRayMotionNV", SpvOpTraceRayMotionNV}, + {"OpExecutionMode", SpvOpExecutionMode}, + {"OpDPdyCoarse", SpvOpDPdyCoarse}, + {"OpSubgroupAvcImeSetDualReferenceINTEL", SpvOpSubgroupAvcImeSetDualReferenceINTEL}, + {"OpBranch", SpvOpBranch}, + {"OpSubgroupAvcImeStripDualReferenceStreamoutINTEL", SpvOpSubgroupAvcImeStripDualReferenceStreamoutINTEL}, + {"OpSLessThan", SpvOpSLessThan}, + {"OpUAverageRoundedINTEL", SpvOpUAverageRoundedINTEL}, + {"OpAtomicLoad", SpvOpAtomicLoad}, + {"OpConvertUToF", SpvOpConvertUToF}, + {"OpGroupNonUniformBitwiseXor", SpvOpGroupNonUniformBitwiseXor}, + {"OpSubgroupAvcImeRefWindowSizeINTEL", SpvOpSubgroupAvcImeRefWindowSizeINTEL}, + {"OpSubgroupAvcSicSetBilinearFilterEnableINTEL", SpvOpSubgroupAvcSicSetBilinearFilterEnableINTEL}, + {"OpStore", SpvOpStore}, + {"OpUDotAccSat", SpvOpUDotAccSat}, + {"OpControlBarrierWaitINTEL", SpvOpControlBarrierWaitINTEL}, + {"OpTypeFloat", SpvOpTypeFloat}, + {"OpSubgroupAvcMceConvertToSicPayloadINTEL", SpvOpSubgroupAvcMceConvertToSicPayloadINTEL}, + {"OpGroupAny", SpvOpGroupAny}, + {"OpUAddSatINTEL", SpvOpUAddSatINTEL}, + {"OpTypeStructContinuedINTEL", SpvOpTypeStructContinuedINTEL}, + {"OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL}, + {"OpGroupNonUniformShuffleUp", SpvOpGroupNonUniformShuffleUp}, + {"OpImageSampleDrefExplicitLod", SpvOpImageSampleDrefExplicitLod}, + {"OpSRem", SpvOpSRem}, + {"OpVariableLengthArrayINTEL", SpvOpVariableLengthArrayINTEL}, + {"OpCooperativeMatrixStoreNV", SpvOpCooperativeMatrixStoreNV}, + {"OpSubgroupShuffleDownINTEL", SpvOpSubgroupShuffleDownINTEL}, + {"OpTypeMatrix", SpvOpTypeMatrix}, + {"OpSatConvertUToS", SpvOpSatConvertUToS}, + {"OpImageQueryFormat", SpvOpImageQueryFormat}, + {"OpRayQueryTerminateKHR", SpvOpRayQueryTerminateKHR}, + {"OpPtrNotEqual", SpvOpPtrNotEqual}, + {"OpImageSparseRead", SpvOpImageSparseRead}, + {"OpSubgroupShuffleXorINTEL", SpvOpSubgroupShuffleXorINTEL}, + {"OpGroupDecorate", SpvOpGroupDecorate}, + {"OpSubgroupAvcSicConvertToMceResultINTEL", SpvOpSubgroupAvcSicConvertToMceResultINTEL}, + {"OpTypeAvcMceResultINTEL", SpvOpTypeAvcMceResultINTEL}, + {"OpSubgroupAvcMceGetInterMinorShapeINTEL", SpvOpSubgroupAvcMceGetInterMinorShapeINTEL}, + {"OpINotEqual", SpvOpINotEqual}, + {"OpImageQueryLod", SpvOpImageQueryLod}, + {"OpTypeQueue", SpvOpTypeQueue}, + {"OpSetUserEventStatus", SpvOpSetUserEventStatus}, + {"OpBranchConditional", SpvOpBranchConditional}, + {"OpIgnoreIntersectionNV", SpvOpIgnoreIntersectionNV}, + {"OpVectorExtractDynamic", SpvOpVectorExtractDynamic}, + {"OpImageQuerySizeLod", SpvOpImageQuerySizeLod}, + {"OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL}, + {"OpTypeBool", SpvOpTypeBool}, + {"OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR", SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR}, + {"OpEntryPoint", SpvOpEntryPoint}, + {"OpAtomicCompareExchangeWeak", SpvOpAtomicCompareExchangeWeak}, + {"OpSource", SpvOpSource}, + {"OpEmitStreamVertex", SpvOpEmitStreamVertex}, + {"OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL}, + {"OpSubgroupAvcRefConvertToMcePayloadINTEL", SpvOpSubgroupAvcRefConvertToMcePayloadINTEL}, + {"OpImageSparseTexelsResident", SpvOpImageSparseTexelsResident}, + {"OpImageSparseFetch", SpvOpImageSparseFetch}, + {"OpArbitraryFloatExp2INTEL", SpvOpArbitraryFloatExp2INTEL}, + {"OpCreateUserEvent", SpvOpCreateUserEvent}, + {"OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL", SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL}, + {"OpSubgroupAvcSicEvaluateIpeINTEL", SpvOpSubgroupAvcSicEvaluateIpeINTEL}, + {"OpFixedCosPiINTEL", SpvOpFixedCosPiINTEL}, + {"OpTypeVmeImageINTEL", SpvOpTypeVmeImageINTEL}, + {"OpRayQueryGetRayTMinKHR", SpvOpRayQueryGetRayTMinKHR}, + {"OpName", SpvOpName}, + {"OpIgnoreIntersectionKHR", SpvOpIgnoreIntersectionKHR}, + {"OpArbitraryFloatExpm1INTEL", SpvOpArbitraryFloatExpm1INTEL}, + {"OpAtomicFMaxEXT", SpvOpAtomicFMaxEXT}, + {"OpSDiv", SpvOpSDiv}, + {"OpGroupNonUniformBallotBitExtract", SpvOpGroupNonUniformBallotBitExtract}, + {"OpFUnordNotEqual", SpvOpFUnordNotEqual}, + {"OpGetKernelNDrangeMaxSubGroupSize", SpvOpGetKernelNDrangeMaxSubGroupSize}, + {"OpGetKernelPreferredWorkGroupSizeMultiple", SpvOpGetKernelPreferredWorkGroupSizeMultiple}, + {"OpTypeAvcRefPayloadINTEL", SpvOpTypeAvcRefPayloadINTEL}, + {"OpLogicalAnd", SpvOpLogicalAnd}, + {"OpConvertUToPtr", SpvOpConvertUToPtr}, + {"OpSubgroupShuffleUpINTEL", SpvOpSubgroupShuffleUpINTEL}, + {"OpFUnordLessThanEqual", SpvOpFUnordLessThanEqual}, + {"OpArbitraryFloatSinCosINTEL", SpvOpArbitraryFloatSinCosINTEL}, + {"OpEndPrimitive", SpvOpEndPrimitive}, + {"OpPhi", SpvOpPhi}, + {"OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL}, + {"OpArbitraryFloatATan2INTEL", SpvOpArbitraryFloatATan2INTEL}, + {"OpSubgroupAvcSicGetIpeChromaModeINTEL", SpvOpSubgroupAvcSicGetIpeChromaModeINTEL}, + {"OpAbsISubINTEL", SpvOpAbsISubINTEL}, + {"OpFAdd", SpvOpFAdd}, + {"OpFOrdGreaterThan", SpvOpFOrdGreaterThan}, + {"OpBitCount", SpvOpBitCount}, + {"OpAtomicStore", SpvOpAtomicStore}, + {"OpSizeOf", SpvOpSizeOf}, + {"OpAny", SpvOpAny}, + {"OpGroupFAddNonUniformAMD", SpvOpGroupFAddNonUniformAMD}, + {"OpUDiv", SpvOpUDiv}, + {"OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL", SpvOpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL}, + {"OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL", SpvOpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL}, + {"OpAtomicAnd", SpvOpAtomicAnd}, + {"OpArbitraryFloatCastToIntINTEL", SpvOpArbitraryFloatCastToIntINTEL}, + {"OpRayQueryGetIntersectionGeometryIndexKHR", SpvOpRayQueryGetIntersectionGeometryIndexKHR}, + {"OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL}, + {"OpGetDefaultQueue", SpvOpGetDefaultQueue}, + {"OpSUDotAccSatKHR", SpvOpSUDotAccSatKHR}, + {"OpQuantizeToF16", SpvOpQuantizeToF16}, + {"OpFOrdGreaterThanEqual", SpvOpFOrdGreaterThanEqual}, + {"OpArbitraryFloatEQINTEL", SpvOpArbitraryFloatEQINTEL}, + {"OpImageQueryOrder", SpvOpImageQueryOrder}, + {"OpBitwiseXor", SpvOpBitwiseXor}, + {"OpConstantNull", SpvOpConstantNull}, + {"OpIsValidEvent", SpvOpIsValidEvent}, + {"OpImageTexelPointer", SpvOpImageTexelPointer}, + {"OpTypePipe", SpvOpTypePipe}, + {"OpConstantPipeStorage", SpvOpConstantPipeStorage}, + {"OpSelectionMerge", SpvOpSelectionMerge}, + {"OpGroupUMax", SpvOpGroupUMax}, + {"OpGroupSMaxNonUniformAMD", SpvOpGroupSMaxNonUniformAMD}, + {"OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceINTEL}, + {"OpGroupWaitEvents", SpvOpGroupWaitEvents}, + {"OpFRem", SpvOpFRem}, + {"OpGroupNonUniformBallotBitCount", SpvOpGroupNonUniformBallotBitCount}, + {"OpFwidthCoarse", SpvOpFwidthCoarse}, + {"OpSubgroupFirstInvocationKHR", SpvOpSubgroupFirstInvocationKHR}, + {"OpDPdxCoarse", SpvOpDPdxCoarse}, + {"OpSubgroupAvcMceConvertToRefPayloadINTEL", SpvOpSubgroupAvcMceConvertToRefPayloadINTEL}, + {"OpConvertSamplerToUNV", SpvOpConvertSamplerToUNV}, + {"OpArbitraryFloatLTINTEL", SpvOpArbitraryFloatLTINTEL}, + {"OpLessOrGreater", SpvOpLessOrGreater}, + {"OpSUDotAccSat", SpvOpSUDotAccSat}, + {"OpArbitraryFloatDivINTEL", SpvOpArbitraryFloatDivINTEL}, + {"OpExtension", SpvOpExtension}, + {"OpSubgroupAvcMceConvertToSicResultINTEL", SpvOpSubgroupAvcMceConvertToSicResultINTEL}, + {"OpGroupNonUniformBallot", SpvOpGroupNonUniformBallot}, + {"OpArbitraryFloatCastINTEL", SpvOpArbitraryFloatCastINTEL}, + {"OpExtInstImport", SpvOpExtInstImport}, + {"OpCopyObject", SpvOpCopyObject}, + {"OpGroupAsyncCopy", SpvOpGroupAsyncCopy}, + {"OpSubgroupAvcSicInitializeINTEL", SpvOpSubgroupAvcSicInitializeINTEL}, + {"OpSubgroupAvcImeConvertToMcePayloadINTEL", SpvOpSubgroupAvcImeConvertToMcePayloadINTEL}, + {"OpEndStreamPrimitive", SpvOpEndStreamPrimitive}, + {"OpArbitraryFloatLEINTEL", SpvOpArbitraryFloatLEINTEL}, + {"OpSMod", SpvOpSMod}, + {"OpMemberDecorateString", SpvOpMemberDecorateString}, + {"OpGroupIAddNonUniformAMD", SpvOpGroupIAddNonUniformAMD}, + {"OpUGreaterThan", SpvOpUGreaterThan}, + {"OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL}, + {"OpOuterProduct", SpvOpOuterProduct}, + {"OpSubgroupAvcMceConvertToRefResultINTEL", SpvOpSubgroupAvcMceConvertToRefResultINTEL}, + {"OpGroupBitwiseXorKHR", SpvOpGroupBitwiseXorKHR}, + {"OpBeginInvocationInterlockEXT", SpvOpBeginInvocationInterlockEXT}, + {"OpAtomicSMin", SpvOpAtomicSMin}, + {"OpArbitraryFloatLog1pINTEL", SpvOpArbitraryFloatLog1pINTEL}, + {"OpMemoryModel", SpvOpMemoryModel}, + {"OpTypeInt", SpvOpTypeInt}, + {"OpReportIntersectionNV", SpvOpReportIntersectionNV}, + {"OpDecorateStringGOOGLE", SpvOpDecorateStringGOOGLE}, + {"OpControlBarrier", SpvOpControlBarrier}, + {"OpSubgroupAvcSicConfigureSkcINTEL", SpvOpSubgroupAvcSicConfigureSkcINTEL}, + {"OpImageSampleImplicitLod", SpvOpImageSampleImplicitLod}, + {"OpSwitch", SpvOpSwitch}, + {"OpSDot", SpvOpSDot}, + {"OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL", SpvOpSubgroupAvcRefEvaluateWithMultiReferenceINTEL}, + {"OpDemoteToHelperInvocationEXT", SpvOpDemoteToHelperInvocationEXT}, + {"OpSUDot", SpvOpSUDot}, + {"OpSDotAccSat", SpvOpSDotAccSat}, + {"OpGetKernelWorkGroupSize", SpvOpGetKernelWorkGroupSize}, + {"OpGroupNonUniformBallotFindLSB", SpvOpGroupNonUniformBallotFindLSB}, + {"OpFwidthFine", SpvOpFwidthFine}, + {"OpReserveWritePipePackets", SpvOpReserveWritePipePackets}, + {"OpConstantFalse", SpvOpConstantFalse}, + {"OpCooperativeMatrixLengthNV", SpvOpCooperativeMatrixLengthNV}, + {"OpFixedExpINTEL", SpvOpFixedExpINTEL}, + {"OpArbitraryFloatASinPiINTEL", SpvOpArbitraryFloatASinPiINTEL}, + {"OpEnqueueKernel", SpvOpEnqueueKernel}, + {"OpVectorInsertDynamic", SpvOpVectorInsertDynamic}, + {"OpBitFieldInsert", SpvOpBitFieldInsert}, + {"OpSubgroupAvcMceGetInterMajorShapeINTEL", SpvOpSubgroupAvcMceGetInterMajorShapeINTEL}, + {"OpGroupNonUniformAll", SpvOpGroupNonUniformAll}, + {"OpRayQueryGetIntersectionWorldToObjectKHR", SpvOpRayQueryGetIntersectionWorldToObjectKHR}, + {"OpMatrixTimesScalar", SpvOpMatrixTimesScalar}, + {"OpFixedCosINTEL", SpvOpFixedCosINTEL}, + {"OpWritePackedPrimitiveIndices4x8NV", SpvOpWritePackedPrimitiveIndices4x8NV}, + {"OpDemoteToHelperInvocation", SpvOpDemoteToHelperInvocation}, + {"OpSubgroupImageBlockReadINTEL", SpvOpSubgroupImageBlockReadINTEL}, + {"OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL}, + {"OpDecorationGroup", SpvOpDecorationGroup}, + {"OpReturn", SpvOpReturn}, + {"OpArbitraryFloatACosINTEL", SpvOpArbitraryFloatACosINTEL}, + {"OpSubgroupAvcSicConvertToMcePayloadINTEL", SpvOpSubgroupAvcSicConvertToMcePayloadINTEL}, + {"OpTranspose", SpvOpTranspose}, + {"OpImageSparseSampleProjImplicitLod", SpvOpImageSparseSampleProjImplicitLod}, + {"OpKill", SpvOpKill}, + {"OpTraceRayKHR", SpvOpTraceRayKHR}, + {"OpArbitraryFloatSinPiINTEL", SpvOpArbitraryFloatSinPiINTEL}, + {"OpGroupNonUniformBallotFindMSB", SpvOpGroupNonUniformBallotFindMSB}, + {"OpTraceMotionNV", SpvOpTraceMotionNV}, + {"OpGroupNonUniformSMax", SpvOpGroupNonUniformSMax}, + {"OpFunctionParameter", SpvOpFunctionParameter}, + {"OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL", SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL}, + {"OpGroupAll", SpvOpGroupAll}, + {"OpTypeOpaque", SpvOpTypeOpaque}, + {"OpConstant", SpvOpConstant}, + {"OpPtrCastToGeneric", SpvOpPtrCastToGeneric}, + {"OpUConvert", SpvOpUConvert}, + {"OpArbitraryFloatRecipINTEL", SpvOpArbitraryFloatRecipINTEL}, + {"OpIsNan", SpvOpIsNan}, + {"OpImageRead", SpvOpImageRead}, + {"OpReleaseEvent", SpvOpReleaseEvent}, + {"OpTypeFunction", SpvOpTypeFunction}, + {"OpFwidth", SpvOpFwidth}, + {"OpSourceExtension", SpvOpSourceExtension}, + {"OpGetNumPipePackets", SpvOpGetNumPipePackets}, + {"OpBitwiseOr", SpvOpBitwiseOr}, + {"OpLifetimeStop", SpvOpLifetimeStop}, + {"OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL", SpvOpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL}, + {"OpSourceContinued", SpvOpSourceContinued}, + {"OpAsmCallINTEL", SpvOpAsmCallINTEL}, + {"OpGroupNonUniformShuffleXor", SpvOpGroupNonUniformShuffleXor}, + {"OpArbitraryFloatGEINTEL", SpvOpArbitraryFloatGEINTEL}, + {"OpImageSparseSampleProjDrefImplicitLod", SpvOpImageSparseSampleProjDrefImplicitLod}, + {"OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL}, + {"OpArbitraryFloatASinINTEL", SpvOpArbitraryFloatASinINTEL}, + {"OpFUnordEqual", SpvOpFUnordEqual}, + {"OpGroupNonUniformElect", SpvOpGroupNonUniformElect}, + {"OpArbitraryFloatATanINTEL", SpvOpArbitraryFloatATanINTEL}, + {"OpFOrdEqual", SpvOpFOrdEqual}, + {"OpGroupFAdd", SpvOpGroupFAdd}, + {"OpTypeRuntimeArray", SpvOpTypeRuntimeArray}, + {"OpUAverageINTEL", SpvOpUAverageINTEL}, + {"OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL}, + {"OpGroupFMinNonUniformAMD", SpvOpGroupFMinNonUniformAMD}, + {"OpAll", SpvOpAll}, + {"OpReservedReadPipe", SpvOpReservedReadPipe}, + {"OpImageSparseGather", SpvOpImageSparseGather}, + {"OpSpecConstantOp", SpvOpSpecConstantOp}, + {"OpString", SpvOpString}, + {"OpExpectKHR", SpvOpExpectKHR}, + {"OpVectorTimesScalar", SpvOpVectorTimesScalar}, + {"OpGroupNonUniformInverseBallot", SpvOpGroupNonUniformInverseBallot}, + {"OpGroupNonUniformIMul", SpvOpGroupNonUniformIMul}, + {"OpFixedSqrtINTEL", SpvOpFixedSqrtINTEL}, + {"OpSubgroupAvcImeInitializeINTEL", SpvOpSubgroupAvcImeInitializeINTEL}, + {"OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL", SpvOpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL}, + {"OpArbitraryFloatACosPiINTEL", SpvOpArbitraryFloatACosPiINTEL}, + {"OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL}, + {"OpTerminateInvocation", SpvOpTerminateInvocation}, + {"OpGroupBroadcast", SpvOpGroupBroadcast}, + {"OpTypePointer", SpvOpTypePointer}, + {"OpTypeRayQueryKHR", SpvOpTypeRayQueryKHR}, + {"OpGenericCastToPtrExplicit", SpvOpGenericCastToPtrExplicit}, + {"OpEndInvocationInterlockEXT", SpvOpEndInvocationInterlockEXT}, + {"OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL", SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL}, + {"OpSubgroupAvcImeSetMaxMotionVectorCountINTEL", SpvOpSubgroupAvcImeSetMaxMotionVectorCountINTEL}, + {"OpTypeImage", SpvOpTypeImage}, + {"OpSubgroupAvcImeGetSingleReferenceStreaminINTEL", SpvOpSubgroupAvcImeGetSingleReferenceStreaminINTEL}, + {"OpGroupCommitWritePipe", SpvOpGroupCommitWritePipe}, + {"OpSGreaterThan", SpvOpSGreaterThan}, + {"OpDecorate", SpvOpDecorate}, + {"OpLabel", SpvOpLabel}, + {"OpFUnordGreaterThan", SpvOpFUnordGreaterThan}, + {"OpArbitraryFloatMulINTEL", SpvOpArbitraryFloatMulINTEL}, + {"OpTypeAvcImeResultDualReferenceStreamoutINTEL", SpvOpTypeAvcImeResultDualReferenceStreamoutINTEL}, + {"OpGroupSMin", SpvOpGroupSMin}, + {"OpConstantTrue", SpvOpConstantTrue}, + {"OpMatrixTimesMatrix", SpvOpMatrixTimesMatrix}, + {"OpGetKernelLocalSizeForSubgroupCount", SpvOpGetKernelLocalSizeForSubgroupCount}, + {"OpGroupFMulKHR", SpvOpGroupFMulKHR}, + {"OpSpecConstantFalse", SpvOpSpecConstantFalse}, + {"OpGroupNonUniformRotateKHR", SpvOpGroupNonUniformRotateKHR}, + {"OpAtomicFlagTestAndSet", SpvOpAtomicFlagTestAndSet}, + {"OpSDotAccSatKHR", SpvOpSDotAccSatKHR}, + {"OpVariable", SpvOpVariable}, + {"OpSpecConstantComposite", SpvOpSpecConstantComposite}, + {"OpGroupSMax", SpvOpGroupSMax}, + {"OpInBoundsAccessChain", SpvOpInBoundsAccessChain}, + {"OpFOrdLessThanEqual", SpvOpFOrdLessThanEqual}, + {"OpUCountTrailingZerosINTEL", SpvOpUCountTrailingZerosINTEL}, + {"OpTypeStruct", SpvOpTypeStruct}, + {"OpFNegate", SpvOpFNegate}, + {"OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL", SpvOpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL}, + {"OpShiftLeftLogical", SpvOpShiftLeftLogical}, + {"OpSubgroupAvcSicGetInterRawSadsINTEL", SpvOpSubgroupAvcSicGetInterRawSadsINTEL}, + {"OpArbitraryFloatPowINTEL", SpvOpArbitraryFloatPowINTEL}, + {"OpReservedWritePipe", SpvOpReservedWritePipe}, + {"OpTypeAvcImeResultINTEL", SpvOpTypeAvcImeResultINTEL}, + {"OpFPGARegINTEL", SpvOpFPGARegINTEL}, + {"OpImageQuerySize", SpvOpImageQuerySize}, + {"OpImageSparseSampleImplicitLod", SpvOpImageSparseSampleImplicitLod}, + {"OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL", SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL}, + {"OpControlBarrierArriveINTEL", SpvOpControlBarrierArriveINTEL}, + {"OpFixedLogINTEL", SpvOpFixedLogINTEL}, + {"OpImageSparseSampleDrefImplicitLod", SpvOpImageSparseSampleDrefImplicitLod}, + {"OpIAddCarry", SpvOpIAddCarry}, + {"OpGroupNonUniformShuffle", SpvOpGroupNonUniformShuffle}, + {"OpRayQueryGenerateIntersectionKHR", SpvOpRayQueryGenerateIntersectionKHR}, + {"OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL", SpvOpSubgroupAvcSicEvaluateWithMultiReferenceINTEL}, + {"OpIAdd", SpvOpIAdd}, + {"OpRayQueryGetIntersectionInstanceIdKHR", SpvOpRayQueryGetIntersectionInstanceIdKHR}, + {"OpIAverageINTEL", SpvOpIAverageINTEL}, + {"OpTypeAvcImePayloadINTEL", SpvOpTypeAvcImePayloadINTEL}, + {"OpImageWrite", SpvOpImageWrite}, + {"OpAssumeTrueKHR", SpvOpAssumeTrueKHR}, + {"OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL", SpvOpSubgroupAvcSicGetBestIpeLumaDistortionINTEL}, + {"OpTypeAvcImeSingleReferenceStreaminINTEL", SpvOpTypeAvcImeSingleReferenceStreaminINTEL}, + {"OpSatConvertSToU", SpvOpSatConvertSToU}, + {"OpSubgroupAllEqualKHR", SpvOpSubgroupAllEqualKHR}, + {"OpGenericPtrMemSemantics", SpvOpGenericPtrMemSemantics}, + {"OpMemberDecorate", SpvOpMemberDecorate}, + {"OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL", SpvOpSubgroupAvcSicEvaluateWithSingleReferenceINTEL}, + {"OpGroupNonUniformUMin", SpvOpGroupNonUniformUMin}, + {"OpFunction", SpvOpFunction}, + {"OpTypeAccelerationStructureKHR", SpvOpTypeAccelerationStructureKHR}, + {"OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL", SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL}, + {"OpImageSampleProjDrefExplicitLod", SpvOpImageSampleProjDrefExplicitLod}, + {"OpPtrCastToCrossWorkgroupINTEL", SpvOpPtrCastToCrossWorkgroupINTEL}, + {"OpGroupNonUniformFAdd", SpvOpGroupNonUniformFAdd}, + {"OpModuleProcessed", SpvOpModuleProcessed}, + {"OpReadPipe", SpvOpReadPipe}, + {"OpConvertUToSampledImageNV", SpvOpConvertUToSampledImageNV}, + {"OpSampledImage", SpvOpSampledImage}, + {"OpArbitraryFloatSinCosPiINTEL", SpvOpArbitraryFloatSinCosPiINTEL}, + {"OpAliasScopeDeclINTEL", SpvOpAliasScopeDeclINTEL}, + {"OpConstantFunctionPointerINTEL", SpvOpConstantFunctionPointerINTEL}, + {"OpConvertImageToUNV", SpvOpConvertImageToUNV}, + {"OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL}, + {"OpAliasScopeListDeclINTEL", SpvOpAliasScopeListDeclINTEL}, + {"OpSubgroupAvcImeGetBorderReachedINTEL", SpvOpSubgroupAvcImeGetBorderReachedINTEL}, + {"OpGroupNonUniformShuffleDown", SpvOpGroupNonUniformShuffleDown}, + {"OpCaptureEventProfilingInfo", SpvOpCaptureEventProfilingInfo}, + {"OpLoad", SpvOpLoad}, + {"OpSUDotKHR", SpvOpSUDotKHR}, + {"OpRayQueryGetIntersectionTKHR", SpvOpRayQueryGetIntersectionTKHR}, + {"OpIMul32x16INTEL", SpvOpIMul32x16INTEL}, + {"OpSubgroupAvcMceGetMotionVectorsINTEL", SpvOpSubgroupAvcMceGetMotionVectorsINTEL}, + {"OpRayQueryGetIntersectionObjectRayOriginKHR", SpvOpRayQueryGetIntersectionObjectRayOriginKHR}, + {"OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL", SpvOpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL}, + {"OpArbitraryFloatLogINTEL", SpvOpArbitraryFloatLogINTEL}, + {"OpBitFieldUExtract", SpvOpBitFieldUExtract}, + {"OpGetMaxPipePackets", SpvOpGetMaxPipePackets}, + {"OpGetKernelMaxNumSubgroups", SpvOpGetKernelMaxNumSubgroups}, + {"OpRayQueryGetIntersectionObjectToWorldKHR", SpvOpRayQueryGetIntersectionObjectToWorldKHR}, + {"OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL", SpvOpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL}, + {"OpCooperativeMatrixLoadNV", SpvOpCooperativeMatrixLoadNV}, + {"OpGroupIMulKHR", SpvOpGroupIMulKHR}, + {"OpConvertUToAccelerationStructureKHR", SpvOpConvertUToAccelerationStructureKHR}, + {"OpNoLine", SpvOpNoLine}, + {"OpSignBitSet", SpvOpSignBitSet}, + {"OpAsmINTEL", SpvOpAsmINTEL}, + {"OpGroupNonUniformBitwiseOr", SpvOpGroupNonUniformBitwiseOr}, + {"OpImageSparseDrefGather", SpvOpImageSparseDrefGather}, + {"OpSubgroupShuffleINTEL", SpvOpSubgroupShuffleINTEL}, + {"OpGroupBitwiseOrKHR", SpvOpGroupBitwiseOrKHR}, + {"OpSubgroupImageMediaBlockWriteINTEL", SpvOpSubgroupImageMediaBlockWriteINTEL}, + {"OpImage", SpvOpImage}, + {"OpAtomicFlagClear", SpvOpAtomicFlagClear}, + {"OpISubBorrow", SpvOpISubBorrow}, + {"OpGroupFMin", SpvOpGroupFMin}, + {"OpSubgroupAvcMceGetBestInterDistortionsINTEL", SpvOpSubgroupAvcMceGetBestInterDistortionsINTEL}, + {"OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL", SpvOpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL}, + {"OpAtomicFAddEXT", SpvOpAtomicFAddEXT}, + {"OpTypeNamedBarrier", SpvOpTypeNamedBarrier}, + {"OpAtomicIDecrement", SpvOpAtomicIDecrement}, + {"OpGroupNonUniformFMax", SpvOpGroupNonUniformFMax}, + {"OpArbitraryFloatCbrtINTEL", SpvOpArbitraryFloatCbrtINTEL}, + {"OpSubgroupAvcBmeInitializeINTEL", SpvOpSubgroupAvcBmeInitializeINTEL}, + {"OpFunctionPointerCallINTEL", SpvOpFunctionPointerCallINTEL}, + {"OpArbitraryFloatCastFromIntINTEL", SpvOpArbitraryFloatCastFromIntINTEL}, + {"OpMemberDecorateStringGOOGLE", SpvOpMemberDecorateStringGOOGLE}, + {"OpSConvert", SpvOpSConvert}, + {"OpSMulExtended", SpvOpSMulExtended}, + {"OpAtomicExchange", SpvOpAtomicExchange}, + {"OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL", SpvOpSubgroupAvcRefEvaluateWithSingleReferenceINTEL}, + {"OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL", SpvOpSubgroupAvcSicGetBestIpeChromaDistortionINTEL}, + {"OpTypeSampledImage", SpvOpTypeSampledImage}, + {"OpGroupNonUniformBitwiseAnd", SpvOpGroupNonUniformBitwiseAnd}, + {"OpGroupUMaxNonUniformAMD", SpvOpGroupUMaxNonUniformAMD}, + {"OpCopyLogical", SpvOpCopyLogical}, + {"OpSNegate", SpvOpSNegate}, + {"OpTypeReserveId", SpvOpTypeReserveId}, + {"OpImageSparseSampleProjExplicitLod", SpvOpImageSparseSampleProjExplicitLod}, + {"OpDecorateId", SpvOpDecorateId}, + {"OpEmitMeshTasksEXT", SpvOpEmitMeshTasksEXT}, + {"OpSaveMemoryINTEL", SpvOpSaveMemoryINTEL}, + {"OpSubgroupBlockWriteINTEL", SpvOpSubgroupBlockWriteINTEL}, + {"OpTypeVector", SpvOpTypeVector}, + {"OpAbsUSubINTEL", SpvOpAbsUSubINTEL}, + {"OpLogicalNot", SpvOpLogicalNot}, + {"OpImageSparseSampleExplicitLod", SpvOpImageSparseSampleExplicitLod}, + {"OpSubgroupAvcImeSetWeightedSadINTEL", SpvOpSubgroupAvcImeSetWeightedSadINTEL}, + {"OpCompositeConstruct", SpvOpCompositeConstruct}, + {"OpTypeCooperativeMatrixNV", SpvOpTypeCooperativeMatrixNV}, + {"OpAtomicISub", SpvOpAtomicISub}, + {"OpImageSampleProjDrefImplicitLod", SpvOpImageSampleProjDrefImplicitLod}, + {"OpSubgroupAvcImeConvertToMceResultINTEL", SpvOpSubgroupAvcImeConvertToMceResultINTEL}, + {"OpFixedSinCosPiINTEL", SpvOpFixedSinCosPiINTEL}, + {"OpIAverageRoundedINTEL", SpvOpIAverageRoundedINTEL}, + {"OpSubgroupAvcMceGetInterDistortionsINTEL", SpvOpSubgroupAvcMceGetInterDistortionsINTEL}, + {"OpFOrdLessThan", SpvOpFOrdLessThan}, + {"OpULessThanEqual", SpvOpULessThanEqual}, + {"OpSpecConstant", SpvOpSpecConstant}, + {"OpUDotKHR", SpvOpUDotKHR}, + {"OpTypeVoid", SpvOpTypeVoid}, + {"OpSubgroupAvcSicEvaluateWithDualReferenceINTEL", SpvOpSubgroupAvcSicEvaluateWithDualReferenceINTEL}, + {"OpAtomicXor", SpvOpAtomicXor}, + {"OpArbitraryFloatRSqrtINTEL", SpvOpArbitraryFloatRSqrtINTEL}, + {"OpConvertSToF", SpvOpConvertSToF}, + {"OpBitcast", SpvOpBitcast}, + {"OpSubgroupAvcMceSetInterShapePenaltyINTEL", SpvOpSubgroupAvcMceSetInterShapePenaltyINTEL}, + {"OpImageGather", SpvOpImageGather}, + {"OpSubgroupAvcMceSetAcOnlyHaarINTEL", SpvOpSubgroupAvcMceSetAcOnlyHaarINTEL}, + {"OpUDot", SpvOpUDot}, + {"OpImageSparseSampleDrefExplicitLod", SpvOpImageSparseSampleDrefExplicitLod}, + {"OpRayQueryGetRayFlagsKHR", SpvOpRayQueryGetRayFlagsKHR}, + {"OpTerminateRayNV", SpvOpTerminateRayNV}, + {"OpGroupLogicalXorKHR", SpvOpGroupLogicalXorKHR}, + {"OpGroupNonUniformIAdd", SpvOpGroupNonUniformIAdd}, + {"OpFunctionCall", SpvOpFunctionCall}, + {"OpTypeAvcSicPayloadINTEL", SpvOpTypeAvcSicPayloadINTEL}, + {"OpImageQuerySamples", SpvOpImageQuerySamples}, + {"OpAtomicCompareExchange", SpvOpAtomicCompareExchange}, + {"OpGroupNonUniformLogicalXor", SpvOpGroupNonUniformLogicalXor}, + {"OpImageSampleProjExplicitLod", SpvOpImageSampleProjExplicitLod}, + {"OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL", SpvOpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL}, + {"OpArbitraryFloatLog10INTEL", SpvOpArbitraryFloatLog10INTEL}, + {"OpSamplerImageAddressingModeNV", SpvOpSamplerImageAddressingModeNV}, + {"OpExecuteCallableNV", SpvOpExecuteCallableNV}, + {"OpGroupIAdd", SpvOpGroupIAdd}, + {"OpFUnordGreaterThanEqual", SpvOpFUnordGreaterThanEqual}, + {"OpSubgroupAvcRefSetBilinearFilterEnableINTEL", SpvOpSubgroupAvcRefSetBilinearFilterEnableINTEL}, + {"OpMemoryNamedBarrier", SpvOpMemoryNamedBarrier}, + {"OpTypeEvent", SpvOpTypeEvent}, + {"OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL", SpvOpSubgroupAvcImeSetUnidirectionalMixDisableINTEL}, + {"OpDPdx", SpvOpDPdx}, + {"OpDPdy", SpvOpDPdy}, + {"OpEmitVertex", SpvOpEmitVertex}, + {"OpTraceNV", SpvOpTraceNV}, + {"OpGroupFMaxNonUniformAMD", SpvOpGroupFMaxNonUniformAMD}, + {"OpArbitraryFloatATanPiINTEL", SpvOpArbitraryFloatATanPiINTEL}, + {"OpGroupBitwiseAndKHR", SpvOpGroupBitwiseAndKHR}, + {"OpMemberName", SpvOpMemberName}, + {"OpGroupMemberDecorate", SpvOpGroupMemberDecorate}, + {"OpUMod", SpvOpUMod}, + {"OpSubgroupAvcMceGetInterMotionVectorCountINTEL", SpvOpSubgroupAvcMceGetInterMotionVectorCountINTEL}, + {"OpSubgroupAvcImeEvaluateWithDualReferenceINTEL", SpvOpSubgroupAvcImeEvaluateWithDualReferenceINTEL}, + {"OpArbitraryFloatPowRINTEL", SpvOpArbitraryFloatPowRINTEL}, + {"OpImageSampleDrefImplicitLod", SpvOpImageSampleDrefImplicitLod}, + {"OpImageDrefGather", SpvOpImageDrefGather}, + {"OpSubgroupImageMediaBlockReadINTEL", SpvOpSubgroupImageMediaBlockReadINTEL}, + {"OpGroupLogicalAndKHR", SpvOpGroupLogicalAndKHR}, + {"OpSubgroupAvcMceGetInterReferenceIdsINTEL", SpvOpSubgroupAvcMceGetInterReferenceIdsINTEL}, + {"OpMemoryBarrier", SpvOpMemoryBarrier}, + {"OpSubgroupAvcSicGetMotionVectorMaskINTEL", SpvOpSubgroupAvcSicGetMotionVectorMaskINTEL}, + {"OpWritePipeBlockingINTEL", SpvOpWritePipeBlockingINTEL}, + {"OpTypeAvcImeResultSingleReferenceStreamoutINTEL", SpvOpTypeAvcImeResultSingleReferenceStreamoutINTEL}, + {"OpGroupNonUniformPartitionNV", SpvOpGroupNonUniformPartitionNV}, + {"OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL", SpvOpSubgroupAvcSicSetSkcForwardTransformEnableINTEL}, + {"OpConvertFToU", SpvOpConvertFToU}, + {"OpFMul", SpvOpFMul}, + {"OpGroupNonUniformFMul", SpvOpGroupNonUniformFMul}, + {"OpShiftRightLogical", SpvOpShiftRightLogical}, + {"OpConvertUToImageNV", SpvOpConvertUToImageNV}, + {"OpInBoundsPtrAccessChain", SpvOpInBoundsPtrAccessChain}, + {"OpVectorTimesMatrix", SpvOpVectorTimesMatrix}, + {"OpTypeSampler", SpvOpTypeSampler}, + {"OpFixedRsqrtINTEL", SpvOpFixedRsqrtINTEL}, + {"OpPtrDiff", SpvOpPtrDiff}, + {"OpArbitraryFloatSinINTEL", SpvOpArbitraryFloatSinINTEL}, + {"OpSubgroupAvcImeSetSingleReferenceINTEL", SpvOpSubgroupAvcImeSetSingleReferenceINTEL}, + {"OpRetainEvent", SpvOpRetainEvent}, + {"OpReportIntersectionKHR", SpvOpReportIntersectionKHR}, + {"OpArbitraryFloatSqrtINTEL", SpvOpArbitraryFloatSqrtINTEL}, + {"OpSpecConstantTrue", SpvOpSpecConstantTrue}, + {"OpRayQueryGetIntersectionFrontFaceKHR", SpvOpRayQueryGetIntersectionFrontFaceKHR}, + {"OpArbitraryFloatCosPiINTEL", SpvOpArbitraryFloatCosPiINTEL}, + {"OpFixedSinCosINTEL", SpvOpFixedSinCosINTEL}, + {"OpGroupNonUniformLogicalOr", SpvOpGroupNonUniformLogicalOr}, + {"OpCrossWorkgroupCastToPtrINTEL", SpvOpCrossWorkgroupCastToPtrINTEL}, + {"OpFUnordLessThan", SpvOpFUnordLessThan}, +}; + +static UInt32 hash(const UnownedStringSlice& str, UInt32 salt) +{ + UInt64 h = salt; + for(const char c : str) + h = ((h * 0x00000100000001B3) ^ c); + return h % (sizeof(tableSalt)/sizeof(tableSalt[0])); +} + +bool lookupSpvOp(const UnownedStringSlice& str, SpvOp& value) +{ + const auto i = hash(str, tableSalt[hash(str, 0)]); + if(str == words[i].name) + { + value = words[i].value; + return true; + } + else + { + return false; + } +} + +} diff --git a/tools/slang-lookup-generator/lookup-generator-main.cpp b/tools/slang-lookup-generator/lookup-generator-main.cpp new file mode 100644 index 000000000..27dae8e54 --- /dev/null +++ b/tools/slang-lookup-generator/lookup-generator-main.cpp @@ -0,0 +1,374 @@ +// perfect-hash-main.cpp + +#include +#include "../../source/compiler-core/slang-json-parser.h" +#include "../../source/compiler-core/slang-json-value.h" +#include "../../source/compiler-core/slang-lexer.h" +#include "../../source/core/slang-io.h" +#include "../../source/core/slang-secure-crt.h" + +using namespace Slang; + +static SlangResult parseJson(const char* inputPath, DiagnosticSink* sink, JSONListener& listener) +{ + auto sourceManager = sink->getSourceManager(); + + String contents; + SLANG_RETURN_ON_FAIL(File::readAllText(inputPath, contents)); + PathInfo pathInfo = PathInfo::makeFromString(inputPath); + SourceFile* sourceFile = sourceManager->createSourceFileWithString(pathInfo, contents); + SourceView* sourceView = sourceManager->createSourceView(sourceFile, nullptr, SourceLoc()); + JSONLexer lexer; + lexer.init(sourceView, sink); + JSONParser parser; + SLANG_RETURN_ON_FAIL(parser.parse(&lexer, sourceView, &listener, sink)); + return SLANG_OK; +} + +// Extract from a json value, the "opname" member from all the objects in the +// "instructions" array. +// Returns the empty list on failure +static List extractOpNames(UnownedStringSlice& error, const JSONValue& v, JSONContainer& container) +{ + List opnames; + + // Wish we could just write à la jq + // List result = match(myJSONValue, "instructions", AsArray, "opname", AsString); + const auto instKey = container.findKey(UnownedStringSlice("instructions")); + const auto opnameKey = container.findKey(UnownedStringSlice("opname")); + if (!instKey) + { + error = UnownedStringSlice("JSON parsing failed, no \"instructions\" key\n"); + return {}; + } + if (!opnameKey) + { + error = UnownedStringSlice("JSON parsing failed, no \"opname\" key\n"); + return {}; + } + + const auto instructions = container.findObjectValue(v, instKey); + if (!instructions.isValid() || instructions.type != JSONValue::Type::Array) + { + error = UnownedStringSlice("JSON parsing failed, no \"instructions\" member of array type\n"); + return {}; + } + for (const auto& inst : container.getArray(instructions)) + { + const auto opname = container.findObjectValue(inst, opnameKey); + if (!opname.isValid() || opname.getKind() != JSONValue::Kind::String) + { + error = UnownedStringSlice("JSON parsing failed, no \"opname\" member of string type for instruction\n"); + return {}; + } + opnames.add(container.getString(opname)); + } + + return opnames; +} + +struct HashParams +{ + List saltTable; + List destTable; +}; + +enum HashFindResult { + Success, + NonUniqueKeys, + UnavoidableHashCollision, +}; + +// Implemented according to "Hash, displace, and compress" +// https://cmph.sourceforge.net/papers/esa09.pdf +static HashFindResult minimalPerfectHash(const List& ss, HashParams& hashParams) +{ + // Check for uniqueness + for (Index i = 0; i < ss.getCount(); ++i) + { + for (Index j = i + 1; j < ss.getCount(); ++j) + { + if (ss[i] == ss[j]) + { + return NonUniqueKeys; + } + } + } + + SLANG_ASSERT(UIndex(ss.getCount()) < std::numeric_limits::max()); + const UInt32 nBuckets = UInt32(ss.getCount()); + List> initialBuckets; + initialBuckets.setCount(nBuckets); + + const auto hash = [&](const String& s, const HashCode64 salt = 0) -> UInt32 + { + // + // The current getStableHashCode32 is susceptible to patterns of + // collisions causing the search to fail for the SPIR-V opnames + // + // getStableHashCode64 is better, although it still performs poorly on + // short strings, taking over 300000 iterations to diverge on "Ceil" + // and "FMix" (and place them in already unoccupied slots)! + // + // Use FNV Hash here which seem perform much better on these short inputs + // https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + // + // If you change this, don't forget to also sync the version below in + // the printing code. + UInt64 h = salt; + for (const char c : s) h = ((h * 0x00000100000001B3) ^ c); + return h % nBuckets; + }; + + // Assign the inputs into their buckets according to the hash without salt. + // Sort the buckets according to size, so that later we can make these have + // unique destinations starting with the largest ones first as they are at + // most risk of collision. + for (const auto& s : ss) + { + initialBuckets[hash(s)].add(s); + } + initialBuckets.sort([](const List& a, const List& b) { return a.getCount() > b.getCount(); }); + + // These are our outputs, the salts are calculated such that for all input + // word, x, hash(x, salt[hash(x, 0)]) is unique + // + // We keep the final table as we need to detect when we've been given a + // word not in our language. + hashParams.saltTable.setCount(nBuckets); + for (auto& s : hashParams.saltTable) + { + s = 0; + } + hashParams.destTable.setCount(nBuckets); + for (auto& s : hashParams.destTable) + { + s.reduceLength(0); + } + + // This mask will, in each salt tryout, be used to prevent collisions + // within a single bucket. + List bucketDestinations = List::makeRepeated(false, nBuckets); + + for (const auto& b : initialBuckets) + { + // Break if we've reached the empty buckets + if (!b.getCount()) + { + break; + } + + // Try out all the salts until we get one which has no internal + // collisions for this bucket and also no collisions with the buckets + // we've processed so far. + UInt32 salt = 1; + while (true) + { + bool collision = false; + for (auto& d : bucketDestinations) + { + d = false; + } + + for (const auto& s : b) + { + const auto i = hash(s, salt); + if (hashParams.destTable[i].getLength() || bucketDestinations[i]) + { + collision = true; + break; + } + bucketDestinations[i] = true; + } + if (!collision) + { + break; + } + salt++; + + // If we fail to find a solution after some massive amount of tries + // it's almost certainly because of some property of the hash + // function and language causing an irresolvable collision. + if (salt > 10000 * nBuckets) + { + return UnavoidableHashCollision; + } + } + for (const auto& s : b) + { + hashParams.saltTable[hash(s)] = salt; + hashParams.destTable[hash(s, salt)] = s; + } + } + return Success; +} + +void writeHashFile( + const char* const outCppPath, + const char* valueType, + const char* valuePrefix, + const List includes, + const HashParams& hashParams) +{ + FILE* f = nullptr; + fopen_s(&f, outCppPath, "w"); + if (!f) + { + return; + } + FileWriter writer(f, WriterFlags(0)); + WriterHelper w(&writer); + + w.print("// Hash function for %s\n", valueType); + w.print("//\n"); + w.print("// This file was thoughtfully generated by a machine,\n"); + w.print("// don't even think about modifying it yourself!\n"); + w.print("//\n"); + w.print("\n"); + for (const auto& i : includes) + { + w.print("#include \"%s\"\n", i.getBuffer()); + } + w.print("\n"); + w.print("\n"); + w.print("namespace Slang\n"); + w.print("{\n"); + w.print("\n"); + + w.print("static const unsigned tableSalt[%ld] =", hashParams.saltTable.getCount()); + w.print("{\n "); + for (Index i = 0; i < hashParams.saltTable.getCount(); ++i) + { + const auto salt = hashParams.saltTable[i]; + if (i != hashParams.saltTable.getCount() - 1) + { + w.print(" %d,", salt); + if (i % 16 == 15) + { + w.print("\n "); + } + } + else + { + w.print(" %d", salt); + } + } + w.print("\n};\n"); + w.print("\n"); + + w.print("struct KV\n"); + w.print("{\n"); + w.print(" const char* name;\n"); + w.print(" %s value;\n", valueType); + w.print("};\n"); + w.print("\n"); + + w.print("static const KV words[%ld] =\n", hashParams.destTable.getCount()); + w.print("{\n"); + for (const auto& s : hashParams.destTable) + { + w.print(" {\"%s\", %s%s},\n", s.getBuffer(), valuePrefix, s.getBuffer()); + } + w.print("};\n"); + w.print("\n"); + + // Make sure to update the hash function in the search function above if + // you change this. + w.print("static UInt32 hash(const UnownedStringSlice& str, UInt32 salt)\n"); + w.print("{\n"); + w.print(" UInt64 h = salt;\n"); + w.print(" for(const char c : str)\n"); + w.print(" h = ((h * 0x00000100000001B3) ^ c);\n"); + w.print(" return h %% (sizeof(tableSalt)/sizeof(tableSalt[0]));\n"); + w.print("}\n"); + w.print("\n"); + + w.print("bool lookup%s(const UnownedStringSlice& str, %s& value)\n", valueType, valueType); + w.print("{\n"); + w.print(" const auto i = hash(str, tableSalt[hash(str, 0)]);\n"); + w.print(" if(str == words[i].name)\n"); + w.print(" {\n"); + w.print(" value = words[i].value;\n"); + w.print(" return true;\n"); + w.print(" }\n"); + w.print(" else\n"); + w.print(" {\n"); + w.print(" return false;\n"); + w.print(" }\n"); + w.print("}\n"); + w.print("\n"); + + w.print("}\n"); +} + +int main(int argc, const char* const* argv) +{ + using namespace Slang; + + if (argc != 6) + { + fprintf( + stderr, + "Usage: %s input.grammar.json output.cpp enum-name enumerant-prefix enum-header-file\n", + argc >= 1 ? argv[0] : "slang-lookup-generator"); + return 1; + } + + const char* const inJsonPath = argv[1]; + const char* const outCppPath = argv[2]; + const char* const enumName = argv[3]; + const char* const enumerantPrefix = argv[4]; + const char* const enumHeader = argv[5]; + + RefPtr writer(new FileWriter(stderr, WriterFlag::AutoFlush)); + SourceManager sourceManager; + sourceManager.initialize(nullptr, nullptr); + DiagnosticSink sink(&sourceManager, Lexer::sourceLocationLexer); + sink.writer = writer; + + JSONContainer container(sink.getSourceManager()); + JSONBuilder builder(&container); + if (SLANG_FAILED(parseJson(inJsonPath, &sink, builder))) + { + sink.diagnoseRaw(Severity::Error, "Json parsing failed\n"); + return 1; + } + + UnownedStringSlice error; + const List opnames = extractOpNames(error, builder.getRootValue(), container); + if (error.getLength()) + { + sink.diagnoseRaw(Severity::Error, error); + return 1; + } + + HashParams hashParams; + auto r = minimalPerfectHash(opnames, hashParams); + switch (r) + { + case UnavoidableHashCollision: + { + sink.diagnoseRaw( + Severity::Error, + "Unable to find a non-overlapping hash function.\n" + "The hash function probably has a unavoidable " + "collision for some input words\n"); + return 1; + } + case NonUniqueKeys: + { + sink.diagnoseRaw(Severity::Error, "Input word list has duplicates\n"); + return 1; + } + case Success:; + } + + writeHashFile( + outCppPath, + enumName, + enumerantPrefix, + { "../core/slang-common.h", "../core/slang-string.h", enumHeader }, + hashParams); + + return 0; +} -- cgit v1.2.3