Add link-time cross stage optimization test
This commit is contained in:
parent
05559a2963
commit
2acc4ea002
4 changed files with 304 additions and 0 deletions
24
Test/link.crossStageOptimization.frag
Normal file
24
Test/link.crossStageOptimization.frag
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#version 440
|
||||
|
||||
layout(location = 0) in vec4 a0; // accessed
|
||||
layout(location = 1) in vec4 a1; // not accessed
|
||||
layout(location = 2) in vec4 a2; // accessed
|
||||
layout(location = 3) in vec4 a3; // not accessed
|
||||
|
||||
layout(location = 0) out vec4 oColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 temp = vec4(1.0);
|
||||
if (true)
|
||||
{
|
||||
temp *= a0;
|
||||
temp *= a2;
|
||||
}
|
||||
if (false)
|
||||
{
|
||||
temp *= a1;
|
||||
temp *= a3;
|
||||
}
|
||||
oColor = temp;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue