Skip to content

Conversation

@LegNeato
Copy link
Collaborator

Fixes ICE in #452.

@Firestar99 Firestar99 added this pull request to the merge queue Oct 28, 2025
Merged via the queue into Rust-GPU:main with commit 2232fcb Oct 28, 2025
13 checks passed
Comment on lines 239 to +240
if inst.class.opcode == Op::FunctionCall {
let callee = func_id_to_idx[&inst.operands[0].unwrap_id_ref()];
let callee_had_err =
visit(sess, module, visited, stack, names, callee, func_id_to_idx).err();
any_err = any_err.or(callee_had_err);
let callee_id = inst.operands[0].unwrap_id_ref();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, this code in simple_passes isn't incorrect.

The underlying bug¹ is that OpFunctionCall is still used with function pointers - the correct instruction is OpFunctionPointerCallINTEL (from the same SPIR-V extension that adds function pointers through a new CodeSectionINTEL Storage Class).

¹(which one of my branches fixes, been meaning to open a PR for that for a while, already landed most of its prerequisites earlier this year)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants