Fix OpLine prepending OpFunction reports wrong file when #line is present

This commit is contained in:
Qingyuan Zheng
2022-09-06 23:57:18 -07:00
parent 7757cbebe4
commit c52b3d5075
5 changed files with 154 additions and 97 deletions

View File

@@ -1,4 +1,5 @@
#version 140
#extension GL_GOOGLE_cpp_style_line_directive : require
uniform sampler1D texSampler1D;
uniform sampler2D texSampler2D;
@@ -8,9 +9,20 @@ varying vec4 u;
in vec2 coords2D;
#line 0 "header.h"
float myAbs(float x) {
if (x > 0) {
return x;
}
else {
return -x;
}
}
#line 22 "spv.pp.line.frag"
void main()
{
float blendscale = 1.789;
float blendscale = myAbs(1.789);
float bias = 2.0;
float coords1D = 1.789;
vec4 color = vec4(0.0, 0.0, 0.0, 0.0);