Skip to content

add targets vulkan1.3, vulkan1.4 and spv1.6 #271

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
14 changes: 0 additions & 14 deletions .github/install-spirv-tools/Cargo.toml

This file was deleted.

109 changes: 0 additions & 109 deletions .github/install-spirv-tools/src/main.rs

This file was deleted.

47 changes: 26 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ jobs:
RUSTUP_IO_THREADS: "1"
steps:
- uses: actions/checkout@v4
# Install the spirv-tools binaries from tarballs hosted on each release
# of spirv-tools. This downloads the tarball, decompresses it, unpacks
# the binaries to the specified path, and adds them to PATH
- name: Install spirv-tools binaries
shell: bash
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.host || matrix.target}} 0.10.0 "${{github.workspace}}/bin"
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: 1.4.309.0
cache: true
- if: ${{ runner.os == 'Linux' }}
name: Linux - Install native dependencies
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
Expand Down Expand Up @@ -91,12 +90,11 @@ jobs:
RUSTUP_IO_THREADS: "1"
steps:
- uses: actions/checkout@v4
# Install the spirv-tools binaries from tarballs hosted on each release
# of spirv-tools. This downloads the tarball, decompresses it, unpacks
# the binaries to the specified path, and adds them to PATH
- name: Install spirv-tools binaries
shell: bash
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.host || matrix.target}} 0.10.0 "${{github.workspace}}/bin"
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: 1.4.309.0
cache: true
# cargo version is a random command that forces the installation of rust-toolchain
- name: install rust-toolchain
run: cargo version
Expand Down Expand Up @@ -142,16 +140,18 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install spirv-tools binaries
shell: bash
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.target}} 0.10.0 "${{github.workspace}}/bin"
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: 1.4.309.0
cache: true
# cargo version is a random command that forces the installation of rust-toolchain
- name: install rust-toolchain
run: cargo version
- name: cargo fetch --locked
run: cargo fetch --locked --target ${{ matrix.target }}
- name: compiletest
run: cargo run -p compiletests --release --no-default-features --features "use-installed-tools" -- --target-env vulkan1.1,vulkan1.2,spv1.3
run: cargo run -p compiletests --release --no-default-features --features "use-installed-tools" -- --target-env vulkan1.1,vulkan1.2,vulkan1.3,vulkan1.4

difftest:
name: Difftest
Expand All @@ -167,9 +167,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install spirv-tools binaries
shell: bash
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.target}} 0.10.0 "${{github.workspace}}/bin"
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: 1.4.309.0
cache: true
- if: ${{ runner.os == 'Linux' }}
name: Linux - Install native dependencies
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
Expand Down Expand Up @@ -212,8 +214,11 @@ jobs:
submodules: "false"
- name: Install native dependencies
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
- name: Install spirv-tools
run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- x86_64-unknown-linux-gnu 0.10.0 "${{github.workspace}}/bin"
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: 1.4.309.0
cache: true
- name: Install rustup components
run: rustup component add rustfmt clippy
# cargo version is a random command that forces the installation of rust-toolchain
Expand Down
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spirv-builder = { path = "./crates/spirv-builder", version = "=0.9.0", default-f
spirv-std = { path = "./crates/spirv-std", version = "=0.9.0" }
spirv-std-types = { path = "./crates/spirv-std/shared", version = "=0.9.0" }
spirv-std-macros = { path = "./crates/spirv-std/macros", version = "=0.9.0" }
spirv-tools = { version = "0.11", default-features = false }
spirv-tools = { git = "https://github.com/Rust-GPU/spirv-tools-rs", rev = "7b32f1fd8fa02ddab87550c5374effe11198bcab", default-features = false }
rustc_codegen_spirv = { path = "./crates/rustc_codegen_spirv", version = "=0.9.0", default-features = false }
rustc_codegen_spirv-types = { path = "./crates/rustc_codegen_spirv-types", version = "=0.9.0" }
rustc_codegen_spirv-target-specs = { path = "crates/rustc_codegen_spirv-target-specs", version = "=0.9.0" }
Expand Down
12 changes: 12 additions & 0 deletions crates/rustc_codegen_spirv-target-specs/src/include_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ pub const TARGET_SPECS: &[(&str, &str)] = &[
"spirv-unknown-spv1.5.json",
include_str!("../target-specs/spirv-unknown-spv1.5.json"),
),
(
"spirv-unknown-spv1.6.json",
include_str!("../target-specs/spirv-unknown-spv1.6.json"),
),
(
"spirv-unknown-vulkan1.0.json",
include_str!("../target-specs/spirv-unknown-vulkan1.0.json"),
Expand All @@ -60,4 +64,12 @@ pub const TARGET_SPECS: &[(&str, &str)] = &[
"spirv-unknown-vulkan1.2.json",
include_str!("../target-specs/spirv-unknown-vulkan1.2.json"),
),
(
"spirv-unknown-vulkan1.3.json",
include_str!("../target-specs/spirv-unknown-vulkan1.3.json"),
),
(
"spirv-unknown-vulkan1.4.json",
include_str!("../target-specs/spirv-unknown-vulkan1.4.json"),
),
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"allows-weak-linkage": false,
"arch": "spirv",
"crt-objects-fallback": "false",
"crt-static-allows-dylibs": true,
"data-layout": "e-m:e-p:32:32:32-i64:64-n8:16:32:64",
"dll-prefix": "",
"dll-suffix": ".spv.json",
"dynamic-linking": true,
"emit-debug-gdb-scripts": false,
"env": "spv1.6",
"linker-flavor": "unix",
"linker-is-gnu": false,
"llvm-target": "spirv-unknown-spv1.6",
"main-needs-argc-argv": false,
"metadata": {
"description": null,
"host_tools": null,
"std": null,
"tier": null
},
"os": "unknown",
"panic-strategy": "abort",
"simd-types-indirect": false,
"target-pointer-width": "32"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"allows-weak-linkage": false,
"arch": "spirv",
"crt-objects-fallback": "false",
"crt-static-allows-dylibs": true,
"data-layout": "e-m:e-p:32:32:32-i64:64-n8:16:32:64",
"dll-prefix": "",
"dll-suffix": ".spv.json",
"dynamic-linking": true,
"emit-debug-gdb-scripts": false,
"env": "vulkan1.3",
"linker-flavor": "unix",
"linker-is-gnu": false,
"llvm-target": "spirv-unknown-vulkan1.3",
"main-needs-argc-argv": false,
"metadata": {
"description": null,
"host_tools": null,
"std": null,
"tier": null
},
"os": "unknown",
"panic-strategy": "abort",
"simd-types-indirect": false,
"target-pointer-width": "32"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"allows-weak-linkage": false,
"arch": "spirv",
"crt-objects-fallback": "false",
"crt-static-allows-dylibs": true,
"data-layout": "e-m:e-p:32:32:32-i64:64-n8:16:32:64",
"dll-prefix": "",
"dll-suffix": ".spv.json",
"dynamic-linking": true,
"emit-debug-gdb-scripts": false,
"env": "vulkan1.4",
"linker-flavor": "unix",
"linker-is-gnu": false,
"llvm-target": "spirv-unknown-vulkan1.4",
"main-needs-argc-argv": false,
"metadata": {
"description": null,
"host_tools": null,
"std": null,
"tier": null
},
"os": "unknown",
"panic-strategy": "abort",
"simd-types-indirect": false,
"target-pointer-width": "32"
}
Loading