webgpu-native / webgpu-headers

**NOT STABLE YET!** See README.
https://webgpu-native.github.io/webgpu-headers/
BSD 3-Clause "New" or "Revised" License
387 stars 45 forks source link

Separate global and device-local GetProcAddress? #316

Closed kainino0x closed 1 month ago

kainino0x commented 3 months ago

Right now we have wgpuGetProcAddress(NULLABLE device, string) (it's supposed to be nullable, though it isn't right now). This is because it could be possible to have device-specific functions - #3.

However I don't think anything is using this right now. Since wgpuGetProcAddress(nullptr, string) is the common case I am wondering if we should change it to just wgpuGetProcAddress(string), and (now or later) add a separate wgpuDeviceGetProcAddress(NONNULL device, string). This also matches the "object-oriented" function signature pattern better.

cc @Kangz @austinEng

kainino0x commented 2 months ago

Sep 12 meeting notes: