glslang and SPIR-V: Some basic turn on for doubles (previously untested but existed code). Partly from a submission, partly addressing bug 13772.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30794 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2015-04-17 21:47:07 +00:00
parent 87a5e2a84b
commit edd181944e
10 changed files with 335 additions and 16 deletions

View File

@@ -603,7 +603,7 @@ ERROR: node is still EOpNull!
0:? 'patchOut' (patch out 4-component vector of float)
420.tesc
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:7: 'vertices' : inconsistent output number of vertices for array size of gl_out
ERROR: 0:11: 'vertices' : inconsistent output number of vertices for array size of a
ERROR: 0:12: 'vertices' : inconsistent output number of vertices for array size of outb
@@ -613,7 +613,7 @@ ERROR: 0:29: 'out' : type must be an array: outf
ERROR: 6 compilation errors. No code generated.
Shader version: 400
Shader version: 420
Requested GL_ARB_separate_shader_objects
vertices = 4
ERROR: node is still EOpNull!
@@ -678,12 +678,49 @@ ERROR: node is still EOpNull!
0:26 'gl_out' (out 3-element array of block{out 4-component vector of float gl_Position})
0:26 Constant:
0:26 1 (const int)
0:34 Function Definition: foo( (void)
0:34 Function Parameters:
0:36 Sequence
0:36 Test condition and select (void)
0:36 Condition
0:36 logical-or (bool)
0:36 Compare Not Equal (bool)
0:36 Constant:
0:36 -0.625000
0:36 -0.500000
0:36 -0.375000
0:36 -0.250000
0:36 -0.375000
0:36 -0.250000
0:36 -0.125000
0:36 0.000000
0:36 direct index (layout(location=0 ) 2X4 matrix of double)
0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:36 Constant:
0:36 0 (const int)
0:37 Compare Not Equal (bool)
0:37 Constant:
0:37 0.375000
0:37 0.500000
0:37 0.625000
0:37 0.750000
0:37 0.625000
0:37 0.750000
0:37 0.875000
0:37 -0.625000
0:37 direct index (layout(location=12 ) 2X4 matrix of double)
0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
0:37 Constant:
0:37 0 (const int)
0:36 true case is null
0:? Linker Objects
0:? 'gl_out' (out 3-element array of block{out 4-component vector of float gl_Position})
0:? 'a' (out 3-element array of int)
0:? 'outb' (out 5-element array of int)
0:? 'outc' (out 4-element array of int)
0:? 'outf' (out float)
0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
420.tese
Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
@@ -866,6 +903,8 @@ ERROR: Linking tessellation control stage: Multiple function bodies in multiple
main(
ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
main(
ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
foo(
ERROR: Linking tessellation control stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
main(
ERROR: Linking tessellation control stage: Types must match:
@@ -883,7 +922,7 @@ ERROR: Linking tessellation evaluation stage: Multiple function bodies in multip
ERROR: Linking tessellation evaluation stage: Multiple function bodies in multiple compilation units for the same signature in the same stage:
main(
Shader version: 400
Shader version: 420
Requested GL_ARB_separate_shader_objects
Requested GL_ARB_tessellation_shader
vertices = 4
@@ -1221,6 +1260,41 @@ vertices = 4
0:26 'gl_out' (out 3-element array of block{out 4-component vector of float gl_Position})
0:26 Constant:
0:26 1 (const int)
0:34 Function Definition: foo( (void)
0:34 Function Parameters:
0:36 Sequence
0:36 Test condition and select (void)
0:36 Condition
0:36 logical-or (bool)
0:36 Compare Not Equal (bool)
0:36 Constant:
0:36 -0.625000
0:36 -0.500000
0:36 -0.375000
0:36 -0.250000
0:36 -0.375000
0:36 -0.250000
0:36 -0.125000
0:36 0.000000
0:36 direct index (layout(location=0 ) 2X4 matrix of double)
0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:36 Constant:
0:36 0 (const int)
0:37 Compare Not Equal (bool)
0:37 Constant:
0:37 0.375000
0:37 0.500000
0:37 0.625000
0:37 0.750000
0:37 0.625000
0:37 0.750000
0:37 0.875000
0:37 -0.625000
0:37 direct index (layout(location=12 ) 2X4 matrix of double)
0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
0:37 Constant:
0:37 0 (const int)
0:36 true case is null
0:? Linker Objects
0:? 'gl_out' (out 4-element array of block{out 4-component vector of float gl_Position, out float gl_PointSize, out 1-element array of float gl_ClipDistance})
0:? 'outa' (4-element array of int)
@@ -1242,6 +1316,8 @@ vertices = 4
0:? 'outb' (out 5-element array of int)
0:? 'outc' (out 4-element array of int)
0:? 'outf' (out float)
0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
Shader version: 420
Requested GL_ARB_separate_shader_objects
Requested GL_ARB_tessellation_shader

View File

@@ -1,5 +1,5 @@
420.tesc
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
Warning, version 420 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:7: 'vertices' : inconsistent output number of vertices for array size of gl_out
ERROR: 0:11: 'vertices' : inconsistent output number of vertices for array size of a
ERROR: 0:12: 'vertices' : inconsistent output number of vertices for array size of outb
@@ -9,7 +9,7 @@ ERROR: 0:29: 'out' : type must be an array: outf
ERROR: 6 compilation errors. No code generated.
Shader version: 400
Shader version: 420
Requested GL_ARB_separate_shader_objects
vertices = 4
ERROR: node is still EOpNull!
@@ -74,18 +74,55 @@ ERROR: node is still EOpNull!
0:26 'gl_out' (out 3-element array of block{out 4-component vector of float gl_Position})
0:26 Constant:
0:26 1 (const int)
0:34 Function Definition: foo( (void)
0:34 Function Parameters:
0:36 Sequence
0:36 Test condition and select (void)
0:36 Condition
0:36 logical-or (bool)
0:36 Compare Not Equal (bool)
0:36 Constant:
0:36 -0.625000
0:36 -0.500000
0:36 -0.375000
0:36 -0.250000
0:36 -0.375000
0:36 -0.250000
0:36 -0.125000
0:36 0.000000
0:36 direct index (layout(location=0 ) 2X4 matrix of double)
0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:36 Constant:
0:36 0 (const int)
0:37 Compare Not Equal (bool)
0:37 Constant:
0:37 0.375000
0:37 0.500000
0:37 0.625000
0:37 0.750000
0:37 0.625000
0:37 0.750000
0:37 0.875000
0:37 -0.625000
0:37 direct index (layout(location=12 ) 2X4 matrix of double)
0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
0:37 Constant:
0:37 0 (const int)
0:36 true case is null
0:? Linker Objects
0:? 'gl_out' (out 3-element array of block{out 4-component vector of float gl_Position})
0:? 'a' (out 3-element array of int)
0:? 'outb' (out 5-element array of int)
0:? 'outc' (out 4-element array of int)
0:? 'outf' (out float)
0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
Linked tessellation control stage:
Shader version: 400
Shader version: 420
Requested GL_ARB_separate_shader_objects
vertices = 4
ERROR: node is still EOpNull!
@@ -150,10 +187,47 @@ ERROR: node is still EOpNull!
0:26 'gl_out' (out 3-element array of block{out 4-component vector of float gl_Position})
0:26 Constant:
0:26 1 (const int)
0:34 Function Definition: foo( (void)
0:34 Function Parameters:
0:36 Sequence
0:36 Test condition and select (void)
0:36 Condition
0:36 logical-or (bool)
0:36 Compare Not Equal (bool)
0:36 Constant:
0:36 -0.625000
0:36 -0.500000
0:36 -0.375000
0:36 -0.250000
0:36 -0.375000
0:36 -0.250000
0:36 -0.125000
0:36 0.000000
0:36 direct index (layout(location=0 ) 2X4 matrix of double)
0:36 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:36 Constant:
0:36 0 (const int)
0:37 Compare Not Equal (bool)
0:37 Constant:
0:37 0.375000
0:37 0.500000
0:37 0.625000
0:37 0.750000
0:37 0.625000
0:37 0.750000
0:37 0.875000
0:37 -0.625000
0:37 direct index (layout(location=12 ) 2X4 matrix of double)
0:37 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)
0:37 Constant:
0:37 0 (const int)
0:36 true case is null
0:? Linker Objects
0:? 'gl_out' (out 3-element array of block{out 4-component vector of float gl_Position})
0:? 'a' (out 3-element array of int)
0:? 'outb' (out 5-element array of int)
0:? 'outc' (out 4-element array of int)
0:? 'outf' (out float)
0:? 'vs_tcs_first' (layout(location=0 ) in 32-element array of 2X4 matrix of double)
0:? 'vs_tcs_last' (layout(location=12 ) in 32-element array of 2X4 matrix of double)

View File

@@ -14,7 +14,8 @@ ERROR: 0:51: 'local_size' : can only apply to 'in'
ERROR: 0:51: 'local_size' : can only apply to 'in'
ERROR: 0:51: 'local_size' : can only apply to 'in'
ERROR: 0:65: 'assign' : l-value required "ro" (can't modify a readonly buffer)
ERROR: 14 compilation errors. No code generated.
ERROR: 0:77: '=' : cannot convert from 'double' to 'int'
ERROR: 15 compilation errors. No code generated.
Shader version: 430
@@ -69,6 +70,58 @@ ERROR: node is still EOpNull!
0:66 Constant:
0:66 1 (const int)
0:67 Barrier (void)
0:72 Function Definition: fooaoeu( (void)
0:72 Function Parameters:
0:73 Sequence
0:73 Sequence
0:73 move second child to first child (2-component vector of int)
0:73 'storePos' (2-component vector of int)
0:73 Convert uint to int (2-component vector of int)
0:73 vector swizzle (2-component vector of uint)
0:73 'gl_GlobalInvocationID' (in 3-component vector of uint)
0:73 Sequence
0:73 Constant:
0:73 0 (const int)
0:73 Constant:
0:73 1 (const int)
0:74 Sequence
0:74 move second child to first child (double)
0:74 'localCoef' (double)
0:74 Convert float to double (double)
0:74 length (float)
0:74 divide (2-component vector of float)
0:74 Convert int to float (2-component vector of float)
0:74 subtract (2-component vector of int)
0:74 Convert uint to int (2-component vector of int)
0:74 vector swizzle (2-component vector of uint)
0:74 'gl_LocalInvocationID' (in 3-component vector of uint)
0:74 Sequence
0:74 Constant:
0:74 0 (const int)
0:74 Constant:
0:74 1 (const int)
0:74 Constant:
0:74 8 (const int)
0:74 Constant:
0:74 8.000000
0:75 Sequence
0:75 move second child to first child (4-component vector of double)
0:75 'aa' (4-component vector of double)
0:75 Constant:
0:75 0.400000
0:75 0.200000
0:75 0.300000
0:75 0.400000
0:76 Sequence
0:76 move second child to first child (double)
0:76 'globalCoef' (double)
0:76 Constant:
0:76 1.000000
0:78 Sequence
0:78 move second child to first child (double)
0:78 'di' (double)
0:78 Convert int to double (double)
0:78 'i' (int)
0:? Linker Objects
0:? 'gl_WorkGroupSize' (const 3-component vector of uint)
0:? 2 (const uint)
@@ -88,6 +141,8 @@ ERROR: node is still EOpNull!
0:? 'arrY' (1-element array of int)
0:? 'arrZ' (4096-element array of int)
0:? 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
0:? 'roll' (uniform double)
0:? 'destTex' (writeonly uniform image2D)
Linked compute stage:
@@ -145,6 +200,58 @@ ERROR: node is still EOpNull!
0:66 Constant:
0:66 1 (const int)
0:67 Barrier (void)
0:72 Function Definition: fooaoeu( (void)
0:72 Function Parameters:
0:73 Sequence
0:73 Sequence
0:73 move second child to first child (2-component vector of int)
0:73 'storePos' (2-component vector of int)
0:73 Convert uint to int (2-component vector of int)
0:73 vector swizzle (2-component vector of uint)
0:73 'gl_GlobalInvocationID' (in 3-component vector of uint)
0:73 Sequence
0:73 Constant:
0:73 0 (const int)
0:73 Constant:
0:73 1 (const int)
0:74 Sequence
0:74 move second child to first child (double)
0:74 'localCoef' (double)
0:74 Convert float to double (double)
0:74 length (float)
0:74 divide (2-component vector of float)
0:74 Convert int to float (2-component vector of float)
0:74 subtract (2-component vector of int)
0:74 Convert uint to int (2-component vector of int)
0:74 vector swizzle (2-component vector of uint)
0:74 'gl_LocalInvocationID' (in 3-component vector of uint)
0:74 Sequence
0:74 Constant:
0:74 0 (const int)
0:74 Constant:
0:74 1 (const int)
0:74 Constant:
0:74 8 (const int)
0:74 Constant:
0:74 8.000000
0:75 Sequence
0:75 move second child to first child (4-component vector of double)
0:75 'aa' (4-component vector of double)
0:75 Constant:
0:75 0.400000
0:75 0.200000
0:75 0.300000
0:75 0.400000
0:76 Sequence
0:76 move second child to first child (double)
0:76 'globalCoef' (double)
0:76 Constant:
0:76 1.000000
0:78 Sequence
0:78 move second child to first child (double)
0:78 'di' (double)
0:78 Convert int to double (double)
0:78 'i' (int)
0:? Linker Objects
0:? 'gl_WorkGroupSize' (const 3-component vector of uint)
0:? 2 (const uint)
@@ -164,4 +271,6 @@ ERROR: node is still EOpNull!
0:? 'arrY' (1-element array of int)
0:? 'arrZ' (4096-element array of int)
0:? 'ro' (layout(column_major shared ) readonly buffer block{layout(column_major shared ) buffer int value, layout(column_major shared ) buffer implicitly-sized array of float values})
0:? 'roll' (uniform double)
0:? 'destTex' (writeonly uniform image2D)