Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for libshaderc #5

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/ci_build_libshaderc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: ci_build_libshaderc

on:
push:
branches:
- '**'
tags-ignore:
- '**'
paths:
- 'src/*.props'
- 'src/libshaderc/**'
pull_request:

jobs:
build:
runs-on: 'ubuntu-latest'
steps:
#GITHUB_ACTION_PRE_STEP
- name: "Build, Test and Pack libshaderc"
uses: xoofx/.github/.github/actions/dotnet-releaser-action@main
with:
dotnet-releaser-path: 'src/libshaderc/dotnet-releaser.toml'
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
#GITHUB_ACTION_POST_STEP
22 changes: 22 additions & 0 deletions .github/workflows/ci_publish_libshaderc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci_publish_libshaderc

on:
push:
tags:
- "libshaderc/*"
paths:
- 'src/*.props'
- 'src/libshaderc/**'
pull_request:

jobs:
build:
runs-on: 'ubuntu-latest'
steps:
#GITHUB_ACTION_PRE_STEP
- name: "Build, Test and Publish libshaderc"
uses: xoofx/.github/.github/actions/dotnet-releaser-action@main
with:
dotnet-releaser-path: 'src/libshaderc/dotnet-releaser.toml'
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
#GITHUB_ACTION_POST_STEP
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The following libraries are available:
| [XenoAtom.Interop.vulkan](src/vulkan)<br>Vulkan is a low-overhead, cross-platform 3D graphics and compute API. | [vulkan](https://registry.khronos.org/vulkan/)<br>`1.3.261.1` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_vulkan.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_vulkan.yml)<br>[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.vulkan.svg)](https://www.nuget.org/packages/XenoAtom.Interop.vulkan) |
| [XenoAtom.Interop.libdrm](src/libdrm)<br>libdrm is a userspace library that provides a user-space API to the Direct Rendering Manager. | [libdrm](https://gitlab.freedesktop.org/mesa/drm)<br>`2.4.118` | `linux` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libdrm.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libdrm.yml)<br>[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libdrm.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libdrm) |
| [XenoAtom.Interop.libgbm](src/libgbm)<br>libgbm is a userspace library that provides an abstraction for buffer management used by graphics drivers. | [libgbm](https://gitlab.freedesktop.org/mesa/mesa)<br>`23.3.6` | `linux` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libgbm.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libgbm.yml)<br>[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libgbm.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libgbm) |
| [XenoAtom.Interop.libshaderc](src/libshaderc)<br>libshaderc is a library for compiling GLSL/HLSL to SPIR-V. | [libshaderc](https://github.com/google/shaderc)<br>`2023.7` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libshaderc.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libshaderc.yml)<br>[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libshaderc.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libshaderc) |

<!-- XENOATOM_INTEROP END - DO NOT EDIT --->

Expand Down
19 changes: 19 additions & 0 deletions src/XenoAtom.Interop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01-ci", "01-ci", "{F7B3343D
..\.github\workflows\ci_build_codegen.yml = ..\.github\workflows\ci_build_codegen.yml
..\.github\workflows\ci_build_common.yml = ..\.github\workflows\ci_build_common.yml
..\.github\workflows\ci_build_libgit2.yml = ..\.github\workflows\ci_build_libgit2.yml
..\.github\workflows\ci_build_libshaderc.yml = ..\.github\workflows\ci_build_libshaderc.yml
..\.github\workflows\ci_build_musl.yml = ..\.github\workflows\ci_build_musl.yml
..\.github\workflows\ci_build_sqlite.yml = ..\.github\workflows\ci_build_sqlite.yml
..\.github\workflows\ci_build_vulkan.yml = ..\.github\workflows\ci_build_vulkan.yml
..\.github\workflows\ci_build_zlib.yml = ..\.github\workflows\ci_build_zlib.yml
..\.github\workflows\ci_publish_common.yml = ..\.github\workflows\ci_publish_common.yml
..\.github\workflows\ci_publish_libgit2.yml = ..\.github\workflows\ci_publish_libgit2.yml
..\.github\workflows\ci_publish_libshaderc.yml = ..\.github\workflows\ci_publish_libshaderc.yml
..\.github\workflows\ci_publish_musl.yml = ..\.github\workflows\ci_publish_musl.yml
..\.github\workflows\ci_publish_sqlite.yml = ..\.github\workflows\ci_publish_sqlite.yml
..\.github\workflows\ci_publish_vulkan.yml = ..\.github\workflows\ci_publish_vulkan.yml
Expand Down Expand Up @@ -104,6 +106,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XenoAtom.Interop.libgbm", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XenoAtom.Interop.libgbm.Tests", "libgbm\XenoAtom.Interop.libgbm.Tests\XenoAtom.Interop.libgbm.Tests.csproj", "{670B3F77-DC62-43D5-B8CE-BC063724D35A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libshaderc", "libshaderc", "{0742D969-0B9F-4034-BFC4-7B0C5B2FDFB7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XenoAtom.Interop.libshaderc", "libshaderc\XenoAtom.Interop.libshaderc\XenoAtom.Interop.libshaderc.csproj", "{D4EA7E38-0C3F-48BA-9188-A925B4E8ABE2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XenoAtom.Interop.libshaderc.Tests", "libshaderc\XenoAtom.Interop.libshaderc.Tests\XenoAtom.Interop.libshaderc.Tests.csproj", "{76422969-B89F-4EBE-AB76-E51917A8EA9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -178,6 +186,14 @@ Global
{670B3F77-DC62-43D5-B8CE-BC063724D35A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{670B3F77-DC62-43D5-B8CE-BC063724D35A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{670B3F77-DC62-43D5-B8CE-BC063724D35A}.Release|Any CPU.Build.0 = Release|Any CPU
{D4EA7E38-0C3F-48BA-9188-A925B4E8ABE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4EA7E38-0C3F-48BA-9188-A925B4E8ABE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4EA7E38-0C3F-48BA-9188-A925B4E8ABE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4EA7E38-0C3F-48BA-9188-A925B4E8ABE2}.Release|Any CPU.Build.0 = Release|Any CPU
{76422969-B89F-4EBE-AB76-E51917A8EA9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76422969-B89F-4EBE-AB76-E51917A8EA9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76422969-B89F-4EBE-AB76-E51917A8EA9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76422969-B89F-4EBE-AB76-E51917A8EA9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -208,6 +224,9 @@ Global
{1B295861-4E88-497C-9C6B-01D1E358F592} = {DA3698BE-1790-4569-A569-ECA2F29E25A9}
{938E33A3-6B26-49F1-88C8-FF8E70ECCB70} = {1B295861-4E88-497C-9C6B-01D1E358F592}
{670B3F77-DC62-43D5-B8CE-BC063724D35A} = {1B295861-4E88-497C-9C6B-01D1E358F592}
{0742D969-0B9F-4034-BFC4-7B0C5B2FDFB7} = {DA3698BE-1790-4569-A569-ECA2F29E25A9}
{D4EA7E38-0C3F-48BA-9188-A925B4E8ABE2} = {0742D969-0B9F-4034-BFC4-7B0C5B2FDFB7}
{76422969-B89F-4EBE-AB76-E51917A8EA9A} = {0742D969-0B9F-4034-BFC4-7B0C5B2FDFB7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {95E8F3B3-49E8-400E-97A1-38D8B946DFCA}
Expand Down
12 changes: 12 additions & 0 deletions src/codegen/XenoAtom.Interop.CodeGen/Program.LibDescriptors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using XenoAtom.Interop.CodeGen.libdrm;
using XenoAtom.Interop.CodeGen.libgbm;
using XenoAtom.Interop.CodeGen.libgit2;
using XenoAtom.Interop.CodeGen.libshaderc;
using XenoAtom.Interop.CodeGen.musl;
using XenoAtom.Interop.CodeGen.sqlite;
using XenoAtom.Interop.CodeGen.vulkan;
Expand Down Expand Up @@ -212,5 +213,16 @@ sudo apt-get install -y \
ApkDeps = ["mesa-dev"],
SupportedArchitectures = [ "linux" ]
},
new()
{
Name = "libshaderc",
Summary = "This package provides a low-level and modern .NET P/Invoke wrapper around the libshaderc API.",
CppDescription = "libshaderc is a library for compiling GLSL/HLSL to SPIR-V.",
NativeNuGets = [new("Silk.NET.Shaderc.Native", "2.21.0")],
Url = "https://github.com/google/shaderc",
UrlDocumentation = "https://github.com/google/shaderc",
Generator = desc => new LibshadercGenerator(desc),
ApkDeps = ["shaderc-dev"],
},
];
}
6 changes: 0 additions & 6 deletions src/codegen/XenoAtom.Interop.CodeGen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
// Licensed under the BSD-Clause 2 license.
// See license.txt file in the project root for full license information.

using ClangSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace XenoAtom.Interop.CodeGen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<Description>LIBSUMMARY</Description>
<PackageTags>tag1;tag2;tag3</PackageTags>
<PackageTags>tag1;pinvoke;interop</PackageTags>
<MinVerTagPrefix>LIBNAME/</MinVerTagPrefix>
</PropertyGroup>

Expand Down
Loading