lift SimMeta from spirv_backend -> coremem_types

This commit is contained in:
2022-07-25 00:52:11 -07:00
parent 15aaa3e893
commit 8a16a5ce30
5 changed files with 30 additions and 49 deletions

View File

@@ -15,11 +15,11 @@ use spirv_std::macros::spirv;
mod adapt;
pub mod support;
pub use adapt::SerializedSimMeta;
pub use support::UnsizedArray;
use coremem_types::compound::Optional;
use coremem_types::mat::{Ferroxcube3R1MH, FullyGenericMaterial, IsoConductorOr};
use coremem_types::step::SimMeta;
use coremem_types::vec::{Vec3, Vec3u};
type Iso3R1<R> = IsoConductorOr<R, Ferroxcube3R1MH>;
@@ -54,7 +54,7 @@ macro_rules! steps {
#[spirv(compute(threads(4, 4, 4)))]
pub fn $step_h(
#[spirv(global_invocation_id)] id: glam::UVec3,
#[spirv(storage_buffer, descriptor_set = 0, binding = 0)] meta: &SerializedSimMeta<$flt>,
#[spirv(storage_buffer, descriptor_set = 0, binding = 0)] meta: &SimMeta<$flt>,
// XXX: delete this input?
#[spirv(storage_buffer, descriptor_set = 0, binding = 1)] _unused_stimulus_e: &UnsizedArray<Vec3<$flt>>,
#[spirv(storage_buffer, descriptor_set = 0, binding = 2)] stimulus_h: &UnsizedArray<Vec3<$flt>>,
@@ -69,7 +69,7 @@ macro_rules! steps {
#[spirv(compute(threads(4, 4, 4)))]
pub fn $step_e(
#[spirv(global_invocation_id)] id: glam::UVec3,
#[spirv(storage_buffer, descriptor_set = 0, binding = 0)] meta: &SerializedSimMeta<$flt>,
#[spirv(storage_buffer, descriptor_set = 0, binding = 0)] meta: &SimMeta<$flt>,
#[spirv(storage_buffer, descriptor_set = 0, binding = 1)] stimulus_e: &UnsizedArray<Vec3<$flt>>,
// XXX: delete this input?
#[spirv(storage_buffer, descriptor_set = 0, binding = 2)] _unused_stimulus_h: &UnsizedArray<Vec3<$flt>>,