Git Product home page Git Product logo

Comments (2)

Kangz avatar Kangz commented on June 10, 2024

Your mention of "trait" seems to imply that this is related to the wgpu-rs library and not the WebGPU Javascript specification that this repo is for. However the same sort of capability would be useful in Javascript and there has been multiple prototypes of what a helper library could look like. Tentatively closing both because it seems a wgpu-rs issue, but also because work around reflection is discussed in #624.

from gpuweb.

Alphapage avatar Alphapage commented on June 10, 2024

Very interesting...
But I think a javascript developer doesn't want to deal with memory layout even with a helper tool.
It is the job of webgpu to take flatten bytes, matching wgsl struct and transform the buffer to the correct memory layout for gpu or in reverse transform the memory layout to contiguous bytes depending on wgsl struct or primitive back from gpu.
and as a rust developer, I don't want to care about memory layout except for few cases whose need to switch to a low level api of course.
I don't understand why webgpu can do it, but nothing will be implemented: this is probably a choice (a bad choice in my opinion)!

from gpuweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.