Skip to content

Commit

Permalink
Add SPIRV-Reflect bindings (#1403)
Browse files Browse the repository at this point in the history
* Add SPIRV-Reflect submodule

* Add SPIRVReflect native project

* Update vkd3d shader compiler build to latest Zig

* Add CI job to build SPIRV-Reflect

* New binaries for SPIRV-Reflect on Linux 5.15.0-1035-azure #42-Ubuntu SMP Tue Feb 28 19:41:23 UTC 2023 (#1406)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* Add SPIRV-Reflect native package to solution file

* Add SPIRV-Reflect bindings

* Split spirv.h into its own project

* BuildTools: Use underscore converted trimming name when enum trimming

This attempts to fix spirv.h enums without needing manual hacks

Currently broken

* Fixed in some ways, broken in others.

* BuildTools: Dont check for duplicate old/new enum names with no-obsolete-enum control descriptor

This fixes the Dim enum from SPIRV and Gamma enum from D2D

* BuildTools: Fix LenientUnderscore with FormatR32ui

SpvImageFormatR32ui now becomes Spv_Image_Format_R32ui instead of Spv_Image_FormatR32ui

* New binaries for SPIRV-Reflect on Linux 5.15.0-1035-azure #42-Ubuntu SMP Tue Feb 28 19:41:23 UTC 2023 (#1414)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* Rename SPIRVReflect to SPIRV.Reflect, change generation prefix

This also excludes a C++ class `ShaderModule` which was eroneously generated
And renames all the structs which conflict with vulkan types after the prefix change

* Rename SPIRV class to Spv

This removes potential problems from intersecting namespace and class names

* SPIRV.Reflect: Reference base SPIRV project

* SPIRV.Reflect: Rename anonymous enums to Constants

* WebGPU: Use new enum names

* Regenerate bindings

* BuildTools: Add prefix overrides for enum trimming

* SPIRV: Specify a prefix override to fix ImageChannelOrder

* Native: Rename Silk.NET.SPIRVReflect.Native

It now reflects the new name of the source package it belongs to

* SPIRV.Reflect.Tests: Add basic InputVariables test

* New binaries for DXVK on Linux 5.15.0-1036-azure #43-Ubuntu SMP Wed Mar 29 16:11:05 UTC 2023 (#1436)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* New binaries for Assimp on Microsoft Windows 10.0.20348 (#1435)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* New binaries for GLFW on Microsoft Windows 10.0.20348 (#1434)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* New binaries for Vulkan Loader on Microsoft Windows 10.0.20348 (#1433)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* New binaries for SPIRV-Reflect on Linux 5.15.0-1036-azure #43-Ubuntu SMP Wed Mar 29 16:11:05 UTC 2023 (#1432)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* Look Gordon, a whitespace change!

* If i make another commit will it work

* Update WebGPU experiments to new naming

* New binaries for DXVK on Linux 5.15.0-1036-azure #43-Ubuntu SMP Wed Mar 29 16:11:05 UTC 2023 (#1445)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* New binaries for Assimp on Microsoft Windows 10.0.20348 (#1444)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* Update GLFW binaries (#1443)

* New binaries for GLFW on Microsoft Windows 10.0.20348

* New binaries for GLFW on Darwin 21.6.0 Darwin Kernel Version 21.6.0: Thu Mar  9 20:08:59 PST 2023; root:xnu-8020.240.18.700.8~1/RELEASE_X86_64

---------

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* New binaries for Vulkan Loader on Microsoft Windows 10.0.20348 (#1442)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* New binaries for SPIRV-Reflect on Linux 5.15.0-1036-azure #43-Ubuntu SMP Wed Mar 29 16:11:05 UTC 2023 (#1441)

Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>

* Add copyright header to SPIRV-Reflect test

* Attempt to bring back the 2.17 enum names as deprecated

* BuildTools changes for bringing back the 2.17 enum names as deprecated

* Regenerate bindings for efd969d

* Account for one more edge case in the deprecated name resurgence

* Pumped Up Kicks but it's not Pumped Up Kicks and I eat a shoe box

* Fix lack of obsoletion message

* Update sln

---------

Co-authored-by: silkdotnet <85832961+silkdotnet@users.noreply.github.com>
Co-authored-by: The Silk.NET Automaton <9011267+dotnet-bot@users.noreply.github.com>
Co-authored-by: Dylan Perks <dylanperks23@gmail.com>
  • Loading branch information
4 people committed May 28, 2023
1 parent 5a707d6 commit be7bb47
Show file tree
Hide file tree
Showing 345 changed files with 15,256 additions and 1,322 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/spirv-reflect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: SPIRV-Reflect
on:
push:
branches-ignore:
- "ci/*"
- "develop/*"
- "main"
paths:
- "build/submodules/SPIRV-Reflect"
- "build/nuke/Build.Native.cs"
- ".github/workflows/spirv-reflect.yml"
jobs:
Build:
strategy:
fail-fast: false
matrix:
env:
- os: ubuntu-latest
name: Linux
nuke_invoke: ./build.sh
extras: |
sudo apt-get update
sudo apt-get install -y build-essential
name: ${{ matrix.env.name }} Build
runs-on: ${{ matrix.env.os }}
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
- name: Checkout submodules, configure git
run: |
git submodule update --init --recursive --depth 0 build/submodules/SPIRV-Reflect
git config --local user.email "9011267+dotnet-bot@users.noreply.github.com"
git config --local user.name "The Silk.NET Automaton"
- name: Extra prerequisites
run: |
echo running extras
${{ matrix.env.extras }}
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
- name: Setup .NET 6.0 and .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.201
7.0.*
- name: Build SPIRV-Reflect
run: ${{ matrix.env.nuke_invoke }} SPIRVReflect
env:
PUSHABLE_GITHUB_TOKEN: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}

6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@
[submodule "build/submodules/SPIRV-Tools"]
path = build/submodules/SPIRV-Tools
url = https://github.com/KhronosGroup/SPIRV-Tools
[submodule "build/submodules/SPIRV-Reflect"]
path = build/submodules/SPIRV-Reflect
url = https://github.com/KhronosGroup/SPIRV-Reflect
[submodule "build/submodules/SPIRV-Headers"]
path = build/submodules/SPIRV-Headers
url = https://github.com/KhronosGroup/SPIRV-Headers
4 changes: 4 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,11 @@
"PushToNuGet",
"RegenerateBindings",
"Restore",
"SDL2",
"ShipApi",
"SignPackages",
"Sln",
"SPIRVReflect",
"SwiftShader",
"Test",
"ValidateSolution",
Expand Down Expand Up @@ -198,9 +200,11 @@
"PushToNuGet",
"RegenerateBindings",
"Restore",
"SDL2",
"ShipApi",
"SignPackages",
"Sln",
"SPIRVReflect",
"SwiftShader",
"Test",
"ValidateSolution",
Expand Down
78 changes: 78 additions & 0 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.OPPO", "src\OpenXR\Extensions\Silk.NET.OpenXR.Extensions.OPPO\Silk.NET.OpenXR.Extensions.OPPO.csproj", "{ABC4717F-2863-4B79-8812-7C1D851EE336}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.SPIRV.Reflect.Native", "src\Native\Silk.NET.SPIRV.Reflect.Native\Silk.NET.SPIRV.Reflect.Native.csproj", "{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SPIRV", "SPIRV", "{15FC3D1A-25D7-446B-87A7-B45BA3C2225F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.SPIRV.Reflect", "src\SPIRV\Silk.NET.SPIRV.Reflect\Silk.NET.SPIRV.Reflect.csproj", "{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.SPIRV", "src\SPIRV\Silk.NET.SPIRV\Silk.NET.SPIRV.csproj", "{65E895B6-D0A6-4C5C-A090-07C7590F48B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.SPIRV.Reflect.Tests", "src\SPIRV\Silk.NET.SPIRV.Reflect.Tests\Silk.NET.SPIRV.Reflect.Tests.csproj", "{7DB60101-9D99-4FD6-89AD-29648F537333}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.Vulkan.Extensions.MSFT", "src\Vulkan\Extensions\Silk.NET.Vulkan.Extensions.MSFT\Silk.NET.Vulkan.Extensions.MSFT.csproj", "{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -3487,6 +3499,66 @@ Global
{ABC4717F-2863-4B79-8812-7C1D851EE336}.Release|x64.Build.0 = Release|Any CPU
{ABC4717F-2863-4B79-8812-7C1D851EE336}.Release|x86.ActiveCfg = Release|Any CPU
{ABC4717F-2863-4B79-8812-7C1D851EE336}.Release|x86.Build.0 = Release|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Debug|x64.ActiveCfg = Debug|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Debug|x64.Build.0 = Debug|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Debug|x86.ActiveCfg = Debug|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Debug|x86.Build.0 = Debug|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Release|Any CPU.Build.0 = Release|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Release|x64.ActiveCfg = Release|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Release|x64.Build.0 = Release|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Release|x86.ActiveCfg = Release|Any CPU
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A}.Release|x86.Build.0 = Release|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Debug|x64.ActiveCfg = Debug|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Debug|x64.Build.0 = Debug|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Debug|x86.ActiveCfg = Debug|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Debug|x86.Build.0 = Debug|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Release|Any CPU.Build.0 = Release|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Release|x64.ActiveCfg = Release|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Release|x64.Build.0 = Release|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Release|x86.ActiveCfg = Release|Any CPU
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A}.Release|x86.Build.0 = Release|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Debug|x64.ActiveCfg = Debug|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Debug|x64.Build.0 = Debug|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Debug|x86.ActiveCfg = Debug|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Debug|x86.Build.0 = Debug|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Release|Any CPU.Build.0 = Release|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Release|x64.ActiveCfg = Release|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Release|x64.Build.0 = Release|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Release|x86.ActiveCfg = Release|Any CPU
{65E895B6-D0A6-4C5C-A090-07C7590F48B9}.Release|x86.Build.0 = Release|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Debug|x64.ActiveCfg = Debug|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Debug|x64.Build.0 = Debug|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Debug|x86.ActiveCfg = Debug|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Debug|x86.Build.0 = Debug|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Release|Any CPU.Build.0 = Release|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Release|x64.ActiveCfg = Release|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Release|x64.Build.0 = Release|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Release|x86.ActiveCfg = Release|Any CPU
{7DB60101-9D99-4FD6-89AD-29648F537333}.Release|x86.Build.0 = Release|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Debug|x64.ActiveCfg = Debug|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Debug|x64.Build.0 = Debug|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Debug|x86.ActiveCfg = Debug|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Debug|x86.Build.0 = Debug|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Release|Any CPU.Build.0 = Release|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Release|x64.ActiveCfg = Release|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Release|x64.Build.0 = Release|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Release|x86.ActiveCfg = Release|Any CPU
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -3766,6 +3838,12 @@ Global
{E1624E31-C702-42EC-AC47-20358B3CCF49} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{82D76E01-3166-4549-A433-4C2C4FD6788E} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{ABC4717F-2863-4B79-8812-7C1D851EE336} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
{F58B1280-668E-4B4A-ADA5-6F0F54B6295A} = {72E7FA64-5B1E-477D-BD30-63B7F206B3C4}
{15FC3D1A-25D7-446B-87A7-B45BA3C2225F} = {16AFCF73-8CC1-4B5D-8969-A90F468DC6D5}
{535018A8-FFD8-4D3E-97FD-C6A3E23AF48A} = {15FC3D1A-25D7-446B-87A7-B45BA3C2225F}
{65E895B6-D0A6-4C5C-A090-07C7590F48B9} = {15FC3D1A-25D7-446B-87A7-B45BA3C2225F}
{7DB60101-9D99-4FD6-89AD-29648F537333} = {15FC3D1A-25D7-446B-87A7-B45BA3C2225F}
{22DA5C34-2859-4599-97DA-9F9E3B7CEEA4} = {49BC383A-D7E6-4013-93C7-371479B984CC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5273D7F-3334-48DF-94E3-41AE6816CD4D}
Expand Down
Binary file modified build/cache/assimp.json.gz
Binary file not shown.
Binary file modified build/cache/cl.json.gz
Binary file not shown.
Binary file modified build/cache/core.json.gz
Binary file not shown.
Binary file modified build/cache/d2d.json.gz
Binary file not shown.
Binary file modified build/cache/d3d11.json.gz
Binary file not shown.
Binary file modified build/cache/d3d12.json.gz
Binary file not shown.
Binary file modified build/cache/d3d9.json.gz
Binary file not shown.
Binary file modified build/cache/d3dcompiler.json.gz
Binary file not shown.
Binary file modified build/cache/dcomp.json.gz
Binary file not shown.
Binary file modified build/cache/dstorage.json.gz
Binary file not shown.
Binary file modified build/cache/dwrite.json.gz
Binary file not shown.
Binary file modified build/cache/dxc.json.gz
Binary file not shown.
Binary file modified build/cache/dxgi.json.gz
Binary file not shown.
Binary file modified build/cache/dxva.json.gz
Binary file not shown.
Binary file modified build/cache/gl.json.gz
Binary file not shown.
Binary file modified build/cache/glcore.json.gz
Binary file not shown.
Binary file modified build/cache/gles2.json.gz
Binary file not shown.
Binary file modified build/cache/openxr.json.gz
Binary file not shown.
Binary file added build/cache/spirv-reflect.json.gz
Binary file not shown.
Binary file added build/cache/spirv.json.gz
Binary file not shown.
Binary file modified build/cache/vulkan.json.gz
Binary file not shown.
Binary file modified build/cache/vulkan_video.json.gz
Binary file not shown.
Binary file modified build/cache/webgpu.json.gz
Binary file not shown.
Binary file modified build/cache/wgl.json.gz
Binary file not shown.
Binary file modified build/cache/win32extras.json.gz
Binary file not shown.
Binary file modified build/cache/xaudio.json.gz
Binary file not shown.
91 changes: 91 additions & 0 deletions build/nuke/Build.Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,97 @@ string AndroidHome
)
);

AbsolutePath SPIRVReflectPath => RootDirectory / "build" / "submodules" / "SPIRV-Reflect";

//This is the build script for the SPIRV-Reflect shared library
const string SPIRVReflectBuildScript = @"const std = @import(""std"");
const fs = std.fs;
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardOptimizeOption(.{});
const shared_lib_options: std.build.SharedLibraryOptions = .{
.name = ""spirv-reflect"",
.target = target,
.optimize = mode,
};
const lib: *std.build.LibExeObjStep = b.addSharedLibrary(shared_lib_options);
lib.linkLibC();
lib.addCSourceFiles(&.{""spirv_reflect.c""}, &.{ ""-std=c99"", ""-fPIC"" });
b.installArtifact(lib);
}";

Target SPIRVReflect => CommonTarget
(
x => x.Before(Compile)
.After(Clean)
.Executes
(
() =>
{
var runtimes = RootDirectory / "src" / "Native" / "Silk.NET.SPIRV.Reflect.Native" / "runtimes";
//Write out the build script to the directory
File.WriteAllText(SPIRVReflectPath / "build.zig", SPIRVReflectBuildScript);
{ //Linux
//Build for Linux x86_64 with glibc 2.26 (old version specified for compatibility)
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux-gnu.2.26 --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "libspirv-reflect.so", runtimes / "linux-x64" / "native" / "libspirv-reflect.so", FileExistsPolicy.Overwrite);
//Build for Linux x86 with glibc 2.26 (old version specified for compatibility)
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=x86-linux-gnu.2.26 --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "libspirv-reflect.so", runtimes / "linux-x86" / "native" / "libspirv-reflect.so", FileExistsPolicy.Overwrite);
//Build for Linux arm64 with glibc 2.26 (old version specified for compatibility)
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-gnu.2.26 --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "libspirv-reflect.so", runtimes / "linux-arm64" / "native" / "libspirv-reflect.so", FileExistsPolicy.Overwrite);
}
{ //Windows
//Build for Windows x86_64
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=x86_64-windows --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "spirv-reflect.dll", runtimes / "win-x64" / "native" / "spirv-reflect.dll", FileExistsPolicy.Overwrite);
//Build for Windows x86
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=x86-windows --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "spirv-reflect.dll", runtimes / "win-x86" / "native" / "spirv-reflect.dll", FileExistsPolicy.Overwrite);
//Build for Windows arm64
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=aarch64-windows --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "spirv-reflect.dll", runtimes / "win-arm64" / "native" / "spirv-reflect.dll", FileExistsPolicy.Overwrite);
}
{ //MacOS
//Build for MacOS x86_64
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=x86_64-macos --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "libspirv-reflect.dylib", runtimes / "osx-x64" / "native" / "libspirv-reflect.dylib", FileExistsPolicy.Overwrite);
//Build for MacOS arm64
InheritedShell($"zig build -Doptimize=ReleaseFast -Dtarget=aarch64-macos --verbose", SPIRVReflectPath).AssertZeroExitCode();
CopyFile(SPIRVReflectPath / "zig-out" / "lib" / "libspirv-reflect.dylib", runtimes / "osx-arm64" / "native" / "libspirv-reflect.dylib", FileExistsPolicy.Overwrite);
}
var files = (runtimes / "win-x64" / "native").GlobFiles("*.dll")
.Concat((runtimes / "win-x86" / "native").GlobFiles("*.dll"))
.Concat((runtimes / "win-arm64" / "native").GlobFiles("*.dll"))
.Concat((runtimes / "osx-x64" / "native").GlobFiles("*.dylib"))
.Concat((runtimes / "osx-arm64" / "native").GlobFiles("*.dylib"))
.Concat((runtimes / "linux-x64" / "native").GlobFiles("*.so"))
.Concat((runtimes / "linux-x86" / "native").GlobFiles("*.so"))
.Concat((runtimes / "linux-arm64" / "native").GlobFiles("*.so"));
var glob = string.Empty;
glob = files.Aggregate(glob, (current, path) => current + $"\"{path}\" ");
PrUpdatedNativeBinary("SPIRV-Reflect", glob);
}
)
);

AbsolutePath VulkanLoaderPath => RootDirectory / "build" / "submodules" / "Vulkan-Loader";

Target VulkanLoader => CommonTarget
Expand Down
1 change: 1 addition & 0 deletions build/submodules/SPIRV-Headers
Submodule SPIRV-Headers added at cfbe4f
1 change: 1 addition & 0 deletions build/submodules/SPIRV-Reflect
Submodule SPIRV-Reflect added at a7c7b8
Loading

0 comments on commit be7bb47

Please sign in to comment.