Skip to content

Fix SPV_INTEL_function_pointers translation with untyped pointers#3830

Draft
Qi-Ye-079 wants to merge 1 commit into
KhronosGroup:mainfrom
Qi-Ye-079:intel_func_ptr
Draft

Fix SPV_INTEL_function_pointers translation with untyped pointers#3830
Qi-Ye-079 wants to merge 1 commit into
KhronosGroup:mainfrom
Qi-Ye-079:intel_func_ptr

Conversation

@Qi-Ye-079

Copy link
Copy Markdown
Contributor

With SPV_INTEL_function_pointers enabled, when the Reader handles indirect function calls with untyped function pointer (enabled by SPV_KHR_untyped_pointers), the reverse translation will crash with assertion error, because it still assumes the function pointer is always typed.

This PR adds proper handling for untyped function pointer in the Reader in case of an indirect function call.

AI-assisted by: Claude Opus 4.8

@Qi-Ye-079

Copy link
Copy Markdown
Contributor Author

@vmaksimo Please take a look.

P.S. For the testcases, I only enabled the SPV_KHR_untyped_pointers for a subset of testcases with indirect function calls; others only have global variables of function pointers but no indirect calls, so they're out of scope for this PR (the only exception is global-function-pointer.ll which I think is enough in terms of test coverage). Let me know if you think it's actually necessary to enable the extension for all of them under test/extensions/INTEL/SPV_INTEL_function_pointers.

@Qi-Ye-079 Qi-Ye-079 marked this pull request as draft July 9, 2026 13:48
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.

1 participant