Comments (6)
Possibly relevant: https://github.com/hsivonen/simd/blob/045d4dae4e65f99fd43cd9042f5132812cae717e/src/lib.rs#L75-L79
#![feature(repr_simd)]
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy)]
#[repr(simd)]
pub struct f32x4(f32, f32, f32, f32);
from rust-gpu.
It looks like item 2 is not necessary - seems like #[repr(simd)]
is all that needed. So yeah, definitely good first issue! Mostly just step 4 is necessary, although a more senior person digging deeper into points 1 and 3 would be nice - I don't think there's any surprises there, though (but it's good to be sure).
f32x4 is already implemented in spirv-std by copying the above type, but it's just that, and needs all the impls and operators and whatnot (as well as all the other types). Defining all that repitition using macros seems neat.
from rust-gpu.
Hi, I would be interested with working on this.
From what I understand in this thread, the first thing to do would be to write the operators and impls for f32x4 using macros?
from rust-gpu.
Awesome!
This issue is a bit out of date, though: #71 added quite a few vector items. However, it wasn't very cleanly or thoroughly implemented, and needs significant work. Some tasks remaining are:
- vec4 and f32x4 are duplicated right now. One of them needs to be removed. Discussing which naming scheme to go with in discord would be nice, if you're able to join there!
- A lot of cruft from glam was copied over, this needs to be fixed (e.g.
reciprocal
), and many weird comments. - There's a lot of duplication: it'd be nice if we could deduplicate with macros or somesuch.
- The clippy
use_self
lint is disabled onspirv-std
, primarily due to violations in the vector code, it'd be good to fix those. - Tests are disabled on spirv-std right now, either remove the tests or enable them.
from rust-gpu.
Sure. I'll ping you on #rust-gpu on Discord.
from rust-gpu.
With glam and whatnot in, this is pretty much resolved.
from rust-gpu.
Related Issues (20)
- How to get spir-v with OpCapability Kernel? HOT 1
- Replace "zombie" system with post-legalization SPIR-T validation.
- documentation and examples for porting WGSL/GLSL shaders HOT 1
- spirv-std/`Image!` should expose `AccessQualifier`. HOT 3
- RuntimeArray as uniform creates invalid spv instead of erroring
- Using `arch::ignore_intersection` causes shader compilation to fail
- Infrastructure for using ShaderToy as a test corpus HOT 5
- Ported shadertoy shader runs very slow (fractal pyramid) HOT 5
- Unable to build rustc_codegen_spirv with nightly 2023-09-30 HOT 5
- Improve documentation to include visual of what example app should look like? HOT 2
- Conditionals and code generation performance HOT 3
- Cargo component not available with nightly 2023-05-27 which is publicised on crates.io
- adding spirv-std anywhere in the worskspace, slows down the CPU code due to libm feature
- Compile with Proc Macro HOT 2
- Large array variable initialization (`let arr = [0; 32 * 1024];`) compiles very slowly. HOT 2
- Inliner->`mem2reg` can quadratically amplify already-exponential inlining (turning seconds into minutes).
- Consider build CLI (e.g. `cargo gpu`) mapping `spirv-std` deps to toolchain & backend versions. HOT 4
- Make error messages more human HOT 1
- Warn (or error) on a non-pub entrypoint HOT 1
- spirv-tools: Assertion `env != SPV_ENV_WEBGPU_0' failed.(my bug report)
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 rust-gpu.