eddyb/cprep 15
C/C++ preprocessor.
Preparing an RFC on effect polymorphism in Rust with focus on 'const'
glOOF: an OpenGL implementation experiment
Advent of Code solutions in Rust
HTML, CSS, and JS toolkit from Twitter
1ML prototype interpreter
The Rust package manager
PR opened EmbarkStudios/rust-gpu
Learned my lesson with 0.8
, so let's get this out of the way early in the 0.9
release cycle.
<sub>(And yes, there was panic!
-related nonsense to deal with this time too: if cfg!(debug_assertions)
not being optimized out)</sub>
Leaving as draft until #1070 lands, just to keep testing simpler (though it's not that critical of an issue).
pr created time in 5 hours
PR opened EmbarkStudios/rust-gpu
We currently map the abort
intrinsic (used almost exclusively for panic) to infinite loops, and they either:
- are optimized out by
spirv-opt
or drivers (i.e. treated as UB)- this obviously changes the semantics, and if a conditional panic protected against some UB, now that UB is unconditional and could affect more code
- worst case, unwanted side-effects could run (e.g. writes of corrupted values, to buffers)
- are preserved by both
spirv-opt
and drivers, and cause a timeout when used- see these previous discussions for what it take to intentionally cause this:
- https://github.com/EmbarkStudios/rust-gpu/issues/1048
- https://github.com/EmbarkStudios/rust-gpu/pull/1055
- however, this is only a reliable option cross-hardware only for compute-only Vulkan queues (not just compute shaders, but compute shaders on a non-graphical queue), where the timeout can't block other work
- worst case, one can easily accidentally hang their entire desktop if GPU compositing is involved
- (yes I've done this to myself while trying out the barrier trick, no it wasn't fun)
- see these previous discussions for what it take to intentionally cause this:
With infinite loops being so terrible, I propose we move towards a "well-defined invocation exit" approach, where we keep the "abort" as a custom instruction (using our "extended instruction set", added in #1064), and then effectively emulate the semantics of OpTerminateInvocation
for it by:
- inlining any function that uses our custom
Abort
(either directly, or transitively through some functions it calls) - in the end, we should end up withAbort
s only used directly from entry-points - in entry-points, we rewrite
Abort
s to a plainOpReturn
(from the entry-point, i.e. exiting the invocation)- we could potentially have a mode where we generate a
debugPrintf
call at this point, with the same inlining-aware "backtrace" we use elsewhere, so that the user gets some feedback if they have the validation layers enabled (and/or try to extract a panic message when we generate the abort in the first place, too)
- we could potentially have a mode where we generate a
This PR implements that proposal (but without any debugPrintf
conveniences), and so far it seems to work great, but I haven't tested the performance impact (i.e. where before the infinite loops were optimized away, now we're seeing an actual cost to various e.g. bounds checks, that need to do something at all).
There are also other ways of implementing this, and we could do the Abort
-> OpReturn
rewriting very late (if we think it would be better than letting the SPIR-T structurizer see it), so there's some room to explore mitigations to perf issues, if they arise.
(I will leave this PR as draft until we're sure about the perf aspects)
pr created time in 7 hours
push eventLykenSol/rust-gpu
commit sha d35fa4219b41092bf2e4722ad18976331df2b1bf
Update `minifb` dependency.
commit sha 849e82e4af99bebd896980b4c406a988f8ae75e9
Update `wayland-client` dependency to fix `wl_shm` errors.
commit sha c3909b5b9fbb38c27f80a6778d9960ecb93cb48d
Fix OpAtomicFMaxEXT being used inside atomic_f_add
commit sha b67ad40feffdc5e4302c6a3a29c7d447a8d9c9e4
Add changelog
commit sha a9472a07437147efd1b99aba3a64d9f7885632c0
Update wgpu (and ash, to avoid duplicate deps).
commit sha 9cd0b2759f684687f09ed49205380c86bdb6e771
example-runner-wgpu: transition from `ndk-glue` to `android-activity`.
commit sha a239e344b607660da1f0794c93a1bb57d5d583bd
Upgrade to nightly-2023-02-01
commit sha 1ca358b9f6862476fbc255cf137b4b82702a154a
Upgrade to nightly-2023-02-15
commit sha 86f0cc994f250525e129eb65b227971405d9a9bb
Upgrade to nightly-03-04
commit sha 9f64b7c33ebbe98811d32a325da90275e4385cef
Update tests/ui/lang/issue-836.rs Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
commit sha 4e4eff329602831597bea0756b198c175a1388da
Reinstated comment
commit sha 5fffc752a02b6f07989d46c7852ef2c9a429f4cc
entry: disallow explicit/interior mutability for read-only storage classes.
commit sha 939f00e89e22b6f0b450b00cf85c7247ff2f3ba4
entry: "infer" -> "deduce", anonymous pair -> dedicated `struct`.
commit sha 11a2fe71b589e575faff575a4b6d473a5fdd4876
entry: apply `NonWritable` to read-only `StorageBuffer`s.
commit sha 0ace4c7c9513f4cf2109809c5beffabe95881512
linker/inline: group all 3 "type properties" into a map of "relevant globals".
commit sha 4ba89030eeb1857af1c21422d7d24a6d9af1b2b9
linker/inline: (negative) "relevant globals" -> (positive) "legal globals".
commit sha 17f18cfa107522a11dc210eeaca223bfbed6250f
linker/inline: merge `args_invalid`'s functionality into `should_inline`.
commit sha 137063130331583c4cb6e5f284f72b353fa7df19
linker/inline: require legal ("memory object") pointer args in `should_inline`.
commit sha 7b7015e8c644884a0543ab40bb0c36f7624cb879
builder: use undef `bool` instead of `false`, for `checked_binop`'s zombie.
commit sha 016363a2ebcc79c1349ca472d01d3d02065ff6fb
tests/ui: fix "invalid character in crate name" w/ explicit `#![crate_name]`. For the state of this commit on top of 3fca36ec, before rebasing, see this gist: https://gist.github.com/eddyb/50c055df2e10756a2704277619e36857
push time in 2 days
issue commentservo/servo
If you want to run existing executables, I recommend installing steam-run
and then you can do steam-run ./servo
.
The reason it has "steam" in the name is that that's the same FHS chroot used for Steam itself, so it should support a large number of Linux binaries that expect a Debian/Ubuntu environment and graphical/audio/etc. support.
For previous discussion about building Servo yourself, see:
- https://github.com/servo/servo/issues/10468
comment created time in 2 days
issue commentservo/rust-smallvec
`SmallVec` should implement `From<[T; N]>` (gated by `cfg(feature = "const_generics")`).
Sorry, with #[cfg(feature = "const_generics")]
I'm talking about smallvec
adding a Cargo package feature named const_generics
(or it could be named anything else), completely unrelated to the Rust language feature of the same name.
comment created time in 2 days
push eventEmbarkStudios/rust-gpu
commit sha 4a987f3eb0ad2ab10ba51803bedb9d3a4906c921
Add `rustfmt.toml` with `version = "Two"` to enable formatting array patterns.
commit sha 188aba26fcee9f1c367591b0ca7db33f8386d21b
Remove some now-obsolete `#[rustfmt::skip]` workarounds for `rustfmt` bugs.
push time in 3 days
PR merged EmbarkStudios/rust-gpu
Was checking something about SPIR-T CI and realized I'd forgotten I ended up with a rustfmt.toml
for SPIR-T that contained version = "Two"
because of this PR:
- https://github.com/rust-lang/rustfmt/pull/4994
I'm not really sure why a decision was taken to not enable formatting array/slice patterns by default, making them nearly-unusable in non-trivial cases, but this is the result.
You'll notice there's many more changes than just array/slice patterns, looks like version = "Two"
also enables a few more quality-of-life improvements as well, and I'm not sure if it's the direct cause but I was also able to remove some #[rustfmt::skip]
s which didn't do anything anymore (see the second commit).
pr closed time in 3 days
push eventEmbarkStudios/spirt
commit sha 7e0fb8d94252eb4479e035de75b11861885f75ed
Apply `clippy::redundant_pattern_matching` suggestions.
commit sha 4c075985da0b3c3b21110b79abb25bf8ad7bff24
Apply `clippy::redundant_pattern_matching` suggestions. (#32) Needed to unbreak CI w/ recent nightly.
push time in 3 days
PR merged EmbarkStudios/spirt
Needed to unbreak CI w/ recent nightly.
pr closed time in 3 days
PR opened EmbarkStudios/spirt
Needed to unbreak CI w/ recent nightly.
pr created time in 3 days
push eventLykenSol/rust-gpu
commit sha 8aafe7c4dde426f7d8ac7f3692a84adb348e67dc
Add `rustfmt.toml` with `version = "Two"` to enable formatting array patterns.
commit sha 419480f7560db9bd2b5462abcc3f1c7193e256b5
Remove some now-obsolete `#[rustfmt::skip]` workarounds for `rustfmt` bugs.
push time in 3 days
PR opened EmbarkStudios/rust-gpu
Was checking something about SPIR-T CI and realized I'd forgotten I ended up with a rustfmt.toml
for SPIR-T that contained version = "Two"
because of this PR:
- https://github.com/rust-lang/rustfmt/pull/4994
I'm not really sure why a decision was taken to not enable formatting array/slice patterns by default, making them nearly-unusable in non-trivial cases, but this is the result.
You'll notice there's many more changes than just array/slice patterns, looks like version = "Two"
also enables a few more quality-of-life improvements as well, and I'm not sure if it's the direct cause but I was also able to remove some #[rustfmt::skip]
s which didn't do anything anymore (see the second commit).
pr created time in 3 days
push eventEmbarkStudios/spirt
commit sha 7d5a07f3709a3934ff9af5a30c60c2d7c48080a9
CHANGELOG: add a couple of missing entries for recent PRs.
commit sha 8e848a4aeeb236436448d90f81c2a0445b4d8972
CHANGELOG: add a couple of missing entries for recent PRs. (#31)
push time in 3 days
pull request commentEmbarkStudios/spirt
CHANGELOG: add a couple of missing entries for recent PRs.
Clippy fails but will merge as-is and fix clippy in another PR.
comment created time in 3 days
created tagEmbarkStudios/rust-gpu
🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧
created time in 3 days
issue commentEmbarkStudios/rust-gpu
Rust-gpu in crates.io is misleading
and think it's outdated in
crates.io
To be clear, there's nothing there, it's just reserved. It might be good to yank it (as long as that keeps the reservation), which would prevent people from accidentally trying to use it (cc @repi).
We may still end up using it, e.g. if this RFC lands, it could become a namespace crate:
- https://github.com/rust-lang/rfcs/pull/3243
comment created time in 3 days
push eventEmbarkStudios/rust-gpu
commit sha cfaabbab08739d1e6b467d9a6e971dde06264a61
Bump version to `0.8.0`.
push time in 3 days
PR merged EmbarkStudios/rust-gpu
Need to get this landed first before I can tag and publish the new release.
pr closed time in 3 days