Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to wgpu 0.18 #398

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Update to wgpu 0.18 #398

merged 2 commits into from
Dec 5, 2023

Conversation

DJMcNab
Copy link
Member

@DJMcNab DJMcNab commented Oct 26, 2023

All examples seem to work as expected

waywardmonkeys
waywardmonkeys previously approved these changes Oct 27, 2023
Copy link
Contributor

@waywardmonkeys waywardmonkeys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So happy to see that timestamp_period going away.

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sadly still getting "map callback was leaked" errors, plus "failed to get surface texture: Timeout" on my Windows 10, AMD 5700 XT system. That may be some kind of problem with my setup, though it did work with wgpu 0.16 as I recall.

Further, it is breaking Metal.

Caused by:
    In Device::create_compute_pipeline
      note: label = `fine`
    Internal error: Metal: program_source:454:16: error: use of undeclared identifier '_e7'
    float fb = _e7;

Doing a little bit of digging, that's this this fragment of blend.wgsl:

// Apply general compositing operation.
// Inputs are separated colors and alpha, output is premultiplied.
fn blend_compose(
    cb: vec3<f32>,
    cs: vec3<f32>,
    ab: f32,
    as_: f32,
    mode: u32
) -> vec4<f32> {
    var fa = 0.0;
    var fb = 0.0;
    switch mode {

being compiled to this:

metal::float4 blend_compose(
    metal::float3 cb_6,
    metal::float3 cs_6,
    float ab,
    float as,
    uint mode_1
) {
    float fa = 0.0;
    float fb = _e7;

Seems like some kind of constant folding gone wrong. So I don't think we should merge this until we have a workaround.

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified that this is working on mac with naga 0.14.1. I didn't try to resolve the merge conflicts myself, just ran the branch. Hopefully those won't be too difficult.

It'll be nice to be on wgpu 0.18, as there are a number of things we want to investigate, including slow shader compilation on D3D12.

@DJMcNab DJMcNab merged commit 9732854 into linebender:main Dec 5, 2023
4 checks passed
@DJMcNab DJMcNab deleted the oh_eighteen branch December 5, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants