There are significant changes in the newest wgpu API (I have 24.0.3.1 because I need to manually download it). In new version without updating the guide even basic ones like hello triangle would be broken.
Most notable ones:
- webgpu have its own "string" now
Old way setting a string no longer work:
CommandEncoderDescriptor encoderDesc = {};
encoderDesc.label = "My command encoder";
Now these fields need a WGPUStringView instance:
#define WSTR(s) WGPUStringView{ s, strlen(s) }
CommandEncoderDescriptor encoderDesc = {};
encoderDesc.label = WSTR("My command encoder");
I think this should be done in some c++ idiom :)
- some struct names are changed
Like the ShaderModuleWGSLDescriptor has been renamed to WGPUShaderSourceWGSL. For somewhat "complex" structures like these chains, this may confuse people.
- probably there are more
Sadly I progress very slowly on c++ and webgpu and may not help to write the guides directly, so updates would be glad :)
There are significant changes in the newest wgpu API (I have 24.0.3.1 because I need to manually download it). In new version without updating the guide even basic ones like hello triangle would be broken.
Most notable ones:
Old way setting a string no longer work:
CommandEncoderDescriptor encoderDesc = {}; encoderDesc.label = "My command encoder";Now these fields need a
WGPUStringViewinstance:I think this should be done in some c++ idiom :)
Like the
ShaderModuleWGSLDescriptorhas been renamed toWGPUShaderSourceWGSL. For somewhat "complex" structures like these chains, this may confuse people.Sadly I progress very slowly on c++ and webgpu and may not help to write the guides directly, so updates would be glad :)