Skip to content

Update to wgpu 0.18#398

Merged
DJMcNab merged 2 commits intolinebender:mainfrom
DJMcNab:oh_eighteen
Dec 5, 2023
Merged

Update to wgpu 0.18#398
DJMcNab merged 2 commits intolinebender:mainfrom
DJMcNab:oh_eighteen

Conversation

@DJMcNab
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

@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
Copy Markdown
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
Copy Markdown
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.

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