Skip to content

device.createBindGroup throws Error: Cannot convert "undefined" to HostObject #319

@friyiajr

Description

@friyiajr

Code Reproducer:

Description of Problem

I've been working through the WebGPU tutorial and things have been working quite well on Chrome. I made an attempt at getting this example from the tutorial to run on React Native but had no success. It seems like bindGroup isn't working properly on mobile based on this stack trace. I could be missing something, but it does seem like this should work.

 LOG  device.createBindGroup [Function createBindGroup]
 ERROR  [Error: Uncaught (in promise, id: 0) Error: Cannot convert "undefined" to HostObject<rnwgpu::GPUBuffer>! It is undefined!] 

Code: custom-webgpu.tsx
  236 |       console.log("device.createBindGroup", device.createBindGroup);
  237 |
> 238 |       const bindGroup = device.createBindGroup({
      |                                               ^
  239 |         label: "bind group for objects",
  240 |         layout: pipeline.getBindGroupLayout(0),
  241 |         entries: [
Call Stack
  <anonymous> (src/components/custom-webgpu.tsx:238:47)

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