Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: expipiplus1/slang
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eb561fcd571c173cff541a98beb46b16959d010e
Choose a base ref
..
head repository: expipiplus1/slang
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b200a41b99cb8c64c272a003324d7111f94c85d1
Choose a head ref
Showing with 2,169 additions and 320 deletions.
  1. +51 −0 .github/workflows/benchmark.yml
  2. +180 −0 .github/workflows/ci.yml
  3. +67 −0 .github/workflows/compile-regression-test.yml
  4. +15 −0 .github/workflows/dockerfiles/ubuntu-18.04-x64/Dockerfile
  5. +23 −0 .github/workflows/ensure-pr-label.yml
  6. +102 −0 .github/workflows/falcor-compiler-perf-test.yml
  7. +93 −0 .github/workflows/falcor-test.yml
  8. +62 −0 .github/workflows/push-benchmark-results.yml
  9. +61 −0 .github/workflows/release-linux-glibc-2-17.yml
  10. +214 −0 .github/workflows/release.yml
  11. +112 −0 .github/workflows/vk-gl-cts-nightly.yml
  12. +28 −15 README.md
  13. +2 −2 docs/build_reference.ps1
  14. +1 −1 docs/cpu-target.md
  15. +1 −1 docs/cuda-target.md
  16. +3 −3 docs/design/autodiff/decorators.md
  17. +2 −2 docs/design/autodiff/types.md
  18. +3 −3 docs/design/capabilities.md
  19. +2 −2 docs/design/coding-conventions.md
  20. +1 −1 docs/design/interfaces.md
  21. +2 −2 docs/design/overview.md
  22. +2 −2 docs/design/serialization.md
  23. +7 −7 docs/design/stdlib-intrinsics.md
  24. +1 −1 docs/doc-system.md
  25. +2 −2 docs/gpu-feature/texture/footprint-queries.md
  26. +3 −3 docs/language-reference/04-types.md
  27. +1 −1 docs/language-reference/07-declarations.md
  28. +2 −2 docs/proposals/007-variadic-generics.md
  29. +5 −5 docs/proposals/008-tuples.md
  30. +2 −2 docs/proposals/010-new-diff-type-system.md
  31. +3 −3 docs/proposals/implementation/ast-ir-serialization.md
  32. +3 −3 docs/proposals/legacy/001-basic-interfaces.md
  33. +1 −1 docs/proposals/legacy/003-error-handling.md
  34. +4 −4 docs/stdlib-docgen.md
  35. +1 −1 docs/user-guide/00-introduction.md
  36. +2 −2 docs/user-guide/02-conventional-features.md
  37. +2 −2 docs/user-guide/07-autodiff.md
  38. +9 −9 docs/user-guide/08-compiling.md
  39. +3 −3 docs/user-guide/a1-03-obfuscation.md
  40. +1 −1 docs/user-guide/a1-04-interop.md
  41. +9 −0 docs/user-guide/a3-02-reference-capability-atoms.md
  42. +30 −0 source/compiler-core/slang-language-server-protocol.h
  43. +10 −1 source/slang-wasm/CMakeLists.txt
  44. +146 −0 source/slang-wasm/slang-wasm-bindings.cpp
  45. +310 −0 source/slang-wasm/slang-wasm.cpp
  46. +123 −0 source/slang-wasm/slang-wasm.h
  47. +22 −0 source/slang/core.meta.slang
  48. +15 −0 source/slang/hlsl.meta.slang
  49. +12 −0 source/slang/slang-capabilities.capdef
  50. +17 −26 source/slang/slang-language-server-completion.cpp
  51. +27 −14 source/slang/slang-language-server-completion.h
  52. +262 −160 source/slang/slang-language-server.cpp
  53. +78 −33 source/slang/slang-language-server.h
  54. +17 −0 tests/language-feature/generics/generic-vector-cast.slang
  55. +12 −0 tests/spirv/double-atomic-add-byte-address-buffer.slang
51 changes: 51 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: MDL Benchmark

on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
pull_request:
branches: [master]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: [Windows, self-hosted]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: '0'
- name: Common setup
uses: ./.github/actions/common-setup
with:
os: windows
compiler: cl
platform: x86_64
config: release
build-llvm: true
- name: Build Slang
run: |
cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM -DCMAKE_COMPILE_WARNING_AS_ERROR=false
cmake --workflow --preset release
- uses: actions/checkout@v3
with:
repository: 'shader-slang/MDL-SDK'
path: 'external/MDL-SDK'
- name: Run benchmark
run: |
cd tools/benchmark
cp ../../external/MDL-SDK/examples/mdl_sdk/dxr/content/slangified/*.slang .
pip install prettytable argparse
python compile.py --samples 1 --target dxil
180 changes: 180 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
name: CI

on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
pull_request:
branches: [master]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: [linux, macos, windows]
config: [debug, release]
compiler: [gcc, clang, cl]
platform: [x86_64, aarch64, wasm]
exclude:
# Default to x64, but aarch64 on osx
- { os: linux, platform: aarch64 }
- { os: windows, platform: aarch64 }
- { os: macos, platform: x86_64 }
- { os: linux, config: debug, platform: wasm }
- { os: windows, platform: wasm }
- { os: macos, platform: wasm }
# Unused compiler configs
- { os: linux, compiler: clang }
- { os: linux, compiler: cl }
- { os: windows, compiler: gcc }
- { os: windows, compiler: clang }
- { os: macos, compiler: gcc }
- { os: macos, compiler: cl }
include:
- { os: linux, runs-on: ubuntu-20.04 }
- { os: macos, runs-on: macos-latest }
- { os: windows, runs-on: windows-latest }
# Warnings are treated as errors by default.
# But we may want to disable it temporarily.
- { os: linux, warnings-as-errors: true }
- { os: macos, warnings-as-errors: true }
- { os: windows, warnings-as-errors: true }
# Set a test category depending on the config, smoke by default,
# quick or full conditionally otherwise
- test-category: smoke
- { os: windows, test-category: quick }
- { config: release, test-category: full }
# default not full gpu tests
- full-gpu-tests: false
# The runners don't have a GPU by default except for the self-hosted ones
- has-gpu: false
# Self-hosted aarch64 build
- os: linux
config: release
compiler: gcc
platform: aarch64
test-category: smoke
full-gpu-tests: false
runs-on: [self-hosted, Linux, ARM64]
has-gpu: true
# Self-hosted full gpu build
- os: windows
config: release
compiler: cl
platform: x86_64
test-category: full
full-gpu-tests: true
runs-on: [Windows, self-hosted]
has-gpu: true
fail-fast: false
runs-on: ${{ matrix.runs-on }}

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: '0'
- name: Setup
uses: ./.github/actions/common-setup
with:
os: ${{matrix.os}}
compiler: ${{matrix.compiler}}
platform: ${{matrix.platform}}
config: ${{matrix.config}}
build-llvm: ${{ matrix.platform != 'wasm' }}
- name: Build Slang
run: |
if [[ "${{ matrix.platform }}" = "wasm" ]]; then
git clone https://github.com/emscripten-core/emsdk.git
pushd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
popd
cmake --workflow --preset generators --fresh
mkdir generators
cmake --install build --prefix generators --component generators
emcmake cmake -DSLANG_GENERATORS_PATH=generators/bin --preset emscripten -G "Ninja" -DSLANG_SLANG_LLVM_FLAVOR=DISABLE
cmake --build --preset emscripten --target slang
[ -f "build.em/Release/lib/libslang.a" ]
[ -f "build.em/Release/lib/libcompiler-core.a" ]
[ -f "build.em/Release/lib/libcore.a" ]
else
if [[ "${{ matrix.os }}" =~ "windows" && "${{ matrix.config }}" != "release" ]]; then
# Doing a debug build will try to link against a release built llvm, this
# is a problem on Windows, so make slang-llvm in release build and use
# that as though it's a fetched binary via these presets.
cmake --workflow --preset slang-llvm
# Configure, pointing to our just-generated slang-llvm archive
cmake --preset default --fresh \
-DSLANG_SLANG_LLVM_FLAVOR=FETCH_BINARY \
"-DSLANG_SLANG_LLVM_BINARY_URL=$(pwd)/build/dist-release/slang-llvm.zip" \
"-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}}"
cmake --workflow --preset "${{matrix.config}}"
else
# Otherwise, use the system llvm we have just build or got from the
# cache in the setup phase
cmake --preset default --fresh \
-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}}
cmake --workflow --preset "${{matrix.config}}"
fi
fi
- name: Test Slang
if: ${{ matrix.platform != 'wasm' }}
run: |
export SLANG_RUN_SPIRV_VALIDATION=1
export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1
if [[ "${{matrix.full-gpu-tests}}" == "true" ]]; then
"$bin_dir/slang-test" \
-use-test-server \
-server-count 8 \
-category ${{ matrix.test-category }} \
-api all-cpu
elif [[ "${{matrix.has-gpu}}" == "true" ]]; then
"$bin_dir/slang-test" \
-use-test-server \
-category ${{ matrix.test-category }} \
-api all-dx12 \
-expected-failure-list tests/expected-failure-github.txt
else
"$bin_dir/slang-test" \
-use-test-server \
-category ${{ matrix.test-category }} \
-api all-dx12 \
-expected-failure-list tests/expected-failure-github.txt \
-expected-failure-list tests/expected-failure-record-replay-tests.txt
fi
- name: Test Slang via glsl
if: ${{ matrix.full-gpu-tests && matrix.platform != 'wasm' }}
run: |
export SLANG_RUN_SPIRV_VALIDATION=1
export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1
"$bin_dir/slang-test" \
-use-test-server \
-server-count 8 \
-category ${{ matrix.test-category }} \
-emit-spirv-via-glsl \
-api vk \
-expected-failure-list tests/expected-failure.txt
- uses: actions/upload-artifact@v3
if: ${{ ! matrix.full-gpu-tests }}
with:
name: slang-build-${{matrix.os}}-${{matrix.platform}}-${{matrix.compiler}}-${{matrix.config}}
# The install directory used in the packaging step
path: build/dist-${{matrix.config}}/**/ZIP/slang/*
67 changes: 67 additions & 0 deletions .github/workflows/compile-regression-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Compile Regression-Test

on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
timeout-minutes: 100
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [windows]
config: [release]
compiler: [cl]
platform: [x86_64]
include:
# Self-hosted falcor tests
- warnings-as-errors: true
test-category: full
full-gpu-tests: false
runs-on: [Windows, self-hosted, regression-test]
runs-on: ${{ matrix.runs-on }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: '0'
- name: Setup
uses: ./.github/actions/common-setup
with:
os: ${{matrix.os}}
compiler: ${{matrix.compiler}}
platform: ${{matrix.platform}}
config: ${{matrix.config}}
build-llvm: true
- name: Build Slang
run: |
cmake --preset default --fresh \
-DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM \
-DCMAKE_COMPILE_WARNING_AS_ERROR=${{matrix.warnings-as-errors}} \
-DSLANG_ENABLE_CUDA=1
cmake --workflow --preset "${{matrix.config}}"
- name: Run compile and validation test
run: |
cp -r /c/slang_compile_test_suite_a .
cd slang_compile_test_suite_a
export SLANGC_PATH="$bin_dir/slangc.exe"
bash ./compile_all_slang.sh
15 changes: 15 additions & 0 deletions .github/workflows/dockerfiles/ubuntu-18.04-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:18.04
RUN apt update
RUN apt install -y software-properties-common wget git build-essential zip libx11-dev zlib1g-dev
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
RUN apt update
RUN apt install -y gcc-9 g++-9
RUN update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-9 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-9 \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-9 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-9 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-9 \
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 \
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9
23 changes: 23 additions & 0 deletions .github/workflows/ensure-pr-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Verify PR Labels
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
paths-ignore:
- 'docs/**'
- 'LICENCE'
- 'CONTRIBUTION.md'
- 'README.md'
jobs:
label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: |
pr: non-breaking
pr: breaking change
Loading