HLSL allows a range of types for clip and cull distances. There are three dimensions, including arrayness, vectorness, and semantic ID. SPIR-V requires clip and cull distance be a single array of floats in all cases. This code provides input side conversion between the SPIR-V form and the HLSL form. (Output conversion was added in PR #947 and #997). This PR extends HlslParseContext::assignClipCullDistance to cope with the input side conversion. Not as much changed as appears: there was also a lot of renaming to reflect the fact that the code now handles either direction. Currently, non-{frag,vert} stages are not handled, and are explicitly rejected. Fixes #1026.
120 lines
6.1 KiB
Plaintext
Executable File
120 lines
6.1 KiB
Plaintext
Executable File
hlsl.semantic.geom
|
|
ERROR: 0:15: '' : unimplemented: clip/cull not currently implemented for this stage
|
|
ERROR: 0:15: '' : unimplemented: clip/cull not currently implemented for this stage
|
|
ERROR: 2 compilation errors. No code generated.
|
|
|
|
|
|
Shader version: 500
|
|
invocations = -1
|
|
max_vertices = 4
|
|
input primitive = triangles
|
|
output primitive = line_strip
|
|
ERROR: node is still EOpNull!
|
|
0:13 Function Definition: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
|
|
0:13 Function Parameters:
|
|
0:13 'VertexID' ( in 3-element array of uint)
|
|
0:13 'OutputStream' ( out structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:? Sequence
|
|
0:15 Sequence
|
|
0:15 Sequence
|
|
0:15 move second child to first child ( temp float)
|
|
0:? 'OutputStream.clip0' ( out float Position)
|
|
0:15 clip0: direct index for structure ( temp float)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 0 (const int)
|
|
0:15 move second child to first child ( temp uint)
|
|
0:? 'OutputStream.vpai' ( out uint ViewportIndex)
|
|
0:15 vpai: direct index for structure ( temp uint)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 3 (const int)
|
|
0:15 move second child to first child ( temp uint)
|
|
0:? 'OutputStream.rtai' ( out uint Layer)
|
|
0:15 rtai: direct index for structure ( temp uint)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 4 (const int)
|
|
0:15 move second child to first child ( temp int)
|
|
0:? 'OutputStream.ii' (layout( location=0) out int)
|
|
0:15 ii: direct index for structure ( temp int)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 5 (const int)
|
|
0:15 EmitVertex ( temp void)
|
|
0:13 Function Definition: main( ( temp void)
|
|
0:13 Function Parameters:
|
|
0:? Sequence
|
|
0:13 move second child to first child ( temp 3-element array of uint)
|
|
0:? 'VertexID' ( temp 3-element array of uint)
|
|
0:? 'VertexID' (layout( location=0) in 3-element array of uint)
|
|
0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
|
|
0:? 'VertexID' ( temp 3-element array of uint)
|
|
0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:? Linker Objects
|
|
0:? 'VertexID' (layout( location=0) in 3-element array of uint)
|
|
0:? 'OutputStream.clip0' ( out float Position)
|
|
0:? 'OutputStream.vpai' ( out uint ViewportIndex)
|
|
0:? 'OutputStream.rtai' ( out uint Layer)
|
|
0:? 'OutputStream.ii' (layout( location=0) out int)
|
|
|
|
|
|
Linked geometry stage:
|
|
|
|
|
|
Shader version: 500
|
|
invocations = 1
|
|
max_vertices = 4
|
|
input primitive = triangles
|
|
output primitive = line_strip
|
|
ERROR: node is still EOpNull!
|
|
0:13 Function Definition: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
|
|
0:13 Function Parameters:
|
|
0:13 'VertexID' ( in 3-element array of uint)
|
|
0:13 'OutputStream' ( out structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:? Sequence
|
|
0:15 Sequence
|
|
0:15 Sequence
|
|
0:15 move second child to first child ( temp float)
|
|
0:? 'OutputStream.clip0' ( out float Position)
|
|
0:15 clip0: direct index for structure ( temp float)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 0 (const int)
|
|
0:15 move second child to first child ( temp uint)
|
|
0:? 'OutputStream.vpai' ( out uint ViewportIndex)
|
|
0:15 vpai: direct index for structure ( temp uint)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 3 (const int)
|
|
0:15 move second child to first child ( temp uint)
|
|
0:? 'OutputStream.rtai' ( out uint Layer)
|
|
0:15 rtai: direct index for structure ( temp uint)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 4 (const int)
|
|
0:15 move second child to first child ( temp int)
|
|
0:? 'OutputStream.ii' (layout( location=0) out int)
|
|
0:15 ii: direct index for structure ( temp int)
|
|
0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:15 Constant:
|
|
0:15 5 (const int)
|
|
0:15 EmitVertex ( temp void)
|
|
0:13 Function Definition: main( ( temp void)
|
|
0:13 Function Parameters:
|
|
0:? Sequence
|
|
0:13 move second child to first child ( temp 3-element array of uint)
|
|
0:? 'VertexID' ( temp 3-element array of uint)
|
|
0:? 'VertexID' (layout( location=0) in 3-element array of uint)
|
|
0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void)
|
|
0:? 'VertexID' ( temp 3-element array of uint)
|
|
0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii})
|
|
0:? Linker Objects
|
|
0:? 'VertexID' (layout( location=0) in 3-element array of uint)
|
|
0:? 'OutputStream.clip0' ( out float Position)
|
|
0:? 'OutputStream.vpai' ( out uint ViewportIndex)
|
|
0:? 'OutputStream.rtai' ( out uint Layer)
|
|
0:? 'OutputStream.ii' (layout( location=0) out int)
|
|
|
|
SPIR-V is not generated for failed compile or link
|