Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handling label #19

Open
greggman opened this issue Nov 8, 2022 · 0 comments
Open

handling label #19

greggman opened this issue Nov 8, 2022 · 0 comments

Comments

@greggman
Copy link
Collaborator

greggman commented Nov 8, 2022

Here's some code that effectively wraps label

const gpuBufferPrototypeDescriptors = Object.getOwnPropertyDescriptors(GPUBuffer.prototype);

Object.defineProperty(GPUBuffer.prototype, 'label', {
  get() {
    const label = gpuBufferPrototypeDescriptors.label.get.call(this);
    console.log('label is:', label);
    return label;
  },
  set(label) {
    gpuBufferPrototypeDescriptors.label.set.call(this, label);
    console.log('label set to:', label);
  }
});

I'm not sure how what should be handled in capture. It's seems like it would be nice if label setting was just another command since I've done stuff like this in native code in the past

buffer.label = `data for frame ${frameNumber}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant