glslang/Test/baseResults/hlsl.intrinsics.barriers.comp.out
steve-lunarg 0842dbb39a HLSL: use HLSL parser to parse HLSL intrinsic prototypes, enable int/bool mats
This PR adds a CreateParseContext() fn analogous to CreateBuiltInParseables(),
to create a language specific built in parser.  (This code was present before
but not encapsualted in a fn).  This can now be used to create a source language
specific parser for builtins.

Along with this, the code creating HLSL intrinsic prototypes can now produce
them in HLSL syntax, rather than GLSL syntax.  This relaxes certain prior
restrictions at the parser level.  Lower layers (e.g, SPIR-V) may still have
such restrictions, such as around Nx1 matrices: this code does not impact
that.

This PR also fleshes out matrix types for bools and ints, both of which were
partially in place before.  This was easier than maintaining the restrictions
in the HLSL prototype generator to avoid creating protoypes with those types.

Many tests change because the result type from intrinsics moves from "global"
to "temp".

Several new tests are added for the new types.
2016-11-16 11:19:22 -07:00

83 lines
3.1 KiB
Plaintext

hlsl.intrinsics.barriers.comp
Shader version: 450
local_size = (1, 1, 1)
0:? Sequence
0:3 Function Definition: ComputeShaderFunction( (temp float)
0:3 Function Parameters:
0:? Sequence
0:4 MemoryBarrier (temp void)
0:5 AllMemoryBarrierWithGroupSync (temp void)
0:6 GroupMemoryBarrier (temp void)
0:7 GroupMemoryBarrierWithGroupSync (temp void)
0:8 WorkgroupMemoryBarrier (temp void)
0:9 WorkgroupMemoryBarrierWithGroupSync (temp void)
0:11 Sequence
0:11 move second child to first child (temp float)
0:? '@entryPointOutput' (layout(location=0 ) out float)
0:11 Constant:
0:11 0.000000
0:11 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out float)
Linked compute stage:
Shader version: 450
local_size = (1, 1, 1)
0:? Sequence
0:3 Function Definition: ComputeShaderFunction( (temp float)
0:3 Function Parameters:
0:? Sequence
0:4 MemoryBarrier (temp void)
0:5 AllMemoryBarrierWithGroupSync (temp void)
0:6 GroupMemoryBarrier (temp void)
0:7 GroupMemoryBarrierWithGroupSync (temp void)
0:8 WorkgroupMemoryBarrier (temp void)
0:9 WorkgroupMemoryBarrierWithGroupSync (temp void)
0:11 Sequence
0:11 move second child to first child (temp float)
0:? '@entryPointOutput' (layout(location=0 ) out float)
0:11 Constant:
0:11 0.000000
0:11 Branch: Return
0:? Linker Objects
0:? '@entryPointOutput' (layout(location=0 ) out float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 17
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "ComputeShaderFunction" 14
ExecutionMode 4 LocalSize 1 1 1
Name 4 "ComputeShaderFunction"
Name 14 "@entryPointOutput"
Decorate 14(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: 6(int) Constant 1
8: 6(int) Constant 4048
9: 6(int) Constant 512
10: 6(int) Constant 2
11: 6(int) Constant 256
12: TypeFloat 32
13: TypePointer Output 12(float)
14(@entryPointOutput): 13(ptr) Variable Output
15: 12(float) Constant 0
4(ComputeShaderFunction): 2 Function None 3
5: Label
MemoryBarrier 7 8
ControlBarrier 7 7 8
MemoryBarrier 7 9
ControlBarrier 7 7 9
MemoryBarrier 10 11
ControlBarrier 10 10 11
Store 14(@entryPointOutput) 15
Return
FunctionEnd