-
Notifications
You must be signed in to change notification settings - Fork 944
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into texture-format-nv12
- Loading branch information
Showing
658 changed files
with
131,040 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ allow = [ | |
"ISC", | ||
"MIT", | ||
"MIT-0", | ||
"MPL-2.0", | ||
"Unicode-DFS-2016", | ||
"Zlib", | ||
] | ||
|
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
/cts_runner/ @gfx-rs/deno @gfx-rs/wgpu | ||
/deno_webgpu/ @gfx-rs/deno @gfx-rs/wgpu | ||
/naga/ @gfx-rs/naga |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ on: | |
env: | ||
CARGO_INCREMENTAL: false | ||
CARGO_TERM_COLOR: always | ||
WGPU_DX12_COMPILER: dxc | ||
RUST_LOG: info | ||
RUST_BACKTRACE: full | ||
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure. | ||
|
@@ -239,6 +240,52 @@ jobs: | |
# check wgpu-core with all features. This will also get wgpu-hal and wgpu-types. | ||
cargo check --target ${{ matrix.target }} --all-features -p wgpu-core | ||
naga-minimal-versions: | ||
name: MSRV naga Minimal Versions | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Core MSRV toolchain | ||
run: | | ||
rustup toolchain install ${{ env.CORE_MSRV }} --no-self-update --profile=minimal --component clippy | ||
rustup override set ${{ env.CORE_MSRV }} | ||
cargo -V | ||
- name: Install Nightly toolchain | ||
run: | | ||
rustup toolchain install nightly --no-self-update --profile=minimal --component clippy | ||
cargo +nightly -V | ||
- name: Install cargo-hack | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-hack | ||
|
||
- name: disable debug | ||
shell: bash | ||
run: | | ||
mkdir -p .cargo | ||
echo """ | ||
[profile.dev] | ||
debug = false" >> .cargo/config.toml | ||
- name: Set Minimal Versions | ||
shell: bash | ||
run: | | ||
set -e | ||
cargo +nightly hack generate-lockfile --remove-dev-deps -Z minimal-versions -p naga -p naga-cli | ||
- name: Clippy | ||
shell: bash | ||
run: | | ||
set -e | ||
cargo clippy --all-features -p naga -p naga-cli | ||
wasm-test: | ||
name: Test WebAssembly | ||
runs-on: ubuntu-latest | ||
|
@@ -307,6 +354,10 @@ jobs: | |
. -> target | ||
xtask -> xtask/target | ||
- name: (windows) install dxc | ||
if: matrix.os == 'windows-2022' | ||
uses: napokue/[email protected] | ||
|
||
- name: (windows) install warp | ||
if: matrix.os == 'windows-2022' | ||
shell: bash | ||
|
@@ -378,6 +429,9 @@ jobs: | |
cargo xtask test --llvm-cov | ||
- name: check naga snapshots | ||
run: git diff --exit-code -- naga/tests/out | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() # We want artifacts even if the tests fail. | ||
with: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Documentation | ||
name: Docs | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
# Lazy jobs running on trunk post merges. | ||
name: Lazy | ||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/lazy.yml' | ||
push: | ||
branches: [trunk] | ||
|
||
env: | ||
CARGO_INCREMENTAL: false | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: full | ||
|
||
jobs: | ||
parse-dota2: | ||
name: "Validate Shaders: Dota2" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: mkdir naga/data | ||
|
||
- name: Download shaders | ||
run: curl https://user.fm/files/v2-5573e18b9f03f42c6ae53c392083da35/dota2-shaders.zip -o naga/data/all.zip | ||
|
||
- name: Unpack shaders | ||
run: | | ||
cd naga/data | ||
unzip all.zip | ||
- name: Build Naga | ||
run: | | ||
cd naga | ||
cargo build --release -p naga-cli | ||
- name: Convert shaders | ||
run: | | ||
cd naga | ||
for file in data/*.spv ; do echo "Translating" ${file} && ../target/release/naga --validate 27 ${file} ${file}.metal; done | ||
parse-vulkan-tutorial-shaders: | ||
name: "Validate Shaders: Sascha Willems Vulkan Tutorial" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download shaders | ||
run: cd naga && git clone https://github.com/SaschaWillems/Vulkan.git | ||
|
||
- name: Build Naga | ||
run: | | ||
cd naga | ||
cargo build --release -p naga-cli | ||
- name: Convert metal shaders | ||
run: | | ||
# No needed to stop workflow if we can't validate one file | ||
set +e | ||
cd naga | ||
touch counter | ||
SUCCESS_RESULT_COUNT=0 | ||
FILE_COUNT=0 | ||
mkdir -p out | ||
find "Vulkan/data/shaders/glsl/" -name '*.spv' | while read fname; | ||
do | ||
echo "Convert: $fname" | ||
FILE_COUNT=$((FILE_COUNT+1)) | ||
../target/release/naga --validate 27 $(realpath ${fname}) out/$(basename ${fname}).metal | ||
if [[ $? -eq 0 ]]; then | ||
SUCCESS_RESULT_COUNT=$((SUCCESS_RESULT_COUNT + 1)) | ||
fi | ||
echo "Result: $(expr $FILE_COUNT - $SUCCESS_RESULT_COUNT) / $FILE_COUNT" > counter | ||
done | ||
cat counter | ||
dneto0_spirv-samples: | ||
name: "Validate Shaders: dneto0 spirv-samples" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download shaders | ||
run: | | ||
cd naga | ||
git clone https://github.com/dneto0/spirv-samples.git | ||
- name: Build Naga | ||
run: | | ||
cargo build --release -p naga-cli | ||
- name: Install spirv-tools | ||
run: | | ||
cd naga | ||
wget -q https://storage.googleapis.com/spirv-tools/artifacts/prod/graphics_shader_compiler/spirv-tools/linux-clang-release/continuous/1489/20210629-121459/install.tgz | ||
tar zxf install.tgz | ||
./install/bin/spirv-as --version | ||
- name: Compile spv from spvasm | ||
run: | | ||
cd naga/spirv-samples | ||
mkdir -p spv | ||
find "./spvasm" -name '*.spvasm' | while read fname; | ||
do | ||
echo "Convert to spv with spirv-as: $fname" | ||
../install/bin/spirv-as --target-env spv1.3 $(realpath ${fname}) -o ./spv/$(basename ${fname}).spv | ||
done; | ||
- name: Validate spv and generate wgsl | ||
run: | | ||
set +e | ||
cd naga/spirv-samples | ||
SUCCESS_RESULT_COUNT=0 | ||
FILE_COUNT=0 | ||
mkdir -p spv | ||
mkdir -p wgsl | ||
echo "==== Validate spv and generate wgsl ====" | ||
rm -f counter | ||
touch counter | ||
find "./spv" -name '*.spv' | while read fname; | ||
do | ||
echo "Convert: $fname" | ||
FILE_COUNT=$((FILE_COUNT+1)) | ||
../../target/release/naga --validate 27 $(realpath ${fname}) ./wgsl/$(basename ${fname}).wgsl | ||
if [[ $? -eq 0 ]]; then | ||
SUCCESS_RESULT_COUNT=$((SUCCESS_RESULT_COUNT + 1)) | ||
fi | ||
echo "Result: $(expr $FILE_COUNT - $SUCCESS_RESULT_COUNT) / $FILE_COUNT" > counter | ||
done | ||
cat counter | ||
- name: Validate output wgsl | ||
run: | | ||
set +e | ||
cd naga/spirv-samples | ||
SUCCESS_RESULT_COUNT=0 | ||
FILE_COUNT=0 | ||
rm -f counter | ||
touch counter | ||
find "./wgsl" -name '*.wgsl' | while read fname; | ||
do | ||
echo "Validate: $fname" | ||
FILE_COUNT=$((FILE_COUNT+1)) | ||
../../target/release/naga --validate 27 $(realpath ${fname}) | ||
if [[ $? -eq 0 ]]; then | ||
SUCCESS_RESULT_COUNT=$((SUCCESS_RESULT_COUNT + 1)) | ||
fi | ||
echo "Result: $(expr $FILE_COUNT - $SUCCESS_RESULT_COUNT) / $FILE_COUNT" > counter | ||
done | ||
cat counter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.