glslang icon indicating copy to clipboard operation
glslang copied to clipboard

Fix function call line number for calls spanning multiple lines.

Open qingyuanzNV opened this issue 7 months ago • 0 comments

With this patch, for the following code with a multi-line function call:

add(
    inx + 1,
    inx + 2,
    inx + 3
);

Because argument evaluation changes the current source location tracked by the spv builder, we should reset it before creating OpFunctionCall (and other instructions emulating pass by reference). This avoid having function call instruction pointing to the line of last argument expression.

qingyuanzNV avatar Jul 02 '24 08:07 qingyuanzNV