Comments (2)
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.
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)
- Compat: Disallow `textureSampleLevel`/`textureSampleCompareLevel` with `texture_depth_2d_array`
- Accuracy for AbstractFloat `fract` give unintuitive/unexpected results HOT 4
- Does writeTimestamp() belong to GPUCommandEncoder or GPURenderPassEncoder? HOT 2
- VideoFrame should use display size, not coded size HOT 13
- WGSL built in functions are very under specified HOT 1
- Function arguments cannot be modified? HOT 2
- GPUAdapter.limits seems unable to detect the true capabilities of the GPU
- Why no texel format for texture_2d, but f32, i32 or u32
- Synchronously query GPUAdapterInfo HOT 2
- Allow 3D Textures with 2D Compressed Formats HOT 1
- Numeric conversion rules wording is inconsistent
- [high-level] Should predeclared enumerant values (e.g. `position`) should be shadowable by user variables? (e.g. `let position =`) HOT 1
- [high-level] Should be support aliasing predeclared enumerant values? (e.g. user-defined `@location(pos)` mapping to `@location(position)`) HOT 1
- Reduce byte-size limit for function and private address spaces
- Reduce limit for maximum number of elements in const-expression of array type HOT 1
- Reduce limits for composite types HOT 1
- Reduce limits for the number of case selector values in a switch statement HOT 1
- Resurrect vertex formats dropped for macOS < 10.13 HOT 2
- Clarify whether type checking occurs for short-circuited RHS expressions HOT 8
- Broken Chromium bug tracker link on Implementation Status wiki page HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpuweb.