From 11de76215b12111e638531a260d274a9780552da Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Sun, 19 Jun 2022 19:58:15 -0700 Subject: graphics/msl: New port: Shader language based off GLSL --- graphics/Makefile | 1 + graphics/msl/Makefile | 30 ++++++++++++++++++++++++++++++ graphics/msl/distinfo | 11 +++++++++++ graphics/msl/pkg-descr | 24 ++++++++++++++++++++++++ graphics/msl/pkg-plist | 43 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 109 insertions(+) create mode 100644 graphics/msl/Makefile create mode 100644 graphics/msl/distinfo create mode 100644 graphics/msl/pkg-descr create mode 100644 graphics/msl/pkg-plist diff --git a/graphics/Makefile b/graphics/Makefile index 6bd3a85b3f17..7bd30c6f96d7 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -560,6 +560,7 @@ SUBDIR += movit SUBDIR += mozjpeg SUBDIR += mscgen + SUBDIR += msl SUBDIR += mtpaint SUBDIR += multican SUBDIR += mupdf diff --git a/graphics/msl/Makefile b/graphics/msl/Makefile new file mode 100644 index 000000000000..cbe05049a86f --- /dev/null +++ b/graphics/msl/Makefile @@ -0,0 +1,30 @@ +PORTNAME= msl +DISTVERSIONPREFIX= v +DISTVERSION= 1.5.1 +CATEGORIES= graphics + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Shader language based off GLSL + +LICENSE= APACHE20 + +BUILD_DEPENDS= flatc:devel/flatbuffers \ + boost-libs>0:devel/boost-libs + +USES= cmake:testing compiler:c++11-lang python:3.6+,build + +#CMAKE_ON= BUILD_SHARED_LIBS MSL_SHARED # shared libraries are broken, see https://github.com/akb825/ModularShaderLanguage/issues/6 +#CMAKE_OFF= SPIRV_TOOLS_BUILD_STATIC +CMAKE_OFF= MSL_BUILD_TESTS MSL_BUILD_DOCS +CMAKE_TESTING_ON= MSL_BUILD_TESTS + +USE_GITHUB= yes +GH_ACCOUNT= akb825 +GH_PROJECT= ModularShaderLanguage + +GH_TUPLE= akb825:glslang:04a12be6bb031aff18b456bfe108f4bffdbf413d:akb825_glslang/Compile/glslang \ + KhronosGroup:SPIRV-Cross:99b59b35288c95fa7352158930cc068705d3c2e3:KhronosGroup_SPIRV_Cross/Compile/SPIRV-Cross \ + akb825:SPIRV-Tools:c80f8b752f50de446cc2408ffbb8572f6008e52b:akb825_SPIRV_Tools/Compile/SPIRV-Tools \ + KhronosGroup:SPIRV-Headers:4995a2f2723c401eb0ea3e10c81298906bf1422b:KhronosGroup_SPIRV_Headers/Compile/SPIRV-Tools/external/SPIRV-Headers \ + +.include diff --git a/graphics/msl/distinfo b/graphics/msl/distinfo new file mode 100644 index 000000000000..eceae95f4c9f --- /dev/null +++ b/graphics/msl/distinfo @@ -0,0 +1,11 @@ +TIMESTAMP = 1655693073 +SHA256 (akb825-ModularShaderLanguage-v1.5.1_GH0.tar.gz) = 4a8decc718b8599dd5fe2ed298fd32af158b0e336b136266b6ca60b550c64a9f +SIZE (akb825-ModularShaderLanguage-v1.5.1_GH0.tar.gz) = 255871 +SHA256 (akb825-glslang-04a12be6bb031aff18b456bfe108f4bffdbf413d_GH0.tar.gz) = 801a43402f31b110ae66e035d473a88cadbdb7eb20d9b0760aa631a36b4a47be +SIZE (akb825-glslang-04a12be6bb031aff18b456bfe108f4bffdbf413d_GH0.tar.gz) = 3543239 +SHA256 (KhronosGroup-SPIRV-Cross-99b59b35288c95fa7352158930cc068705d3c2e3_GH0.tar.gz) = 1775bcbb4affa9b0700b50a44d24a24ad24034d0e60fd763ce5e2780b1b5871e +SIZE (KhronosGroup-SPIRV-Cross-99b59b35288c95fa7352158930cc068705d3c2e3_GH0.tar.gz) = 1607010 +SHA256 (akb825-SPIRV-Tools-c80f8b752f50de446cc2408ffbb8572f6008e52b_GH0.tar.gz) = b5684be2a391bc7eab58c2712a07c6a2baf4fff42edc453531aad3af21bc32e4 +SIZE (akb825-SPIRV-Tools-c80f8b752f50de446cc2408ffbb8572f6008e52b_GH0.tar.gz) = 2999741 +SHA256 (KhronosGroup-SPIRV-Headers-4995a2f2723c401eb0ea3e10c81298906bf1422b_GH0.tar.gz) = 2c9fe1bbd74a74fdabe40a7ffb322527dfc008c79e1d19d3cf41a5f006d9ab60 +SIZE (KhronosGroup-SPIRV-Headers-4995a2f2723c401eb0ea3e10c81298906bf1422b_GH0.tar.gz) = 420432 diff --git a/graphics/msl/pkg-descr b/graphics/msl/pkg-descr new file mode 100644 index 000000000000..76e5154e05cb --- /dev/null +++ b/graphics/msl/pkg-descr @@ -0,0 +1,24 @@ +The Modular Shader Language (MSL) is a pre-compiled shader language +with multiple targets. It is effectively a wrapper around GLSL and +relies on external tools to handle the main work of the compilation. + +The primary goals are: +* Provide an environment more similar to other compiled languages, + such as access to a preprocessor and compile-time errors that point + to the file. +* Allow targeting multiple platforms with different capabilities with + the same source. +* Relies on official and external tools as much as possible. This + makes the language easier to extend and maintain and allows other + third party tools, such as optimizers, to be used. +* Allows all stages of the pipeline to be specified in the same + source. This gives more flexibility in how you organize your source. +* Allows for render states and sampler states to be declared in the + shader. This gives more flexibility in client applications by + allowing these to be set in the shader without hard-coding them in + the application. +* Pipeline is linked when compiling the shader modules, allowing for + earlier checks and easier loading of shaders in the final + application. + +WWW: https://github.com/akb825/ModularShaderLanguage diff --git a/graphics/msl/pkg-plist b/graphics/msl/pkg-plist new file mode 100644 index 000000000000..df66ad42755e --- /dev/null +++ b/graphics/msl/pkg-plist @@ -0,0 +1,43 @@ +bin/mslb-extract +bin/mslc +include/MSL/Client/Export.h +include/MSL/Client/ModuleC.h +include/MSL/Client/ModuleCpp.h +include/MSL/Client/TypesC.h +include/MSL/Client/TypesCpp.h +include/MSL/Compile/CompiledResult.h +include/MSL/Compile/Export.h +include/MSL/Compile/Output.h +include/MSL/Compile/Target.h +include/MSL/Compile/TargetGlsl.h +include/MSL/Compile/TargetMetal.h +include/MSL/Compile/TargetSpirV.h +include/MSL/Compile/Types.h +include/MSL/Config.h +include/spirv-tools/instrument.hpp +include/spirv-tools/libspirv.h +include/spirv-tools/libspirv.hpp +include/spirv-tools/linker.hpp +include/spirv-tools/optimizer.hpp +lib/cmake/MSL/MSLConfig.cmake +lib/cmake/MSL/MSLConfigVersion.cmake +lib/cmake/MSLClient/MSLClientConfig.cmake +lib/cmake/MSLClient/MSLClientConfigVersion.cmake +lib/cmake/MSLClient/MSLClientTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/MSLClient/MSLClientTargets.cmake +lib/cmake/MSLCompile/MSLCompileConfig.cmake +lib/cmake/MSLCompile/MSLCompileConfigVersion.cmake +lib/cmake/MSLCompile/MSLCompileTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/MSLCompile/MSLCompileTargets.cmake +lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optConfig.cmake +lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optTargets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optTargets.cmake +lib/cmake/SPIRV-Tools/SPIRV-ToolsConfig.cmake +lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake +lib/libSPIRV-Tools-opt.a +lib/libSPIRV-Tools.a +lib/libmsl_client.a +lib/libmsl_compile.a +libdata/pkgconfig/SPIRV-Tools-shared.pc +libdata/pkgconfig/SPIRV-Tools.pc -- cgit v1.2.3