Fix empty line handling in line directive callback.

The current line number for the #line directive should be passed
in as parameter to the line directive callback. Without it, we
don't know how many empty lines we should output.
This commit is contained in:
Lei Zhang
2015-07-04 22:30:59 -04:00
parent 5cbc990a0a
commit 46ea5396ef
6 changed files with 49 additions and 35 deletions

View File

@@ -1,5 +1,4 @@
#version 310 es
#line 1 2
#pragma something
void main(){ }

View File

@@ -1,23 +1,39 @@
#line 300
#line 2
#line 10
#line 2
#line 0
#line 4
#line 8
void main(){
gl_Position = vec4(10);
}
#line 8 4
#line 12 3
#line 1
#line 300
#line 2
#line 10
#line 2
#line 0
#line 4
#line 8
void main(){
gl_Position = vec4(10);
}
#line 8 4
#line 12 3
#line 1