Skip to content

Assert fails in requestAdapter #28

@gautam1168

Description

@gautam1168

I am following the tutorial on my windows laptop and in the https://eliemichel.github.io/LearnWebGPU/getting-started/the-adapter.html in requestAdapter function its mentioned that we should wait for onAdapterReady before doing the assert but we do it immediately anyway.

     // In theory we should wait until onAdapterReady has been called, which
    // could take some time (what the 'await' keyword does in the JavaScript
    // code). In practice, we know that when the wgpuInstanceRequestAdapter()
    // function returns its callback has been called.
    assert(userData.requestEnded);

However, this assert is firing for me with this warning:

Warning: Disable Intel Vulkan adapter on Windows driver version 100.6911. See https://crbug.com/1338622.
 - While initializing adapter (backend=BackendType::Vulkan)
    at InitializeImpl (C:\Users\gauta\Codes\wgpu\build\_deps\dawn-src\src\dawn\native\vulkan\PhysicalDeviceVk.cpp:107)
    at Initialize (C:\Users\gauta\Codes\wgpu\build\_deps\dawn-src\src\dawn\native\PhysicalDevice.cpp:35)

Assertion failed: userData.requestEnded, file C:\Users\gauta\Codes\wgpu\main.cpp, line 41

If I remove the assert I can enumerate the features of the adapter, which I am assuming means I am getting the adapter:

Hello world!
WebGPU instance: 000002A2AE3F1B60
Warning: Disable Intel Vulkan adapter on Windows driver version 100.6911. See https://crbug.com/1338622.
 - While initializing adapter (backend=BackendType::Vulkan)
    at InitializeImpl (C:\Users\gauta\Codes\wgpu\build\_deps\dawn-src\src\dawn\native\vulkan\PhysicalDeviceVk.cpp:107)
    at Initialize (C:\Users\gauta\Codes\wgpu\build\_deps\dawn-src\src\dawn\native\PhysicalDevice.cpp:35)

Got adapter: 000002A2B11A29A0
Adapter features:
 - 5
 - 1
 - 2
 - 8
 - 10
 - 11
 - 1002
 - 1004
 - 1007
 - 1008
 - 1009

I tried to find where that onAdapterReady callback is to be passed. But I couldn't find it on google. Can you please include how to pass it?


Additionally when setting up the tutorial the step that installs the dawn-src didn't work for me. I went into the folder and manually ran the git clone commands mentioned in the cmake files to make it work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions