Skip to content

gl_shader: fix shader dump line numbering#1922

Open
illwieckz wants to merge 1 commit intofor-0.56.0/syncfrom
illwieckz/shader-dump-line-numbering
Open

gl_shader: fix shader dump line numbering#1922
illwieckz wants to merge 1 commit intofor-0.56.0/syncfrom
illwieckz/shader-dump-line-numbering

Conversation

@illwieckz
Copy link
Member

  • reset line number at GLSL shader start
  • use custom line number for the GLSL header to avoid line number duplicates
  • use custom line number for the deform vertex header
  • reset line count on #line 0

Written to debug:

- reset line number at GLSL shader start
- use custom line number for the GLSL header to avoid line number duplicates
- use custom line number for the deform vertex header
- reset line count on `#line 0`
@illwieckz illwieckz force-pushed the illwieckz/shader-dump-line-numbering branch 2 times, most recently from 41ab201 to 983d178 Compare March 4, 2026 10:57
@illwieckz illwieckz changed the title renderer: fix shader dump line numbering gl_shader: fix shader dump line numbering Mar 9, 2026
@slipher
Copy link
Member

slipher commented Mar 19, 2026

We should be able to avoid inserting #line 0 and then doing string replacements later. I think the key issue here is that ProcessInserts is called on text that already has hard-coded stuff prepended. But that hard-coded stuff shouldn't contain inserts, so it would make more sense to call ProcessInserts with only the actual file contents. Then you wouldn't have the problem of not knowing where the first line is.

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.

2 participants