Skip to content

Commit

Permalink
Pointer should have ty: Token<Type> instead of ty: Word (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper-Bekkers authored Aug 19, 2020
1 parent 0ceeace commit 6a65b59
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion autogen/sr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl OperandTokens {
quote! { StructMember },
quote! { StructMember::new(self.types.lookup_token(*value)) },
),
"Parameter Types" => (
"Parameter Types" | "Type" => (
quote! { Token<Type> },
quote! { self.types.lookup_token(*value) },
),
Expand Down
6 changes: 3 additions & 3 deletions rspirv/lift/autogen_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl LiftContext {
}),
6u32 => Ok(ops::Op::MemberName {
ty: (match operands.next() {
Some(&dr::Operand::IdRef(ref value)) => Some(*value),
Some(&dr::Operand::IdRef(ref value)) => Some(self.types.lookup_token(*value)),
Some(_) => Err(OperandError::WrongType)?,
None => None,
})
Expand Down Expand Up @@ -5651,7 +5651,7 @@ impl LiftContext {
}),
5362u32 => Ok(ops::Op::CooperativeMatrixLengthNV {
ty: (match operands.next() {
Some(&dr::Operand::IdRef(ref value)) => Some(*value),
Some(&dr::Operand::IdRef(ref value)) => Some(self.types.lookup_token(*value)),
Some(_) => Err(OperandError::WrongType)?,
None => None,
})
Expand Down Expand Up @@ -8149,7 +8149,7 @@ impl LiftContext {
})
.ok_or(OperandError::Missing)?,
ty: (match operands.next() {
Some(&dr::Operand::IdRef(ref value)) => Some(*value),
Some(&dr::Operand::IdRef(ref value)) => Some(self.types.lookup_token(*value)),
Some(_) => Err(OperandError::WrongType)?,
None => None,
})
Expand Down
4 changes: 2 additions & 2 deletions rspirv/sr/autogen_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub enum Op {
name: String,
},
MemberName {
ty: spirv::Word,
ty: Token<Type>,
member: u32,
name: String,
},
Expand Down Expand Up @@ -1494,7 +1494,7 @@ pub enum Op {
c: spirv::Word,
},
CooperativeMatrixLengthNV {
ty: spirv::Word,
ty: Token<Type>,
},
BeginInvocationInterlockEXT,
EndInvocationInterlockEXT,
Expand Down
2 changes: 1 addition & 1 deletion rspirv/sr/autogen_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub enum Type {
},
Pointer {
storage_class: spirv::StorageClass,
ty: spirv::Word,
ty: Token<Type>,
},
Function {
return_type: Token<Type>,
Expand Down

0 comments on commit 6a65b59

Please sign in to comment.