Implement GL_ARB_derivative_control.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27713 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
265f5fb80e
commit
13fd6c9dd7
12 changed files with 331 additions and 4 deletions
|
|
@ -61,4 +61,25 @@ void foo24()
|
|||
{
|
||||
dvec3 df, di;
|
||||
df = modf(outp.xyz, di);
|
||||
}
|
||||
}
|
||||
|
||||
in float in1;
|
||||
in vec2 in2;
|
||||
in vec3 in3;
|
||||
in vec4 in4;
|
||||
|
||||
void foodc1()
|
||||
{
|
||||
vec2 v2 = dFdxFine(in2); // ERROR
|
||||
vec3 v3 = dFdyCoarse(in3); // ERROR
|
||||
vec4 v4 = fwidthCoarse(in4) + fwidthFine(in4); // ERROR
|
||||
}
|
||||
|
||||
#extension GL_ARB_derivative_control : enable
|
||||
|
||||
void foodc2()
|
||||
{
|
||||
vec2 v2 = dFdxFine(in2);
|
||||
vec3 v3 = dFdyCoarse(in3);
|
||||
vec4 v4 = fwidthCoarse(in4) + fwidthFine(in4);
|
||||
}
|
||||
|
|
|
|||
17
Test/450.frag
Normal file
17
Test/450.frag
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#version 450 core
|
||||
|
||||
in float in1;
|
||||
in vec2 in2;
|
||||
in vec3 in3;
|
||||
in vec4 in4;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 v2 = dFdxFine(in2);
|
||||
vec3 v3 = dFdyCoarse(in3);
|
||||
vec4 v4 = fwidth(in4);
|
||||
v4 = dFdyFine(in4);
|
||||
v3 = dFdyFine(in3);
|
||||
float f = dFdx(in1) + dFdxFine(in1) + dFdxCoarse(in1);
|
||||
v4 = fwidthCoarse(in4) + fwidthFine(in4);
|
||||
}
|
||||
|
|
@ -15,10 +15,15 @@ ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset,
|
|||
ERROR: 0:54: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]
|
||||
ERROR: 0:57: 'patch' : not supported in this stage: fragment
|
||||
ERROR: 0:58: 'patch' : not supported in this stage: fragment
|
||||
ERROR: 15 compilation errors. No code generated.
|
||||
ERROR: 0:73: 'dFdxFine' : required extension not requested: GL_ARB_derivative_control
|
||||
ERROR: 0:74: 'dFdyCoarse' : required extension not requested: GL_ARB_derivative_control
|
||||
ERROR: 0:75: 'fwidthCoarse' : required extension not requested: GL_ARB_derivative_control
|
||||
ERROR: 0:75: 'fwidthFine' : required extension not requested: GL_ARB_derivative_control
|
||||
ERROR: 19 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 400
|
||||
Requested GL_ARB_derivative_control
|
||||
Requested GL_ARB_separate_shader_objects
|
||||
gl_FragCoord pixel center is integer
|
||||
gl_FragCoord origin is upper left
|
||||
|
|
@ -217,6 +222,48 @@ ERROR: node is still EOpNull!
|
|||
0:63 Convert float to double (3-component vector of double)
|
||||
0:63 'tempArg' (3-component vector of float)
|
||||
0:63 'tempReturn' (3-component vector of float)
|
||||
0:71 Function Definition: foodc1( (void)
|
||||
0:71 Function Parameters:
|
||||
0:73 Sequence
|
||||
0:73 Sequence
|
||||
0:73 move second child to first child (2-component vector of float)
|
||||
0:73 'v2' (2-component vector of float)
|
||||
0:73 dPdxFine (2-component vector of float)
|
||||
0:73 'in2' (smooth in 2-component vector of float)
|
||||
0:74 Sequence
|
||||
0:74 move second child to first child (3-component vector of float)
|
||||
0:74 'v3' (3-component vector of float)
|
||||
0:74 dPdyCoarse (3-component vector of float)
|
||||
0:74 'in3' (smooth in 3-component vector of float)
|
||||
0:75 Sequence
|
||||
0:75 move second child to first child (4-component vector of float)
|
||||
0:75 'v4' (4-component vector of float)
|
||||
0:75 add (4-component vector of float)
|
||||
0:75 fwidthCoarse (4-component vector of float)
|
||||
0:75 'in4' (smooth in 4-component vector of float)
|
||||
0:75 fwidthFine (4-component vector of float)
|
||||
0:75 'in4' (smooth in 4-component vector of float)
|
||||
0:80 Function Definition: foodc2( (void)
|
||||
0:80 Function Parameters:
|
||||
0:82 Sequence
|
||||
0:82 Sequence
|
||||
0:82 move second child to first child (2-component vector of float)
|
||||
0:82 'v2' (2-component vector of float)
|
||||
0:82 dPdxFine (2-component vector of float)
|
||||
0:82 'in2' (smooth in 2-component vector of float)
|
||||
0:83 Sequence
|
||||
0:83 move second child to first child (3-component vector of float)
|
||||
0:83 'v3' (3-component vector of float)
|
||||
0:83 dPdyCoarse (3-component vector of float)
|
||||
0:83 'in3' (smooth in 3-component vector of float)
|
||||
0:84 Sequence
|
||||
0:84 move second child to first child (4-component vector of float)
|
||||
0:84 'v4' (4-component vector of float)
|
||||
0:84 add (4-component vector of float)
|
||||
0:84 fwidthCoarse (4-component vector of float)
|
||||
0:84 'in4' (smooth in 4-component vector of float)
|
||||
0:84 fwidthFine (4-component vector of float)
|
||||
0:84 'in4' (smooth in 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'c2D' (smooth in 2-component vector of float)
|
||||
0:? 'i' (flat in int)
|
||||
|
|
@ -235,12 +282,17 @@ ERROR: node is still EOpNull!
|
|||
0:? 'u2drs' (uniform sampler2DRectShadow)
|
||||
0:? 'patchIn' (smooth patch in 4-component vector of float)
|
||||
0:? 'patchOut' (patch out 4-component vector of float)
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 400
|
||||
Requested GL_ARB_derivative_control
|
||||
Requested GL_ARB_separate_shader_objects
|
||||
gl_FragCoord pixel center is integer
|
||||
gl_FragCoord origin is upper left
|
||||
|
|
@ -439,6 +491,48 @@ ERROR: node is still EOpNull!
|
|||
0:63 Convert float to double (3-component vector of double)
|
||||
0:63 'tempArg' (3-component vector of float)
|
||||
0:63 'tempReturn' (3-component vector of float)
|
||||
0:71 Function Definition: foodc1( (void)
|
||||
0:71 Function Parameters:
|
||||
0:73 Sequence
|
||||
0:73 Sequence
|
||||
0:73 move second child to first child (2-component vector of float)
|
||||
0:73 'v2' (2-component vector of float)
|
||||
0:73 dPdxFine (2-component vector of float)
|
||||
0:73 'in2' (smooth in 2-component vector of float)
|
||||
0:74 Sequence
|
||||
0:74 move second child to first child (3-component vector of float)
|
||||
0:74 'v3' (3-component vector of float)
|
||||
0:74 dPdyCoarse (3-component vector of float)
|
||||
0:74 'in3' (smooth in 3-component vector of float)
|
||||
0:75 Sequence
|
||||
0:75 move second child to first child (4-component vector of float)
|
||||
0:75 'v4' (4-component vector of float)
|
||||
0:75 add (4-component vector of float)
|
||||
0:75 fwidthCoarse (4-component vector of float)
|
||||
0:75 'in4' (smooth in 4-component vector of float)
|
||||
0:75 fwidthFine (4-component vector of float)
|
||||
0:75 'in4' (smooth in 4-component vector of float)
|
||||
0:80 Function Definition: foodc2( (void)
|
||||
0:80 Function Parameters:
|
||||
0:82 Sequence
|
||||
0:82 Sequence
|
||||
0:82 move second child to first child (2-component vector of float)
|
||||
0:82 'v2' (2-component vector of float)
|
||||
0:82 dPdxFine (2-component vector of float)
|
||||
0:82 'in2' (smooth in 2-component vector of float)
|
||||
0:83 Sequence
|
||||
0:83 move second child to first child (3-component vector of float)
|
||||
0:83 'v3' (3-component vector of float)
|
||||
0:83 dPdyCoarse (3-component vector of float)
|
||||
0:83 'in3' (smooth in 3-component vector of float)
|
||||
0:84 Sequence
|
||||
0:84 move second child to first child (4-component vector of float)
|
||||
0:84 'v4' (4-component vector of float)
|
||||
0:84 add (4-component vector of float)
|
||||
0:84 fwidthCoarse (4-component vector of float)
|
||||
0:84 'in4' (smooth in 4-component vector of float)
|
||||
0:84 fwidthFine (4-component vector of float)
|
||||
0:84 'in4' (smooth in 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'c2D' (smooth in 2-component vector of float)
|
||||
0:? 'i' (flat in int)
|
||||
|
|
@ -457,4 +551,8 @@ ERROR: node is still EOpNull!
|
|||
0:? 'u2drs' (uniform sampler2DRectShadow)
|
||||
0:? 'patchIn' (smooth patch in 4-component vector of float)
|
||||
0:? 'patchOut' (patch out 4-component vector of float)
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
|
||||
|
|
|
|||
111
Test/baseResults/450.frag.out
Normal file
111
Test/baseResults/450.frag.out
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
450.frag
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:8 Function Definition: main( (void)
|
||||
0:8 Function Parameters:
|
||||
0:10 Sequence
|
||||
0:10 Sequence
|
||||
0:10 move second child to first child (2-component vector of float)
|
||||
0:10 'v2' (2-component vector of float)
|
||||
0:10 dPdxFine (2-component vector of float)
|
||||
0:10 'in2' (smooth in 2-component vector of float)
|
||||
0:11 Sequence
|
||||
0:11 move second child to first child (3-component vector of float)
|
||||
0:11 'v3' (3-component vector of float)
|
||||
0:11 dPdyCoarse (3-component vector of float)
|
||||
0:11 'in3' (smooth in 3-component vector of float)
|
||||
0:12 Sequence
|
||||
0:12 move second child to first child (4-component vector of float)
|
||||
0:12 'v4' (4-component vector of float)
|
||||
0:12 fwidth (4-component vector of float)
|
||||
0:12 'in4' (smooth in 4-component vector of float)
|
||||
0:13 move second child to first child (4-component vector of float)
|
||||
0:13 'v4' (4-component vector of float)
|
||||
0:13 dPdyFine (4-component vector of float)
|
||||
0:13 'in4' (smooth in 4-component vector of float)
|
||||
0:14 move second child to first child (3-component vector of float)
|
||||
0:14 'v3' (3-component vector of float)
|
||||
0:14 dPdyFine (3-component vector of float)
|
||||
0:14 'in3' (smooth in 3-component vector of float)
|
||||
0:15 Sequence
|
||||
0:15 move second child to first child (float)
|
||||
0:15 'f' (float)
|
||||
0:15 add (float)
|
||||
0:15 add (float)
|
||||
0:15 dPdx (float)
|
||||
0:15 'in1' (smooth in float)
|
||||
0:15 dPdxFine (float)
|
||||
0:15 'in1' (smooth in float)
|
||||
0:15 dPdxCoarse (float)
|
||||
0:15 'in1' (smooth in float)
|
||||
0:16 move second child to first child (4-component vector of float)
|
||||
0:16 'v4' (4-component vector of float)
|
||||
0:16 add (4-component vector of float)
|
||||
0:16 fwidthCoarse (4-component vector of float)
|
||||
0:16 'in4' (smooth in 4-component vector of float)
|
||||
0:16 fwidthFine (4-component vector of float)
|
||||
0:16 'in4' (smooth in 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:8 Function Definition: main( (void)
|
||||
0:8 Function Parameters:
|
||||
0:10 Sequence
|
||||
0:10 Sequence
|
||||
0:10 move second child to first child (2-component vector of float)
|
||||
0:10 'v2' (2-component vector of float)
|
||||
0:10 dPdxFine (2-component vector of float)
|
||||
0:10 'in2' (smooth in 2-component vector of float)
|
||||
0:11 Sequence
|
||||
0:11 move second child to first child (3-component vector of float)
|
||||
0:11 'v3' (3-component vector of float)
|
||||
0:11 dPdyCoarse (3-component vector of float)
|
||||
0:11 'in3' (smooth in 3-component vector of float)
|
||||
0:12 Sequence
|
||||
0:12 move second child to first child (4-component vector of float)
|
||||
0:12 'v4' (4-component vector of float)
|
||||
0:12 fwidth (4-component vector of float)
|
||||
0:12 'in4' (smooth in 4-component vector of float)
|
||||
0:13 move second child to first child (4-component vector of float)
|
||||
0:13 'v4' (4-component vector of float)
|
||||
0:13 dPdyFine (4-component vector of float)
|
||||
0:13 'in4' (smooth in 4-component vector of float)
|
||||
0:14 move second child to first child (3-component vector of float)
|
||||
0:14 'v3' (3-component vector of float)
|
||||
0:14 dPdyFine (3-component vector of float)
|
||||
0:14 'in3' (smooth in 3-component vector of float)
|
||||
0:15 Sequence
|
||||
0:15 move second child to first child (float)
|
||||
0:15 'f' (float)
|
||||
0:15 add (float)
|
||||
0:15 add (float)
|
||||
0:15 dPdx (float)
|
||||
0:15 'in1' (smooth in float)
|
||||
0:15 dPdxFine (float)
|
||||
0:15 'in1' (smooth in float)
|
||||
0:15 dPdxCoarse (float)
|
||||
0:15 'in1' (smooth in float)
|
||||
0:16 move second child to first child (4-component vector of float)
|
||||
0:16 'v4' (4-component vector of float)
|
||||
0:16 add (4-component vector of float)
|
||||
0:16 fwidthCoarse (4-component vector of float)
|
||||
0:16 'in4' (smooth in 4-component vector of float)
|
||||
0:16 fwidthFine (4-component vector of float)
|
||||
0:16 'in4' (smooth in 4-component vector of float)
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
|
||||
|
|
@ -71,6 +71,7 @@ numeral.frag
|
|||
430.comp
|
||||
440.vert
|
||||
440.frag
|
||||
450.frag
|
||||
dce.frag
|
||||
atomic_uint.frag
|
||||
../../LunarGLASS/test/aggOps.frag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue