KhronosGroup / SPIRV-Registry

SPIR-V specs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How DebugEntryPoint refers to an entry point

AlexeySotkin opened this issue · comments

DebugEntryPoint instruction has an operand which should refer to an entry point:

Entry Point is the <id> of the OpEntryPoint being described.

But OpEntryPoint doesn't have the result id.

Perhaps the Entry Point operand could refer to the result id of an OpFunction (which is also targeted by OpEntryPoint), but in this case it would be a forward reference.

@baldurk could you please clarify?

That's my mistake forgetting that OpEntryPoint has no result ID. I think the simplest fix would instead be to refer to the DebugFunction instead. This can be tied to the entry point via DebugFunctionDefinition in the entry point's function, and would not be a forward reference (the DebugEntryPoint can be after the DebugFunction).

If you'd like me to make that change let me know.

If you'd like me to make that change let me know.

Yes, please. I think it should be fixed.