Allow users to pass labels to be used with GPUBuffer creation

Please allow passing a label value as a string when creating any resource that uses a GPUBuffer as it’s underlying resource. Please also use default values when possible. This will make debugging MUCH easier.

See here for a further explanation:

1 Like

cc @Evgeni_Popov

Yes, we already added labels for some objects (like textures), we will improve the support for them!

1 Like

If the device functions are inside a class you can reliably use for the label and it will just show up as the name of the class. It’ll work for extending classes too (it wont be the base class’s I suggested to someone recently to do that for his shader class to register with the shader store. i think its a good strategy for any use case when you need a self describing string. Not reliable outside of classes though, probably not as a static method either.