Skip to content

Commit

Permalink
[spv-out] require ClipDistance & CullDistance capabilities if necessa…
Browse files Browse the repository at this point in the history
…ry (#2528)
  • Loading branch information
teoxoy authored Oct 3, 2023
1 parent 9f3cdb6 commit 613da72
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/back/spv/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1514,8 +1514,20 @@ impl Writer {
// vertex
Bi::BaseInstance => BuiltIn::BaseInstance,
Bi::BaseVertex => BuiltIn::BaseVertex,
Bi::ClipDistance => BuiltIn::ClipDistance,
Bi::CullDistance => BuiltIn::CullDistance,
Bi::ClipDistance => {
self.require_any(
"`clip_distance` built-in",
&[spirv::Capability::ClipDistance],
)?;
BuiltIn::ClipDistance
}
Bi::CullDistance => {
self.require_any(
"`cull_distance` built-in",
&[spirv::Capability::CullDistance],
)?;
BuiltIn::CullDistance
}
Bi::InstanceIndex => BuiltIn::InstanceIndex,
Bi::PointSize => BuiltIn::PointSize,
Bi::VertexIndex => BuiltIn::VertexIndex,
Expand Down

0 comments on commit 613da72

Please sign in to comment.