mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
Add more preamble tests
This commit is contained in:
parent
893145ead2
commit
bdba39bae6
45
Test/baseResults/glsl.-P.function.frag.out
Normal file
45
Test/baseResults/glsl.-P.function.frag.out
Normal file
@ -0,0 +1,45 @@
|
||||
glsl.-P.function.frag
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
-1:1 Function Definition: getColor( ( global 4-component vector of float)
|
||||
-1:1 Function Parameters:
|
||||
-1:1 Sequence
|
||||
-1:1 Branch: Return with expression
|
||||
-1:1 Constant:
|
||||
-1:1 1.000000
|
||||
-1:1 1.000000
|
||||
-1:1 1.000000
|
||||
-1:1 1.000000
|
||||
0:5 Function Definition: main( ( global void)
|
||||
0:5 Function Parameters:
|
||||
0:7 Sequence
|
||||
0:7 move second child to first child ( temp 4-component vector of float)
|
||||
0:7 'color' (layout( location=0) out 4-component vector of float)
|
||||
0:7 Function Call: getColor( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'color' (layout( location=0) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
-1:1 Function Definition: getColor( ( global 4-component vector of float)
|
||||
-1:1 Function Parameters:
|
||||
-1:1 Sequence
|
||||
-1:1 Branch: Return with expression
|
||||
-1:1 Constant:
|
||||
-1:1 1.000000
|
||||
-1:1 1.000000
|
||||
-1:1 1.000000
|
||||
-1:1 1.000000
|
||||
0:5 Function Definition: main( ( global void)
|
||||
0:5 Function Parameters:
|
||||
0:7 Sequence
|
||||
0:7 move second child to first child ( temp 4-component vector of float)
|
||||
0:7 'color' (layout( location=0) out 4-component vector of float)
|
||||
0:7 Function Call: getColor( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'color' (layout( location=0) out 4-component vector of float)
|
||||
|
49
Test/baseResults/glsl.-P.include.frag.out
Normal file
49
Test/baseResults/glsl.-P.include.frag.out
Normal file
@ -0,0 +1,49 @@
|
||||
glsl.-P.include.frag
|
||||
Shader version: 450
|
||||
Requested GL_GOOGLE_cpp_style_line_directive
|
||||
Requested GL_GOOGLE_include_directive
|
||||
0:? Sequence
|
||||
0:1 Function Definition: getColor( ( global 4-component vector of float)
|
||||
0:1 Function Parameters:
|
||||
0:3 Sequence
|
||||
0:3 Branch: Return with expression
|
||||
0:3 Constant:
|
||||
0:3 1.000000
|
||||
0:3 1.000000
|
||||
0:3 1.000000
|
||||
0:3 1.000000
|
||||
0:7 Function Definition: main( ( global void)
|
||||
0:7 Function Parameters:
|
||||
0:9 Sequence
|
||||
0:9 move second child to first child ( temp 4-component vector of float)
|
||||
0:9 'color' (layout( location=0) out 4-component vector of float)
|
||||
0:9 Function Call: getColor( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'color' (layout( location=0) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
Requested GL_GOOGLE_cpp_style_line_directive
|
||||
Requested GL_GOOGLE_include_directive
|
||||
0:? Sequence
|
||||
0:1 Function Definition: getColor( ( global 4-component vector of float)
|
||||
0:1 Function Parameters:
|
||||
0:3 Sequence
|
||||
0:3 Branch: Return with expression
|
||||
0:3 Constant:
|
||||
0:3 1.000000
|
||||
0:3 1.000000
|
||||
0:3 1.000000
|
||||
0:3 1.000000
|
||||
0:7 Function Definition: main( ( global void)
|
||||
0:7 Function Parameters:
|
||||
0:9 Sequence
|
||||
0:9 move second child to first child ( temp 4-component vector of float)
|
||||
0:9 'color' (layout( location=0) out 4-component vector of float)
|
||||
0:9 Function Call: getColor( ( global 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'color' (layout( location=0) out 4-component vector of float)
|
||||
|
8
Test/glsl.-P.function.frag
Normal file
8
Test/glsl.-P.function.frag
Normal file
@ -0,0 +1,8 @@
|
||||
#version 450
|
||||
|
||||
layout(location=0) out vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = getColor();
|
||||
}
|
10
Test/glsl.-P.include.frag
Normal file
10
Test/glsl.-P.include.frag
Normal file
@ -0,0 +1,10 @@
|
||||
#version 450
|
||||
|
||||
#include "glsl.-P.included.glsl"
|
||||
|
||||
layout(location=0) out vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
color = getColor();
|
||||
}
|
4
Test/glsl.-P.included.glsl
Normal file
4
Test/glsl.-P.included.glsl
Normal file
@ -0,0 +1,4 @@
|
||||
vec4 getColor()
|
||||
{
|
||||
return vec4(1.0);
|
||||
}
|
@ -210,6 +210,10 @@ run -D -Od -e main -V -i -DUNDEFED -UIN_SHADER --D FOO=200 --undef-macro UNDEFED
|
||||
diff -b $BASEDIR/hlsl.-D-U.frag.out $TARGETDIR/hlsl.-D-U.frag.out || HASERROR=1
|
||||
run -P"#define TEST1" -i -l --preamble-text "#define TEST2" --p "#define TEST3" glsl.-P.frag > $TARGETDIR/glsl.-P.frag.out
|
||||
diff -b $BASEDIR/glsl.-P.frag.out $TARGETDIR/glsl.-P.frag.out || HASERROR=1
|
||||
run -i -l --preamble-text "vec4 getColor() { return vec4(1.0); }" glsl.-P.function.frag > $TARGETDIR/glsl.-P.function.frag.out
|
||||
diff -b $BASEDIR/glsl.-P.function.frag.out $TARGETDIR/glsl.-P.function.frag.out || HASERROR=1
|
||||
run -i -l --preamble-text "#extension GL_GOOGLE_include_directive : require" -I. glsl.-P.include.frag > $TARGETDIR/glsl.-P.include.frag.out
|
||||
diff -b $BASEDIR/glsl.-P.include.frag.out $TARGETDIR/glsl.-P.include.frag.out || HASERROR=1
|
||||
|
||||
#
|
||||
# Test --client and --target-env
|
||||
|
Loading…
Reference in New Issue
Block a user