Commit Graph

59 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu
c2084b4568 Switch to Rust 2021. 2023-01-30 23:00:43 +02:00
Sylvester Hesp
8fcb61e82a Updated versions to 0.4.0 2022-12-21 16:25:51 +01:00
Eduard-Mihai Burtescu
985cce77da Use spirt 0.1.0 from crates.io 2022-12-19 15:48:54 +02:00
Eduard-Mihai Burtescu
8535bb3bf1 Minimally integrate SPIR-T (opt-in via RUSTGPU_CODEGEN_ARGS=--spirt). 2022-12-12 17:14:35 +02:00
Sylvester Hesp
d3a868027d Added ending newline to Cargo.toml 2022-11-24 08:15:36 -08:00
Sylvester Hesp
e087a5267f Upgraded compiletest_rs to 0.9.0 2022-11-24 08:15:36 -08:00
Sylvester Hesp
5e7a0755c2 Also applied default-features=false to spirv-builder 2022-11-22 07:43:06 -08:00
Sylvester Hesp
e7df2feb27 Applied workspace inheritance 2022-11-22 07:43:06 -08:00
Eduard-Mihai Burtescu
5ac500d5b9
Split out a new -types crate so spirv-builder stops loading LLVM via dylibs. (#856)
* Split out a new `-types` crate so `spirv-builder` stops loading LLVM via dylibs.

* example-wgpu-runner: halve `max_push_constant_size` so it works on RADV/Fiji.
2022-03-30 09:07:14 +02:00
David Craven
31a0be3c0a Add reduce example. 2022-02-09 18:10:22 +02:00
Eduard-Mihai Burtescu
86d669bccf compiletests: unlock // {only,ignore}-* usage. 2021-11-04 10:26:11 +02:00
Ashley Hauck
e2db97f899
Update dependencies (#765) 2021-10-14 14:38:15 +00:00
khyperia
255a6f09e6 Update compiletest to 0.7 2021-05-26 10:22:07 +03:00
Ashley Hauck
6bff395680
Build the wgpu shader at runtime (#627)
* Build the wgpu shader at runtime
2021-05-21 12:09:56 +00:00
XAMPPRocky
f88ae5b28a
Add Const Generic Image Type (#359)
* Add parameterized Image type

* nits

* Update crates/spirv-std/src/lib.rs

* Update crates/rustc_codegen_spirv/src/symbols.rs

* Update crates/rustc_codegen_spirv/src/symbols.rs

* Update symbols.rs
2021-04-28 09:47:40 +02:00
XAMPPRocky
aa444f007e
Update to glam 0.14 (#587) 2021-04-12 08:00:58 +02:00
Ashley Hauck
c3a3b20e3c
Add support for outputting multiple modules, one per entry point (#551)
* Add multimodule feature

* Use -Cllvm-args instead of -Ctarget-feature for multimodule

* Fix cargo.toml
2021-03-29 17:59:03 +02:00
Eduard-Mihai Burtescu
30c9b1fdc0 Enable incremental for release mode via [profile.<...>] overrides. 2021-03-29 10:29:17 +02:00
Eduard-Mihai Burtescu
db208e7190 Avoid ever building rustc_codegen_spirv more than once in release mode. 2021-03-29 09:05:48 +02:00
XAMPPRocky
062eb58431
Update glam (#540) 2021-03-26 09:05:33 +01:00
Eduard-Mihai Burtescu
e6a9dcec1c Allow running cargo compiletest from any sub-directory in the workspace. 2021-03-22 08:01:22 +02:00
Eduard-Mihai Burtescu
75d101af81 Remove unnecessary exclude = ["./target"] from Cargo.toml. 2021-03-22 08:01:22 +02:00
Eduard-Mihai Burtescu
3315e13528
compiletest: move the deps helper package into the workspace. (#511) 2021-03-19 19:34:08 +02:00
XAMPPRocky
27eb1d1413
Refactor validation tests to use compiletest (#464)
* Refactor validation tests to use compiletest

* Update tests/ui/lang/core/ptr/allocate_const_scalar.rs
2021-03-18 17:16:21 +00:00
Erin Power
144a447f30 Add prefer-dynamic to cargo config 2021-03-17 12:33:50 +01:00
Erin Power
c18f9e170e Disable testing on the example CPU runner 2021-03-17 11:53:50 +01:00
XAMPPRocky
6b33db07e6
Update to 0.4.0-alpha.0 (#497)
* Release 0.4.0-alpha.0

compute-shader@0.4.0-alpha.0
rustc_codegen_spirv@0.4.0-alpha.0
spirv-builder@0.4.0-alpha.0
spirv-std@0.4.0-alpha.0
spirv-std-macros@0.4.0-alpha.0

Generated by cargo-workspaces

* Update Cargo.lock, remove unused one

* Update lockfile

* update lockfile
2021-03-16 15:14:53 +01:00
Erin Power
5b46f81f3e Update lockfile 2021-03-16 13:33:32 +01:00
XAMPPRocky
6e8453f386
Decouple glam from spirv-std (#476) 2021-03-16 09:59:08 +01:00
Eduard-Mihai Burtescu
320bc05626
Use [profile.release.build-override] to optimize build dependencies. (#437) 2021-02-19 16:01:24 +02:00
Eduard-Mihai Burtescu
aed5204f4a
Mouse support for the wgpu runner, and a shader to demonstrate it. (#341) 2020-12-15 11:33:24 +00:00
Viktor Zoutman
2d75e0473f
Merged wgpu runners (#241)
* Added clap to switch between shaders

* Merged wgpu runners

* tested something related to async which i forgot to udno

* clippy

* xamprocky suggestion
2020-11-16 11:21:33 +00:00
Jake Shadle
0f3948dc27
Move out spirv-tools to separate repo (#237)
* Nuke spirv-tools

* Swap to use published spirv-tools crate
2020-11-13 09:57:12 +01:00
XAMPPRocky
c2ccdbe6ef
Update glam and re-export glam from spirv_std (#220) 2020-11-11 08:13:37 +00:00
charles-r-earp
32c2ea58bc
Compute Shaders + ExecutionMode's (#195)
* Created examples/ wgpu-example-compute-runner + wgpu-example-compute-shader.

* Working compute example, can compile and run, set local_size. Validated changes do not break rendering example.

* Added complete list of ExecutionMode's to be specified underneath ExecutionModel. Replaced SpirvAttribute::Entry ExecutionModel with an Entry struct, which includes a Vec of ExecutionMode, ExecutionModeExtra to be submitted in entry.rs. Compute example runs. Passes all tests.

* Changed Cargo license info for compute examples. Simplified compute runner to be more similar to other wgpu example. Split of entry logic in symbol.rs to separate function. Fixed issue in builder/mod.rs.

* Pulled in reorganization changes to crates + examples. In symbols.rs moved really_unsafe_ignore_bitcasts to its own Symbol match. In entry.rs, entry stubs now return the fn_id, so that entry_stub() can add the execution modes in one place. Passed all tests.

* cargo fmt

* Removed duplicate examples. Fixed cargo fmt bug in compute runner.
2020-11-10 08:10:21 +00:00
XAMPPRocky
ad610b57f5
Move top-level crates to crates/ directory (#200)
* Move top-level crates to crates/ directory

* Update docs

* Update test.sh

* Update docs.sh

* Update clippy.sh
2020-11-02 11:26:10 +01:00
Johan Andersson
8bec12831a Upgrade to latest glam fork rev 2020-10-31 00:38:23 +01:00
Gray Olson
b12a2f3f6a
Cleanup pass on example shader and vk example-runner (#109)
* get rid of vertex buffers in example

* get rid of unused attributes in example shader

* use negative viewport height to match wgpu

* remove depth buffer

* use SRGB surface

* improve tonemapping

remove 'gamma correction' in favor of hardware srgb support

* make clippy happy

* move tonemapping out of sky(), rename gl_pos to builtin_pos

* rename shaders and use sky shader in wgpu example runner

* apply srgb OETF and invert clip space for cpu example runner

* restructure example directory structure according to #170

* update winit in wgpu example runner

* fix deny.toml example crate refs

* fix ci example name on maOS

* example-shader -> sky-shader in docs

* update sky shader image

* re-enable clippy and make it happy
2020-10-30 11:38:47 -07:00
Johan Andersson
98eb8d369c
Convert to use glam for math types (#149)
* [spirv-std] Remove math types

* Temp implementation of copysign

https://github.com/EmbarkStudios/rust-gpu/issues/148

* Convert shader to use glam

* Rustfmt

* Fix wgpu-example-shader to use glam

* [spirv-std] Disable clippy::use_self

* Upgrade to latest glam branch

* Use latest glam fork

* Remove incorrect assert_uninit

After discussions with @khyperia

* Update lockfile

* Update to latest glam fork with fixes

* Use real copysign intrinsic

* Disable clippy on example-shader for now

Tracked in https://github.com/EmbarkStudios/rust-gpu/issues/186
2020-10-30 14:58:38 +01:00
Jake Shadle
307d0da66b
Add spirv-tools and spirv-tools-sys crates to wrap usage of spirv-tools (#179)
* Add spirv-headers and spirv-tools as submodules

* Add simple generator and the generated code needed for compilation

* Add first pass on spirv-tools-sys

* Add first pass on spirv-tools

* Replace invocation of spirv-opt with spirv-tools crate

* Use C++11

* Placate clippy

* Add validation, replacing spirv-val with the spirv-tools crate

* Fix MSVC warning

* Use patched spirv-tools

* Fixup metadata

* Add same compiler flags as "official" build scripts

* Update spirv-tools and generated files

* Fixup

* Add assembler and example

* Use assembler in tests

* Oops, fix macos TARGET_OS

* write -> write_all

* Start splitting spirv-tools into a compiled vs tool feature set

* Checkpointing

* Checkpoint

* Boop

* Get tests to work both with installed and compiled tools

* Cleanup CI config

* Splits steps to clearly show how long each part of a longer (eg test)
step actually takes
* Label all steps

* Explicitly disable submodule checkout

* Rustfmt

* Rename features for consistency and fix clippy warnings

* Split "core" crates from examples

* Add run_clippy bash script

* Add test script

* Remove x flag

* Newline

* Actually print out errors from running val/opt

* Revert drive-by import merging

* Change intro to take the changes this PR has into account

* Actually run tests on Windows

* Fetch only the host target to reduce fetch times

* Add more info when a spirv tool returns a non-zero exit code

* Rustfmt

* Switch tool assembler to use files to see if it fixes windows

* Use files for input and output for now until I can figure out Windows being dumb

* Fix API docs generation

* Compile and use C++ code to check Windows issue

* Return to use installed tools
2020-10-29 23:03:07 +01:00
Jake Shadle
5aa7453b19 Revert "Replace usage of spirv-* binaries with spirv-tools rust crate (#117)"
This reverts commit 0bfe303a64.
2020-10-29 22:34:26 +01:00
Jake Shadle
0bfe303a64
Replace usage of spirv-* binaries with spirv-tools rust crate (#117)
* Add spirv-headers and spirv-tools as submodules

* Add simple generator and the generated code needed for compilation

* Add first pass on spirv-tools-sys

* Add first pass on spirv-tools

* Replace invocation of spirv-opt with spirv-tools crate

* Use C++11

* Add validation, replacing spirv-val with the spirv-tools crate

* Use patched spirv-tools

* Fixup metadata

* Add same compiler flags as "official" build scripts

* Update spirv-tools and generated files

* Add assembler and example

* Use assembler in tests

* Start splitting spirv-tools into a compiled vs tool feature set

* Get tests to work both with installed and compiled tools

* Cleanup CI config

* Splits steps to clearly show how long each part of a longer (eg test)
step actually takes
* Label all steps

* Explicitly disable submodule checkout

* Rename features for consistency and fix clippy warnings

* Split "core" crates from examples

* Add run_clippy bash script

* Add test script

* Change intro to take the changes this PR has into account

* Fetch only the host target to reduce fetch times

* Add more info when a spirv tool returns a non-zero exit code

* Use files for input and output for now until I can figure out Windows being dumb
2020-10-29 21:54:25 +01:00
Viktor Zoutman
27df71f492
WGPU example (#92) 2020-10-27 02:39:56 +01:00
Ashley Hauck
75de003e0b
Move rspirv override to be directly in the crate (#150)
This fixes git references to rust-gpu, which don't pick up the workspace
override and cause obscure build failures.
2020-10-27 00:42:45 +01:00
Johan Andersson
fe18434bff
Add example to evaluate sky shader on CPU (#141) 2020-10-26 15:49:01 +01:00
Ashley Hauck
0710f9d4b5
Include example-shader in the workspace (#87)
* Include example-shader in the workspace

* Fix clippy warnings

* Fix up tests and clippy warnings

* Change clamp_ to saturate

Co-authored-by: Jasper Bekkers <bekkers@gmail.com>
2020-10-22 12:30:17 +02:00
khyperia
96bb94f9fe Merge rspirv-linker into rustc_codegen_spirv 2020-10-19 10:20:29 +02:00
Ashley Hauck
fb2ed4d26c
Convert panics to compiler errors (#66)
This is a first pass, some fatals could probably be turned into errors.
2020-10-16 12:59:04 +02:00
khyperia
1516d864f3 First try at spirv-builder 2020-10-09 17:22:07 +02:00
Jasper Bekkers
9697c22740
Linker perf (#33)
* Improve linker performance - this should loop over data significantly less

* Remove Rc and RefCell because they weren't needed in the end

* Moved some code into a DefUseAnalyer

* Point to same rspirv

* Link to rspirv git instead of locally
2020-09-17 10:55:44 +02:00