Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2099030
changelog: add glam version relaxation to changelog
Firestar99 Sep 19, 2024
6e65769
examples/shaders/shared: remove unused `feature(lang_items)`.
eddyb Aug 3, 2024
d90a4d0
tests: also test the `debugPrintf` generated from panics.
eddyb Aug 8, 2024
76acbd6
rustup: update to `nightly-2023-11-26`.
LegNeato Nov 27, 2023
5545bb7
rustup: update to `nightly-2023-12-16`.
LegNeato Dec 17, 2023
aac232d
rustup: update to `nightly-2023-12-31`.
LegNeato Jan 2, 2024
9e6a4e8
spirv-builder: disable MIR "GVN" optimization pass.
eddyb Aug 2, 2024
006b6a7
builder: fix `atomic_cmpxchg` for SPIR-V `OpAtomicCompareExchange`.
eddyb Aug 2, 2024
ac32c65
builder: `struct_gep` implies `inbounds`.
eddyb Aug 2, 2024
fd97e49
rustup: update to `nightly-2024-01-05`.
eddyb Aug 2, 2024
122414e
rustup: update to `nightly-2024-01-06`.
eddyb Aug 2, 2024
ef7bd74
builder: handle `ptr_add`-like GEPs (introduced by rust-lang/rust#118…
eddyb Aug 2, 2024
9370609
rustup: update to `nightly-2024-01-08`.
LegNeato Jan 9, 2024
897fcd4
rustup: update to `nightly-2024-02-01`.
eddyb Aug 3, 2024
297202e
rustup: update to `nightly-2024-03-01`.
eddyb Aug 3, 2024
175ddba
rustup: update to `nightly-2024-03-11`.
eddyb Aug 3, 2024
8b90340
spirv-builder: pass JSON files to `--target` instead of relying on th…
eddyb Aug 4, 2024
0935c79
Make stage_id use the env
LegNeato Sep 18, 2024
1c1f3c1
Further process paths on windows
LegNeato Sep 18, 2024
196ec2d
tests: add for_range_signed test
Firestar99 Sep 19, 2024
a3e8ced
rustup: update to `nightly-2024-03-21`. Breaks for_range_signed
eddyb Aug 3, 2024
cf9c4c7
rustup: update to `nightly-2024-04-01`.
eddyb Aug 3, 2024
8afae47
rustup: update to `nightly-2024-04-24`.
eddyb Aug 4, 2024
972c424
cargo update
Firestar99 Sep 19, 2024
580f827
Add correct nightly to CHANGELOG and README
LegNeato Sep 19, 2024
493dd3d
changelog: add breaking change of signed for loops no longer compiling
Firestar99 Sep 20, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Changed 🛠
- [PR#9](https://github.com/Rust-GPU/rust-gpu/pull/9) relaxed `glam` version requirements (`>=0.22, <=0.29`)
- [PR#1127](https://github.com/EmbarkStudios/rust-gpu/pull/1127) updated `spirv-tools` to `0.10.0`, which follows `vulkan-sdk-1.3.275`
- [PR#1101](https://github.com/EmbarkStudios/rust-gpu/pull/1101) added `ignore` and `no_run` to documentation to make `cargo test` pass
- [PR#1112](https://github.com/EmbarkStudios/rust-gpu/pull/1112) updated wgpu and winit in example runners
- [PR#1100](https://github.com/EmbarkStudios/rust-gpu/pull/1100) updated toolchain to `nightly-2023-09-30`
- [PR#1091](https://github.com/EmbarkStudios/rust-gpu/pull/1091) updated toolchain to `nightly-2023-08-29`
- [PR#1085](https://github.com/EmbarkStudios/rust-gpu/pull/1085) updated toolchain to `nightly-2023-07-08`
- [PR#1115](https://github.com/EmbarkStudios/rust-gpu/pull/1115) relaxed `glam` version requirements (from `>=0.22, <=0.24` to `>=0.22, <=0.25`)

### Fixed 🩹
- [PR#1129](https://github.com/EmbarkStudios/rust-gpu/pull/1129) fixed [#1062](https://github.com/EmbarkStudios/rust-gpu/issues/1062) by not flipping the comparison of the rotate amount with zero
Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shared/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Ported to Rust from <https://github.com/Tw1ddle/Sky-Shader/blob/master/src/shaders/glsl/sky.fragment>

#![cfg_attr(target_arch = "spirv", no_std, feature(lang_items))]
#![cfg_attr(target_arch = "spirv", no_std)]

use core::f32::consts::PI;
use glam::{vec3, Vec3};
Expand Down
31 changes: 31 additions & 0 deletions tests/ui/dis/panic_builtin_bounds_check.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#![crate_name = "panic_builtin_bounds_check"]

// Test that bounds checking panics get converted to `debugPrintf` correctly.

// build-pass
// compile-flags: -C target-feature=+ext:SPV_KHR_non_semantic_info
// compile-flags: -C llvm-args=--abort-strategy=debug-printf
// compile-flags: -C llvm-args=--disassemble

// FIXME(eddyb) consider using such replacements also for dealing
// with `OpLine` changing all the time (esp. in libcore functions).
//
// normalize-stderr-test "; (SPIR-V|Generator: rspirv|Version: 1\.\d+|Bound: \d+)\n" -> ""
// normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""
// normalize-stderr-test "OpSource .*\n" -> ""
// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""
// normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"

// FIXME(eddyb) handle this one in the test runner.
// normalize-stderr-test "\S*/lib/rustlib/" -> "$$SYSROOT/lib/rustlib/"

use spirv_std::spirv;

fn array_bounds_check(x: [u32; 4], i: usize) -> u32 {
x[i]
}

#[spirv(fragment)]
pub fn main() {
array_bounds_check([0, 1, 2, 3], 5);
}
38 changes: 38 additions & 0 deletions tests/ui/dis/panic_builtin_bounds_check.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
OpCapability Shader
OpCapability Float64
OpCapability Int64
OpCapability Int16
OpCapability Int8
OpCapability ShaderClockKHR
OpExtension "SPV_KHR_non_semantic_info"
OpExtension "SPV_KHR_shader_clock"
%1 = OpExtInstImport "NonSemantic.DebugPrintf"
OpMemoryModel Logical Simple
OpEntryPoint Fragment %2 "main"
OpExecutionMode %2 OriginUpperLeft
%3 = OpString "/n[Rust panicked at $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs:180:5]/n index out of bounds: the len is %u but the index is %u/n in main()/n"
%4 = OpString $SYSROOT/lib/rustlib/src/rust/library/core/src/panicking.rs"
%5 = OpString "$DIR/panic_builtin_bounds_check.rs"
%6 = OpTypeVoid
%7 = OpTypeFunction %6
%8 = OpTypeBool
%9 = OpTypeInt 32 0
%10 = OpConstant %9 5
%11 = OpConstant %9 4
%2 = OpFunction %6 None %7
%12 = OpLabel
OpLine %5 25 4
%13 = OpULessThan %8 %10 %11
OpNoLine
OpSelectionMerge %14 None
OpBranchConditional %13 %15 %16
%15 = OpLabel
OpBranch %14
%16 = OpLabel
OpLine %4 180 4
%17 = OpExtInst %6 %1 1 %3 %11 %10
OpNoLine
OpBranch %14
%14 = OpLabel
OpReturn
OpFunctionEnd
Loading