Commit Graph

675 Commits

Author SHA1 Message Date
cfbd5547cb spirv: move indexable check into the gpu.rs backend 2022-07-25 12:44:02 -07:00
d1765554fc spirv/gpu.rs: don't hard-code Vec3<f32> size
in the future this may become parameterized
2022-07-25 12:36:50 -07:00
38a47a0054 split most of the GPU spirv sim stuff into its own file 2022-07-25 12:29:45 -07:00
2032e90688 spirv_bindings: remove the IntoFfi/FromFfi stuff 2022-07-25 00:55:43 -07:00
8a16a5ce30 lift SimMeta from spirv_backend -> coremem_types 2022-07-25 00:52:11 -07:00
15aaa3e893 move spirv_backend/sim.rs -> coremem_types/step.rs 2022-07-25 00:40:27 -07:00
5fec965549 Optional: derive fmt and serde traits based on feature flag 2022-07-25 00:35:57 -07:00
5490634fe7 move Optional out of spirv_backend and into coremem_types 2022-07-25 00:35:04 -07:00
9c7ef7ec88 spirv_backend: split the array operations out of sim.rs -> adapt.rs 2022-07-25 00:28:03 -07:00
8ab89640f2 spirv_backend: split out some of the spirv entry point adapters into adapt.rs 2022-07-25 00:21:20 -07:00
ebd2762d7a spirv: sim: adjust so Step{E,H}Context does not use ArrayHandle
the specific way to accomplish this is touchy.
see <https://github.com/EmbarkStudios/rust-gpu/issues/312#issuecomment-738824131>:

> So I'd say placing any of the spirv_std::storage_class types into an aggregate (including capturing it in a closure) is unsupported for now

in our specific case, we can't return a tuple where one element is a `&`
to a spirv Input, and another element is a `&mut` to a spirv Output.

when we have a struct, it can enclose either ONLY inputs,
or ONLY outputs -- not a mix.

i'm not 100% on how the Serialized stuff works, since it appears to
violate that. i guess that's exactly what this ArrayHandle stuff
achieves though.
2022-07-24 22:57:41 -07:00
05f5f75dd3 spirv: remove the ArrayHandleMut artifacts in Step{H,E}Context
this will make it easier to reuse these blocks on the CPU side.
2022-07-24 22:17:44 -07:00
b70cafa205 spirv support: fix an overly-constrained lifetime parameter in the array index fn 2022-07-24 21:51:20 -07:00
7286d272b9 move coremem/mat -> coremem/sim/legacy/mat 2022-07-24 18:31:11 -07:00
d0fcd9b657 hide legacy.rs behind a legacy/ dir 2022-07-24 18:20:58 -07:00
2f0e52a09b split SimState out of sim/mod.rs -> sim/legacy.rs 2022-07-24 18:19:26 -07:00
c8a082d2a1 wavefront: port to spirv driver 2022-07-24 17:45:13 -07:00
e62dc495f1 spirv: remove most of the IntoFfi/IntoLib stuff 2022-07-24 01:04:31 -07:00
193df5415f spirv: remove the last nontrivial Material IntoFfi/FromLib 2022-07-24 00:35:47 -07:00
4bd081ca7a spirv bindings: remove From<Static> conversion 2022-07-24 00:14:38 -07:00
940d86d86e remove unnecessary Ffi impls for AdaptStateless 2022-07-24 00:02:00 -07:00
ce00281c09 fix typo: 'electic' -> 'electric' 2022-07-23 23:58:24 -07:00
048eb7dbef geom: don't re-export coremem_types::vec 2022-07-23 18:57:17 -07:00
d813405cb1 spirv bindings: make compatible with more than just strictly f32 2022-07-23 18:24:09 -07:00
3f5160a8ea replace the CPU MBFerromagnet with a generic wrapper around any stateless coremem_types type 2022-07-23 18:10:49 -07:00
d246b97b5e coremem: remove unused SpirvMBFerromagnet 2022-07-23 17:12:30 -07:00
67872de16f clean up some unused code/imports 2022-07-23 16:27:43 -07:00
98773a350c remove custom cpu-specific MBPgram type 2022-07-23 16:26:50 -07:00
35a0c52f67 coremem tests: comment out dead code 2022-07-22 16:25:15 -07:00
9b149bae65 spirv bindings: split out common materials vs cpu materials 2022-07-22 16:24:59 -07:00
4a6a43fb31 plumb the R type parameter through spirv code 2022-07-22 16:21:03 -07:00
ee2cf47b8d types: remove unused code or mark it as intentionally dead 2022-07-22 16:20:22 -07:00
66ccbd1ada spirv: remove mat.rs and reuse coremem_types::mat everywhere 2022-07-22 15:22:09 -07:00
847b95f036 replace the FullyGenericMaterial in spirv with an analog type from coremem_types
this represents the last spirv-specific material.
next steps are to start removing the materials from `coremem` itself
(i.e. re-exporting more from `coremem_types::mat`).
2022-07-22 02:56:00 -07:00
4cbcc46d50 list: flat: remove unused import 2022-07-22 01:54:18 -07:00
727b7b43a3 types: mat: move DiscrMat into its own file 2022-07-22 01:53:42 -07:00
50ae6d4c34 types: mat: hack in a way to implement a 3-variant material 2022-07-22 01:46:07 -07:00
a8b6000104 types: list: lift the generic traits up to the top-level module
this lets me more easily swap in/out different list implementations when
experimenting.
2022-07-22 01:19:43 -07:00
fffe917c5c mat: remove some unused stuff related to DiscrMat2 2022-07-22 01:02:54 -07:00
97ac46fd8a mat: DiscrMat2 uses our Enum type internally 2022-07-22 00:44:57 -07:00
cdcc1fbbdd types: list: remove unused imports 2022-07-22 00:08:53 -07:00
72a66dbff4 types: enum: buff up tests 2022-07-21 23:50:57 -07:00
27c1523b0c types: Enum: make the DiscriminantCodable type a bit more usable
previously we couldn't *create* a discriminant, only edit it.
doing things this way is useful for the material code.
2022-07-21 23:02:33 -07:00
491f863aea types: enumerated: fix compile errors 2022-07-21 22:51:26 -07:00
fcc735765c types: Enum: simplify the internally_discriminanted constructor
we don't actually need to enforce the discriminant codability in the
constructor.
if the conditions aren't met, the user just won't be able to operate on
the enum.
2022-07-21 22:21:35 -07:00
55e58f630c coremem_types: Enum: fix a typo in the DiscriminantCodable docs 2022-07-21 22:15:52 -07:00
f2bb16eb5b coremem_types: Enum: add constructors 2022-07-21 22:11:48 -07:00
19b1df4919 coremem_types: Enum: add tests for the internal discriminant case 2022-07-21 21:58:41 -07:00
72b18d378f coremem_types: Enum: add a method to set the enum to a specific variant 2022-07-21 21:46:33 -07:00
65f90d0654 coremem_types: Enum: implement mutable dispatch 2022-07-21 21:35:15 -07:00