profile
viewpoint
Eduard-Mihai Burtescu eddyb @LykenSol Bucharest, Romania they/them

eddyb/cprep 15

C/C++ preprocessor.

Centril/rfc-effects 10

Preparing an RFC on effect polymorphism in Rust with focus on 'const'

eddyb/glOOF 5

glOOF: an OpenGL implementation experiment

eddyb/aoc 2

Advent of Code solutions in Rust

eddyb/bootstrap 2

HTML, CSS, and JS toolkit from Twitter

eddyb/1ml 0

1ML prototype interpreter

eddyb/cargo 0

The Rust package manager

PR opened EmbarkStudios/rust-gpu

Reviewers
rustup: update to `nightly-2023-05-27`.

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).

+184 -125

0 comment

38 changed files

pr created time in 5 hours

create barnchLykenSol/rust-gpu

branch : rustup

created branch time in 5 hours

PR opened EmbarkStudios/rust-gpu

Lower aborts (incl. panics) to "return from entry-point", instead of infinite loops.

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)

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 with Aborts only used directly from entry-points
  • in entry-points, we rewrite Aborts to a plain OpReturn (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)

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)

+270 -59

0 comment

11 changed files

pr created time in 7 hours

create barnchLykenSol/rust-gpu

branch : custom-abort

created branch time in 7 hours

push eventLykenSol/rust-gpu

Eduard-Mihai Burtescu

commit sha d35fa4219b41092bf2e4722ad18976331df2b1bf

Update `minifb` dependency.

view details

Eduard-Mihai Burtescu

commit sha 849e82e4af99bebd896980b4c406a988f8ae75e9

Update `wayland-client` dependency to fix `wl_shm` errors.

view details

BeastLe9enD

commit sha c3909b5b9fbb38c27f80a6778d9960ecb93cb48d

Fix OpAtomicFMaxEXT being used inside atomic_f_add

view details

BeastLe9enD

commit sha b67ad40feffdc5e4302c6a3a29c7d447a8d9c9e4

Add changelog

view details

Eduard-Mihai Burtescu

commit sha a9472a07437147efd1b99aba3a64d9f7885632c0

Update wgpu (and ash, to avoid duplicate deps).

view details

Eduard-Mihai Burtescu

commit sha 9cd0b2759f684687f09ed49205380c86bdb6e771

example-runner-wgpu: transition from `ndk-glue` to `android-activity`.

view details

Sylvester Hesp

commit sha a239e344b607660da1f0794c93a1bb57d5d583bd

Upgrade to nightly-2023-02-01

view details

Sylvester Hesp

commit sha 1ca358b9f6862476fbc255cf137b4b82702a154a

Upgrade to nightly-2023-02-15

view details

Sylvester Hesp

commit sha 86f0cc994f250525e129eb65b227971405d9a9bb

Upgrade to nightly-03-04

view details

Sylvester Hesp

commit sha 9f64b7c33ebbe98811d32a325da90275e4385cef

Update tests/ui/lang/issue-836.rs Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>

view details

Sylvester Hesp

commit sha 4e4eff329602831597bea0756b198c175a1388da

Reinstated comment

view details

Eduard-Mihai Burtescu

commit sha 5fffc752a02b6f07989d46c7852ef2c9a429f4cc

entry: disallow explicit/interior mutability for read-only storage classes.

view details

Eduard-Mihai Burtescu

commit sha 939f00e89e22b6f0b450b00cf85c7247ff2f3ba4

entry: "infer" -> "deduce", anonymous pair -> dedicated `struct`.

view details

Eduard-Mihai Burtescu

commit sha 11a2fe71b589e575faff575a4b6d473a5fdd4876

entry: apply `NonWritable` to read-only `StorageBuffer`s.

view details

Eduard-Mihai Burtescu

commit sha 0ace4c7c9513f4cf2109809c5beffabe95881512

linker/inline: group all 3 "type properties" into a map of "relevant globals".

view details

Eduard-Mihai Burtescu

commit sha 4ba89030eeb1857af1c21422d7d24a6d9af1b2b9

linker/inline: (negative) "relevant globals" -> (positive) "legal globals".

view details

Eduard-Mihai Burtescu

commit sha 17f18cfa107522a11dc210eeaca223bfbed6250f

linker/inline: merge `args_invalid`'s functionality into `should_inline`.

view details

Eduard-Mihai Burtescu

commit sha 137063130331583c4cb6e5f284f72b353fa7df19

linker/inline: require legal ("memory object") pointer args in `should_inline`.

view details

Eduard-Mihai Burtescu

commit sha 7b7015e8c644884a0543ab40bb0c36f7624cb879

builder: use undef `bool` instead of `false`, for `checked_binop`'s zombie.

view details

Eduard-Mihai Burtescu

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

view details

push time in 2 days

issue commentservo/servo

Running on nixos?

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
makoConstruct

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.

eddyb

comment created time in 2 days

delete branch LykenSol/rust-gpu

delete branch : rustfmt-arrays

delete time in 3 days

push eventEmbarkStudios/rust-gpu

Eduard-Mihai Burtescu

commit sha 4a987f3eb0ad2ab10ba51803bedb9d3a4906c921

Add `rustfmt.toml` with `version = "Two"` to enable formatting array patterns.

view details

Eduard-Mihai Burtescu

commit sha 188aba26fcee9f1c367591b0ca7db33f8386d21b

Remove some now-obsolete `#[rustfmt::skip]` workarounds for `rustfmt` bugs.

view details

push time in 3 days

PR merged EmbarkStudios/rust-gpu

Reviewers
Add `rustfmt.toml` with `version = "Two"` to enable formatting array patterns.

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).

+344 -355

0 comment

28 changed files

eddyb

pr closed time in 3 days

delete branch EmbarkStudios/spirt

delete branch : clippy-up

delete time in 3 days

push eventEmbarkStudios/spirt

Eduard-Mihai Burtescu

commit sha 7e0fb8d94252eb4479e035de75b11861885f75ed

Apply `clippy::redundant_pattern_matching` suggestions.

view details

Eduard-Mihai Burtescu

commit sha 4c075985da0b3c3b21110b79abb25bf8ad7bff24

Apply `clippy::redundant_pattern_matching` suggestions. (#32) Needed to unbreak CI w/ recent nightly.

view details

push time in 3 days

PR merged EmbarkStudios/spirt

Apply `clippy::redundant_pattern_matching` suggestions.

Needed to unbreak CI w/ recent nightly.

+2 -2

0 comment

1 changed file

eddyb

pr closed time in 3 days

PR opened EmbarkStudios/spirt

Apply `clippy::redundant_pattern_matching` suggestions.

Needed to unbreak CI w/ recent nightly.

+2 -2

0 comment

1 changed file

pr created time in 3 days

create barnchEmbarkStudios/spirt

branch : clippy-up

created branch time in 3 days

push eventLykenSol/rust-gpu

Eduard-Mihai Burtescu

commit sha 8aafe7c4dde426f7d8ac7f3692a84adb348e67dc

Add `rustfmt.toml` with `version = "Two"` to enable formatting array patterns.

view details

Eduard-Mihai Burtescu

commit sha 419480f7560db9bd2b5462abcc3f1c7193e256b5

Remove some now-obsolete `#[rustfmt::skip]` workarounds for `rustfmt` bugs.

view details

push time in 3 days

PR opened EmbarkStudios/rust-gpu

Reviewers
Add `rustfmt.toml` with `version = "Two"` to enable formatting array patterns.

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).

+332 -343

0 comment

23 changed files

pr created time in 3 days

create barnchLykenSol/rust-gpu

branch : rustfmt-arrays

created branch time in 3 days

delete branch EmbarkStudios/spirt

delete branch : changelog

delete time in 3 days

push eventEmbarkStudios/spirt

Eduard-Mihai Burtescu

commit sha 7d5a07f3709a3934ff9af5a30c60c2d7c48080a9

CHANGELOG: add a couple of missing entries for recent PRs.

view details

Eduard-Mihai Burtescu

commit sha 8e848a4aeeb236436448d90f81c2a0445b4d8972

CHANGELOG: add a couple of missing entries for recent PRs. (#31)

view details

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.

eddyb

comment created time in 3 days

create barnchEmbarkStudios/spirt

branch : changelog

created branch time in 3 days

release EmbarkStudios/rust-gpu

v0.8.0

released time in 3 days

created tagEmbarkStudios/rust-gpu

tagv0.8.0

🐉 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
cybersoulK

comment created time in 3 days

delete branch LykenSol/rust-gpu

delete branch : pr-0.8.0

delete time in 3 days

push eventEmbarkStudios/rust-gpu

Eduard-Mihai Burtescu

commit sha cfaabbab08739d1e6b467d9a6e971dde06264a61

Bump version to `0.8.0`.

view details

push time in 3 days

PR merged EmbarkStudios/rust-gpu

Reviewers
Bump version to `0.8.0`.

Need to get this landed first before I can tag and publish the new release.

+20 -17

0 comment

5 changed files

eddyb

pr closed time in 3 days

more