Closed qingyuanzNV closed 5 months ago
@arcady-lunarg We are trying to catch an internal deadline and put this patch in. Could you help review this PR? Thanks!
Yes, I am going to review it today, it also fixes some issues for us. I was at Vulkanised the past few days and didn't get a chance to look at it in enough detail.
On Thu, Feb 8, 2024, 10:04 Qingyuan Zheng @.***> wrote:
@arcady-lunarg https://github.com/arcady-lunarg We are trying to catch an internal deadline and put this patch in. Could you help review this PR? Thanks!
— Reply to this email directly, view it on GitHub https://github.com/KhronosGroup/glslang/pull/3496#issuecomment-1934671448, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5I72BZB5KDWZPUP6Q5OET3YSUHRBAVCNFSM6AAAAABCV4UKA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGY3TCNBUHA . You are receiving this because you were mentioned.Message ID: @.***>
Could you help squash and merge with the commit message below (so it's easier for you to review the new changes):
Clean up the debug line info tracking and generation.
- Correctly populate the field `currentFileId` with the presence of include directive
- Support lazy OpLine/OpDebugLine generation only when a real instruction is added instead of a debug location is set
- Improve the debug location tracking to per-block instead of just per-builder
- A few bug fixes related to debug source info
By the way, one important change of this PR is that I added an addInstruction(...)
to SpvBuilder
to hijack all instructions added to the current build point. You guys might need be alert on this when reviewing new changes to make sure that all new instructions added to the current build point should go through that function instead of directly calling buildPoint.addInstruction(...)
.
This patch cleans up the line tracking logic when debug info is turned on, including:
sourceFileStringId
andcurrentFileId
in theSpvBuilder
, but both were always OpString id of the main file. Renamed them tomainFileId
andcurrentFileId
and implemented file tracking accordingly.Block
instead ofSpvBuilder
. This is how the standard defines the lifetime of such instruction.Also, some minor changes are:
As a result of this patch, we should have non-semantic debug reporting the correct file for variables, functions and .etc.Hopefully, after this patch, we could have more accurate information to fix the file reporting for variables, functions and .etc for non-semantic debug extension. Also, this helps avoid a lot of cascading OpLines for a potential fix for #3403