Skip to content

Commit

Permalink
Merge pull request #331 from woelper/spirv_shaderc
Browse files Browse the repository at this point in the history
Spirv shaderc
  • Loading branch information
woelper authored May 19, 2024
2 parents 795d112 + ff534bd commit 73bba16
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: matrix.os == 'ubuntu-18.04'

- name: Cross-compile arm
run: cross build --target armv7-unknown-linux-musleabihf --no-default-features
run: cross build --target armv7-unknown-linux-musleabihf --no-default-features --features notan/glsl-to-spirv
if: matrix.os == 'ubuntu-18.04'

# - name: Set up pagefile
Expand Down Expand Up @@ -49,5 +49,5 @@ jobs:
run: cargo build

- name: cargo check without default features
run: cargo check --no-default-features
run: cargo check --no-default-features --features notan/glsl-to-spirv

2 changes: 1 addition & 1 deletion .github/workflows/check_arm7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: cargo install cross

- name: Cross-compile arm
run: cross check --target armv7-unknown-linux-gnueabihf --no-default-features --features spirv
run: cross check --target armv7-unknown-linux-gnueabihf --no-default-features --features notan/glsl-to-spirv

- name: Check output
run: ls target/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_netbsd_minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
run: |
PATH=$HOME/.cargo/bin:$PATH
export PATH
cargo check --no-default-features --features spirv
cargo check --no-default-features --features notan/glsl-to-spirv
2 changes: 1 addition & 1 deletion .github/workflows/check_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: Check without default features
run: cargo check --no-default-features --features spirv
run: cargo check --no-default-features --features notan/glsl-to-spirv

# - name: Check with build features
# run: cargo check --features heif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_ubuntu_no_default_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# run: cargo build

- name: cargo check without default features
run: cargo check --no-default-features --features spirv
run: cargo check --no-default-features --features notan/glsl-to-spirv

- name: cargo check with heif
run: PKG_CONFIG_PATH=libheif/build cargo check --features heif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: vcpkg install libheif:x64-windows-static

- name: cargo check without default features
run: cargo check --no-default-features --features shaderc
run: cargo check --no-default-features --features notan/glsl-to-spirv

- name: clean
run: cargo clean
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ jobs:

- name: Cross-compile armv7
run: |
cross build --release --target armv7-unknown-linux-gnueabihf --no-default-features
cross build --release --target armv7-unknown-linux-gnueabihf --no-default-features --features notan/glsl-to-spirv
zip -r oculante_armv7_minimal.zip target/armv7-unknown-linux-gnueabihf/release/oculante
if: matrix.os == 'ubuntu-latest'

- name: Cross-compile arm64
run: |
cross build --release --target aarch64-unknown-linux-gnu --no-default-features
cross build --release --target aarch64-unknown-linux-gnu --no-default-features --features notan/glsl-to-spirv
zip -r oculante_aarch64_minimal.zip target/aarch64-unknown-linux-gnu/release/oculante
if: matrix.os == 'ubuntu-latest'

Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:

- name: Build Linux classic Application
run: |
cargo build --release --no-default-features
cargo build --release --no-default-features --features notan/glsl-to-spirv
zip -r oculante_linux_minimal.zip target/release/oculante
cargo build --release
zip -r oculante_linux.zip target/release/oculante
Expand Down
35 changes: 2 additions & 33 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,13 @@ zerocopy = "0.7.34"
icns = "0.3.1"

[features]
default = ["turbo", "avif_native", "file_open", "update", "spirv"]
default = ["turbo", "avif_native", "file_open", "update", "notan/glsl-to-spirv"]
heif = ["libheif-rs"]
avif_native = ["avif-decode"]
dav1d = ["libavif-image"]
file_open = ["rfd"]
turbo = ["turbojpeg"]
update = ["self_update"]
shaderc = ["notan/shaderc"]
spirv = ["notan/glsl-to-spirv"]



Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,15 @@ Mac
`brew install nasm`

### Cargo Features
If you disable `turbo` (on by default), the turbojpeg library will not be used to open jpeg images. You won't need Nasm to be installed.
The feature `file_open` will enable/disable a file open dialog. This pulls in additional dependencies and is enabled by default.
- `turbo` (on by default), the turbojpeg library will not be used to open jpeg images. You won't need Nasm to be installed.

- `file_open` will enable/disable a OS-native file open dialog. This pulls in additional dependencies and is enabled by default. Disabling it will enable a custom file dialog. This will probably the default in the future.

- `notan/glsl-to-spirv` (default) uses the spirv shader compiler

- `notan/shaderc` uses shaderc as a shader compiler. Longer build time.

- `update` (default) enable app updating.

### Shortcuts:
`mouse wheel` = zoom
Expand Down

0 comments on commit 73bba16

Please sign in to comment.