Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

OperandExceeded when using specialization constants in work group size #151

Merged
merged 1 commit into from
Aug 19, 2020
Merged
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
9 changes: 5 additions & 4 deletions rspirv/binary/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,11 @@ impl<'c, 'd> Parser<'c, 'd> {
if let Some(g) = GInstTable::lookup_opcode(number as u16) {
// TODO: check whether this opcode is allowed here.
operands.push(dr::Operand::LiteralSpecConstantOpInteger(g.opcode));
// We need id parameters to this SpecConstantOp.
for operand in g.operands {
if operand.kind == GOpKind::IdRef {
operands.push(dr::Operand::IdRef(self.decoder.id()?))

// We need all parameters to this SpecConstantOp.
for loperand in g.operands {
if loperand.kind != GOpKind::IdResultType && loperand.kind != GOpKind::IdResult {
operands.append(&mut self.parse_operand(loperand.kind)?);
}
}
Ok(operands)
Expand Down