Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactor bind/push commands #1962

Merged
merged 1 commit into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion examples/src/bin/deferred/frame/ambient_lighting_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ void main() {
vec3 in_diffuse = subpassLoad(u_diffuse).rgb;
f_color.rgb = push_constants.color.rgb * in_diffuse;
f_color.a = 1.0;
}"
}",
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ void main() {
vec3 in_diffuse = subpassLoad(u_diffuse).rgb;
f_color.rgb = light_percent * push_constants.color.rgb * in_diffuse;
f_color.a = 1.0;
}"
}",
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}
}
7 changes: 6 additions & 1 deletion examples/src/bin/deferred/frame/point_lighting_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ void main() {
vec3 in_diffuse = subpassLoad(u_diffuse).rgb;
f_color.rgb = push_constants.color.rgb * light_percent * in_diffuse;
f_color.a = 1.0;
}"
}",
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ void main() {
len_z
);
imageStore(img, ivec2(gl_GlobalInvocationID.xy), write_color);
}"
}",
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}
}
7 changes: 6 additions & 1 deletion examples/src/bin/multi_window_game_of_life/game_of_life.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ void main() {
} else {
compute_color();
}
}"
}",
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}
}
7 changes: 6 additions & 1 deletion examples/src/bin/push-constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ fn main() {
data.data[idx] += uint(pc.addend);
}
}
"
",
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}
}

Expand Down
7 changes: 6 additions & 1 deletion examples/src/bin/shader-types-sharing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ fn main() {
}
"
}
}
},
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}

// The macro will create the following things in this module:
Expand Down
7 changes: 6 additions & 1 deletion examples/src/bin/simple-particles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ fn main() {
verticies[index].pos = pos;
verticies[index].vel = vel * exp(friction * push.delta_time);
}
"
",
types_meta: {
use bytemuck::{Pod, Zeroable};

#[derive(Clone, Copy, Zeroable, Pod)]
},
}
}
// Vertex shader determines color and is run once per particle.
Expand Down
1 change: 1 addition & 0 deletions vulkano/autogen/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
///
/// > **Note**: This function is used for testing purposes, and is probably useless in
/// > a real code.
#[cfg(test)]
pub(crate) const fn all() -> Features {
Features {
#(#all_items)*
Expand Down
Loading