mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +00:00
Merge pull request #540 from steve-lunarg/rwbuffers
HLSL: phase 1: add RWTexture and RWBuffer
This commit is contained in:
commit
7a7217c81b
1082
Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
Normal file
1082
Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out
Normal file
File diff suppressed because it is too large
Load Diff
200
Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out
Normal file
200
Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
hlsl.load.rwbuffer.dx10.frag
|
||||||
|
Shader version: 450
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:22 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||||
|
0:22 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:25 imageLoad (global 4-component vector of float)
|
||||||
|
0:25 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
|
||||||
|
0:25 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:25 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:25 Constant:
|
||||||
|
0:25 0 (const uint)
|
||||||
|
0:26 imageLoad (global 4-component vector of uint)
|
||||||
|
0:26 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
|
||||||
|
0:26 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:26 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:26 Constant:
|
||||||
|
0:26 0 (const uint)
|
||||||
|
0:27 imageLoad (global 4-component vector of int)
|
||||||
|
0:27 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
|
||||||
|
0:27 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:27 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:27 Constant:
|
||||||
|
0:27 0 (const uint)
|
||||||
|
0:29 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:29 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:29 'psout' (temp structure{temp 4-component vector of float Color})
|
||||||
|
0:29 Constant:
|
||||||
|
0:29 0 (const int)
|
||||||
|
0:29 Constant:
|
||||||
|
0:29 1.000000
|
||||||
|
0:29 1.000000
|
||||||
|
0:29 1.000000
|
||||||
|
0:29 1.000000
|
||||||
|
0:31 Sequence
|
||||||
|
0:31 Sequence
|
||||||
|
0:31 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:31 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:31 'psout' (temp structure{temp 4-component vector of float Color})
|
||||||
|
0:31 Constant:
|
||||||
|
0:31 0 (const int)
|
||||||
|
0:31 Branch: Return
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
|
||||||
|
0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
|
||||||
|
0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
|
||||||
|
|
||||||
|
Linked fragment stage:
|
||||||
|
|
||||||
|
|
||||||
|
Shader version: 450
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:22 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||||
|
0:22 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:25 imageLoad (global 4-component vector of float)
|
||||||
|
0:25 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
|
||||||
|
0:25 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:25 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:25 Constant:
|
||||||
|
0:25 0 (const uint)
|
||||||
|
0:26 imageLoad (global 4-component vector of uint)
|
||||||
|
0:26 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
|
||||||
|
0:26 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:26 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:26 Constant:
|
||||||
|
0:26 0 (const uint)
|
||||||
|
0:27 imageLoad (global 4-component vector of int)
|
||||||
|
0:27 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
|
||||||
|
0:27 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:27 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:27 Constant:
|
||||||
|
0:27 0 (const uint)
|
||||||
|
0:29 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:29 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:29 'psout' (temp structure{temp 4-component vector of float Color})
|
||||||
|
0:29 Constant:
|
||||||
|
0:29 0 (const int)
|
||||||
|
0:29 Constant:
|
||||||
|
0:29 1.000000
|
||||||
|
0:29 1.000000
|
||||||
|
0:29 1.000000
|
||||||
|
0:29 1.000000
|
||||||
|
0:31 Sequence
|
||||||
|
0:31 Sequence
|
||||||
|
0:31 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:31 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:31 'psout' (temp structure{temp 4-component vector of float Color})
|
||||||
|
0:31 Constant:
|
||||||
|
0:31 0 (const int)
|
||||||
|
0:31 Branch: Return
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'g_tBuffF' (layout(rgba32f ) uniform imageBuffer)
|
||||||
|
0:? 'g_tBuffI' (layout(rgba32i ) uniform iimageBuffer)
|
||||||
|
0:? 'g_tBuffU' (layout(rgba32ui ) uniform uimageBuffer)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80001
|
||||||
|
// Id's are bound by 52
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability SampledBuffer
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 48
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "g_tBuffF"
|
||||||
|
Name 15 "$Global"
|
||||||
|
MemberName 15($Global) 0 "c1"
|
||||||
|
MemberName 15($Global) 1 "c2"
|
||||||
|
MemberName 15($Global) 2 "c3"
|
||||||
|
MemberName 15($Global) 3 "c4"
|
||||||
|
MemberName 15($Global) 4 "o1"
|
||||||
|
MemberName 15($Global) 5 "o2"
|
||||||
|
MemberName 15($Global) 6 "o3"
|
||||||
|
MemberName 15($Global) 7 "o4"
|
||||||
|
Name 17 ""
|
||||||
|
Name 27 "g_tBuffU"
|
||||||
|
Name 35 "g_tBuffI"
|
||||||
|
Name 40 "PS_OUTPUT"
|
||||||
|
MemberName 40(PS_OUTPUT) 0 "Color"
|
||||||
|
Name 42 "psout"
|
||||||
|
Name 48 "Color"
|
||||||
|
Decorate 9(g_tBuffF) DescriptorSet 0
|
||||||
|
MemberDecorate 15($Global) 0 Offset 0
|
||||||
|
MemberDecorate 15($Global) 1 Offset 8
|
||||||
|
MemberDecorate 15($Global) 2 Offset 16
|
||||||
|
MemberDecorate 15($Global) 3 Offset 32
|
||||||
|
MemberDecorate 15($Global) 4 Offset 48
|
||||||
|
MemberDecorate 15($Global) 5 Offset 56
|
||||||
|
MemberDecorate 15($Global) 6 Offset 64
|
||||||
|
MemberDecorate 15($Global) 7 Offset 80
|
||||||
|
Decorate 15($Global) Block
|
||||||
|
Decorate 17 DescriptorSet 0
|
||||||
|
Decorate 27(g_tBuffU) DescriptorSet 0
|
||||||
|
Decorate 35(g_tBuffI) DescriptorSet 0
|
||||||
|
Decorate 48(Color) Location 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeImage 6(float) Buffer nonsampled format:Rgba32f
|
||||||
|
8: TypePointer UniformConstant 7
|
||||||
|
9(g_tBuffF): 8(ptr) Variable UniformConstant
|
||||||
|
11: TypeInt 32 1
|
||||||
|
12: TypeVector 11(int) 2
|
||||||
|
13: TypeVector 11(int) 3
|
||||||
|
14: TypeVector 11(int) 4
|
||||||
|
15($Global): TypeStruct 11(int) 12(ivec2) 13(ivec3) 14(ivec4) 11(int) 12(ivec2) 13(ivec3) 14(ivec4)
|
||||||
|
16: TypePointer Uniform 15($Global)
|
||||||
|
17: 16(ptr) Variable Uniform
|
||||||
|
18: 11(int) Constant 0
|
||||||
|
19: TypePointer Uniform 11(int)
|
||||||
|
22: TypeVector 6(float) 4
|
||||||
|
24: TypeInt 32 0
|
||||||
|
25: TypeImage 24(int) Buffer nonsampled format:Rgba32ui
|
||||||
|
26: TypePointer UniformConstant 25
|
||||||
|
27(g_tBuffU): 26(ptr) Variable UniformConstant
|
||||||
|
31: TypeVector 24(int) 4
|
||||||
|
33: TypeImage 11(int) Buffer nonsampled format:Rgba32i
|
||||||
|
34: TypePointer UniformConstant 33
|
||||||
|
35(g_tBuffI): 34(ptr) Variable UniformConstant
|
||||||
|
40(PS_OUTPUT): TypeStruct 22(fvec4)
|
||||||
|
41: TypePointer Function 40(PS_OUTPUT)
|
||||||
|
43: 6(float) Constant 1065353216
|
||||||
|
44: 22(fvec4) ConstantComposite 43 43 43 43
|
||||||
|
45: TypePointer Function 22(fvec4)
|
||||||
|
47: TypePointer Output 22(fvec4)
|
||||||
|
48(Color): 47(ptr) Variable Output
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
42(psout): 41(ptr) Variable Function
|
||||||
|
10: 7 Load 9(g_tBuffF)
|
||||||
|
20: 19(ptr) AccessChain 17 18
|
||||||
|
21: 11(int) Load 20
|
||||||
|
23: 22(fvec4) ImageRead 10 21
|
||||||
|
28: 25 Load 27(g_tBuffU)
|
||||||
|
29: 19(ptr) AccessChain 17 18
|
||||||
|
30: 11(int) Load 29
|
||||||
|
32: 31(ivec4) ImageRead 28 30
|
||||||
|
36: 33 Load 35(g_tBuffI)
|
||||||
|
37: 19(ptr) AccessChain 17 18
|
||||||
|
38: 11(int) Load 37
|
||||||
|
39: 14(ivec4) ImageRead 36 38
|
||||||
|
46: 45(ptr) AccessChain 42(psout) 18
|
||||||
|
Store 46 44
|
||||||
|
49: 45(ptr) AccessChain 42(psout) 18
|
||||||
|
50: 22(fvec4) Load 49
|
||||||
|
Store 48(Color) 50
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
383
Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out
Normal file
383
Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out
Normal file
@ -0,0 +1,383 @@
|
|||||||
|
hlsl.load.rwtexture.array.dx10.frag
|
||||||
|
Shader version: 450
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:40 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:44 imageLoad (global 4-component vector of float)
|
||||||
|
0:44 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray)
|
||||||
|
0:44 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:44 Constant:
|
||||||
|
0:44 1 (const uint)
|
||||||
|
0:45 imageLoad (global 4-component vector of int)
|
||||||
|
0:45 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray)
|
||||||
|
0:45 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:45 Constant:
|
||||||
|
0:45 1 (const uint)
|
||||||
|
0:46 imageLoad (global 4-component vector of uint)
|
||||||
|
0:46 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray)
|
||||||
|
0:46 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:46 Constant:
|
||||||
|
0:46 1 (const uint)
|
||||||
|
0:49 imageLoad (global 4-component vector of float)
|
||||||
|
0:49 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray)
|
||||||
|
0:49 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:49 Constant:
|
||||||
|
0:49 2 (const uint)
|
||||||
|
0:50 imageLoad (global 4-component vector of int)
|
||||||
|
0:50 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray)
|
||||||
|
0:50 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:50 Constant:
|
||||||
|
0:50 2 (const uint)
|
||||||
|
0:51 imageLoad (global 4-component vector of uint)
|
||||||
|
0:51 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray)
|
||||||
|
0:51 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:51 Constant:
|
||||||
|
0:51 2 (const uint)
|
||||||
|
0:53 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:53 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:53 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:53 Constant:
|
||||||
|
0:53 0 (const int)
|
||||||
|
0:53 Constant:
|
||||||
|
0:53 1.000000
|
||||||
|
0:53 1.000000
|
||||||
|
0:53 1.000000
|
||||||
|
0:53 1.000000
|
||||||
|
0:54 move second child to first child (temp float)
|
||||||
|
0:54 Depth: direct index for structure (temp float)
|
||||||
|
0:54 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:54 Constant:
|
||||||
|
0:54 1 (const int)
|
||||||
|
0:54 Constant:
|
||||||
|
0:54 1.000000
|
||||||
|
0:56 Sequence
|
||||||
|
0:56 Sequence
|
||||||
|
0:56 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:56 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 0 (const int)
|
||||||
|
0:56 move second child to first child (temp float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:56 Depth: direct index for structure (temp float)
|
||||||
|
0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 1 (const int)
|
||||||
|
0:56 Branch: Return
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||||
|
0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||||
|
0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
|
||||||
|
0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
|
||||||
|
0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||||
|
0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
|
||||||
|
0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
|
||||||
|
0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
|
||||||
|
0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
|
||||||
|
0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
|
||||||
|
0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray)
|
||||||
|
0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray)
|
||||||
|
0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray)
|
||||||
|
0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray)
|
||||||
|
0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray)
|
||||||
|
0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
|
||||||
|
|
||||||
|
Linked fragment stage:
|
||||||
|
|
||||||
|
|
||||||
|
Shader version: 450
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:40 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:44 imageLoad (global 4-component vector of float)
|
||||||
|
0:44 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray)
|
||||||
|
0:44 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:44 Constant:
|
||||||
|
0:44 1 (const uint)
|
||||||
|
0:45 imageLoad (global 4-component vector of int)
|
||||||
|
0:45 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray)
|
||||||
|
0:45 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:45 Constant:
|
||||||
|
0:45 1 (const uint)
|
||||||
|
0:46 imageLoad (global 4-component vector of uint)
|
||||||
|
0:46 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray)
|
||||||
|
0:46 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:46 Constant:
|
||||||
|
0:46 1 (const uint)
|
||||||
|
0:49 imageLoad (global 4-component vector of float)
|
||||||
|
0:49 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray)
|
||||||
|
0:49 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:49 Constant:
|
||||||
|
0:49 2 (const uint)
|
||||||
|
0:50 imageLoad (global 4-component vector of int)
|
||||||
|
0:50 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray)
|
||||||
|
0:50 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:50 Constant:
|
||||||
|
0:50 2 (const uint)
|
||||||
|
0:51 imageLoad (global 4-component vector of uint)
|
||||||
|
0:51 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray)
|
||||||
|
0:51 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:51 Constant:
|
||||||
|
0:51 2 (const uint)
|
||||||
|
0:53 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:53 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:53 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:53 Constant:
|
||||||
|
0:53 0 (const int)
|
||||||
|
0:53 Constant:
|
||||||
|
0:53 1.000000
|
||||||
|
0:53 1.000000
|
||||||
|
0:53 1.000000
|
||||||
|
0:53 1.000000
|
||||||
|
0:54 move second child to first child (temp float)
|
||||||
|
0:54 Depth: direct index for structure (temp float)
|
||||||
|
0:54 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:54 Constant:
|
||||||
|
0:54 1 (const int)
|
||||||
|
0:54 Constant:
|
||||||
|
0:54 1.000000
|
||||||
|
0:56 Sequence
|
||||||
|
0:56 Sequence
|
||||||
|
0:56 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:56 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 0 (const int)
|
||||||
|
0:56 move second child to first child (temp float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:56 Depth: direct index for structure (temp float)
|
||||||
|
0:56 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 1 (const int)
|
||||||
|
0:56 Branch: Return
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||||
|
0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||||
|
0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
|
||||||
|
0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
|
||||||
|
0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||||
|
0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
|
||||||
|
0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
|
||||||
|
0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
|
||||||
|
0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
|
||||||
|
0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
|
||||||
|
0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray)
|
||||||
|
0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray)
|
||||||
|
0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray)
|
||||||
|
0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray)
|
||||||
|
0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray)
|
||||||
|
0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80001
|
||||||
|
// Id's are bound by 112
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Sampled1D
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 74 78
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "g_tTex1df4a"
|
||||||
|
Name 15 "$Global"
|
||||||
|
MemberName 15($Global) 0 "c1"
|
||||||
|
MemberName 15($Global) 1 "c2"
|
||||||
|
MemberName 15($Global) 2 "c3"
|
||||||
|
MemberName 15($Global) 3 "c4"
|
||||||
|
MemberName 15($Global) 4 "o1"
|
||||||
|
MemberName 15($Global) 5 "o2"
|
||||||
|
MemberName 15($Global) 6 "o3"
|
||||||
|
MemberName 15($Global) 7 "o4"
|
||||||
|
Name 17 ""
|
||||||
|
Name 26 "g_tTex1di4a"
|
||||||
|
Name 34 "g_tTex1du4a"
|
||||||
|
Name 42 "g_tTex2df4a"
|
||||||
|
Name 51 "g_tTex2di4a"
|
||||||
|
Name 58 "g_tTex2du4a"
|
||||||
|
Name 63 "PS_OUTPUT"
|
||||||
|
MemberName 63(PS_OUTPUT) 0 "Color"
|
||||||
|
MemberName 63(PS_OUTPUT) 1 "Depth"
|
||||||
|
Name 65 "psout"
|
||||||
|
Name 74 "Color"
|
||||||
|
Name 78 "Depth"
|
||||||
|
Name 84 "g_sSamp"
|
||||||
|
Name 87 "g_tTex1df4"
|
||||||
|
Name 90 "g_tTex1di4"
|
||||||
|
Name 93 "g_tTex1du4"
|
||||||
|
Name 96 "g_tTex2df4"
|
||||||
|
Name 99 "g_tTex2di4"
|
||||||
|
Name 102 "g_tTex2du4"
|
||||||
|
Name 105 "g_tTex3df4"
|
||||||
|
Name 108 "g_tTex3di4"
|
||||||
|
Name 111 "g_tTex3du4"
|
||||||
|
Decorate 9(g_tTex1df4a) DescriptorSet 0
|
||||||
|
MemberDecorate 15($Global) 0 Offset 0
|
||||||
|
MemberDecorate 15($Global) 1 Offset 8
|
||||||
|
MemberDecorate 15($Global) 2 Offset 16
|
||||||
|
MemberDecorate 15($Global) 3 Offset 32
|
||||||
|
MemberDecorate 15($Global) 4 Offset 48
|
||||||
|
MemberDecorate 15($Global) 5 Offset 56
|
||||||
|
MemberDecorate 15($Global) 6 Offset 64
|
||||||
|
MemberDecorate 15($Global) 7 Offset 80
|
||||||
|
Decorate 15($Global) Block
|
||||||
|
Decorate 17 DescriptorSet 0
|
||||||
|
Decorate 26(g_tTex1di4a) DescriptorSet 0
|
||||||
|
Decorate 34(g_tTex1du4a) DescriptorSet 0
|
||||||
|
Decorate 42(g_tTex2df4a) DescriptorSet 0
|
||||||
|
Decorate 51(g_tTex2di4a) DescriptorSet 0
|
||||||
|
Decorate 58(g_tTex2du4a) DescriptorSet 0
|
||||||
|
Decorate 74(Color) Location 0
|
||||||
|
Decorate 78(Depth) BuiltIn FragDepth
|
||||||
|
Decorate 84(g_sSamp) DescriptorSet 0
|
||||||
|
Decorate 84(g_sSamp) Binding 0
|
||||||
|
Decorate 87(g_tTex1df4) DescriptorSet 0
|
||||||
|
Decorate 87(g_tTex1df4) Binding 0
|
||||||
|
Decorate 90(g_tTex1di4) DescriptorSet 0
|
||||||
|
Decorate 93(g_tTex1du4) DescriptorSet 0
|
||||||
|
Decorate 96(g_tTex2df4) DescriptorSet 0
|
||||||
|
Decorate 99(g_tTex2di4) DescriptorSet 0
|
||||||
|
Decorate 102(g_tTex2du4) DescriptorSet 0
|
||||||
|
Decorate 105(g_tTex3df4) DescriptorSet 0
|
||||||
|
Decorate 108(g_tTex3di4) DescriptorSet 0
|
||||||
|
Decorate 111(g_tTex3du4) DescriptorSet 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeImage 6(float) 1D array nonsampled format:Rgba32f
|
||||||
|
8: TypePointer UniformConstant 7
|
||||||
|
9(g_tTex1df4a): 8(ptr) Variable UniformConstant
|
||||||
|
11: TypeInt 32 1
|
||||||
|
12: TypeVector 11(int) 2
|
||||||
|
13: TypeVector 11(int) 3
|
||||||
|
14: TypeVector 11(int) 4
|
||||||
|
15($Global): TypeStruct 11(int) 12(ivec2) 13(ivec3) 14(ivec4) 11(int) 12(ivec2) 13(ivec3) 14(ivec4)
|
||||||
|
16: TypePointer Uniform 15($Global)
|
||||||
|
17: 16(ptr) Variable Uniform
|
||||||
|
18: 11(int) Constant 1
|
||||||
|
19: TypePointer Uniform 12(ivec2)
|
||||||
|
22: TypeVector 6(float) 4
|
||||||
|
24: TypeImage 11(int) 1D array nonsampled format:Rgba32i
|
||||||
|
25: TypePointer UniformConstant 24
|
||||||
|
26(g_tTex1di4a): 25(ptr) Variable UniformConstant
|
||||||
|
31: TypeInt 32 0
|
||||||
|
32: TypeImage 31(int) 1D array nonsampled format:Rgba32ui
|
||||||
|
33: TypePointer UniformConstant 32
|
||||||
|
34(g_tTex1du4a): 33(ptr) Variable UniformConstant
|
||||||
|
38: TypeVector 31(int) 4
|
||||||
|
40: TypeImage 6(float) 2D array nonsampled format:Rgba32f
|
||||||
|
41: TypePointer UniformConstant 40
|
||||||
|
42(g_tTex2df4a): 41(ptr) Variable UniformConstant
|
||||||
|
44: 11(int) Constant 2
|
||||||
|
45: TypePointer Uniform 13(ivec3)
|
||||||
|
49: TypeImage 11(int) 2D array nonsampled format:Rgba32i
|
||||||
|
50: TypePointer UniformConstant 49
|
||||||
|
51(g_tTex2di4a): 50(ptr) Variable UniformConstant
|
||||||
|
56: TypeImage 31(int) 2D array nonsampled format:Rgba32ui
|
||||||
|
57: TypePointer UniformConstant 56
|
||||||
|
58(g_tTex2du4a): 57(ptr) Variable UniformConstant
|
||||||
|
63(PS_OUTPUT): TypeStruct 22(fvec4) 6(float)
|
||||||
|
64: TypePointer Function 63(PS_OUTPUT)
|
||||||
|
66: 11(int) Constant 0
|
||||||
|
67: 6(float) Constant 1065353216
|
||||||
|
68: 22(fvec4) ConstantComposite 67 67 67 67
|
||||||
|
69: TypePointer Function 22(fvec4)
|
||||||
|
71: TypePointer Function 6(float)
|
||||||
|
73: TypePointer Output 22(fvec4)
|
||||||
|
74(Color): 73(ptr) Variable Output
|
||||||
|
77: TypePointer Output 6(float)
|
||||||
|
78(Depth): 77(ptr) Variable Output
|
||||||
|
82: TypeSampler
|
||||||
|
83: TypePointer UniformConstant 82
|
||||||
|
84(g_sSamp): 83(ptr) Variable UniformConstant
|
||||||
|
85: TypeImage 6(float) 1D nonsampled format:Rgba32f
|
||||||
|
86: TypePointer UniformConstant 85
|
||||||
|
87(g_tTex1df4): 86(ptr) Variable UniformConstant
|
||||||
|
88: TypeImage 11(int) 1D nonsampled format:Rgba32i
|
||||||
|
89: TypePointer UniformConstant 88
|
||||||
|
90(g_tTex1di4): 89(ptr) Variable UniformConstant
|
||||||
|
91: TypeImage 31(int) 1D nonsampled format:Rgba32ui
|
||||||
|
92: TypePointer UniformConstant 91
|
||||||
|
93(g_tTex1du4): 92(ptr) Variable UniformConstant
|
||||||
|
94: TypeImage 6(float) 2D nonsampled format:Rgba32f
|
||||||
|
95: TypePointer UniformConstant 94
|
||||||
|
96(g_tTex2df4): 95(ptr) Variable UniformConstant
|
||||||
|
97: TypeImage 11(int) 2D nonsampled format:Rgba32i
|
||||||
|
98: TypePointer UniformConstant 97
|
||||||
|
99(g_tTex2di4): 98(ptr) Variable UniformConstant
|
||||||
|
100: TypeImage 31(int) 2D nonsampled format:Rgba32ui
|
||||||
|
101: TypePointer UniformConstant 100
|
||||||
|
102(g_tTex2du4): 101(ptr) Variable UniformConstant
|
||||||
|
103: TypeImage 6(float) 3D nonsampled format:Rgba32f
|
||||||
|
104: TypePointer UniformConstant 103
|
||||||
|
105(g_tTex3df4): 104(ptr) Variable UniformConstant
|
||||||
|
106: TypeImage 11(int) 3D nonsampled format:Rgba32i
|
||||||
|
107: TypePointer UniformConstant 106
|
||||||
|
108(g_tTex3di4): 107(ptr) Variable UniformConstant
|
||||||
|
109: TypeImage 31(int) 3D nonsampled format:Rgba32ui
|
||||||
|
110: TypePointer UniformConstant 109
|
||||||
|
111(g_tTex3du4): 110(ptr) Variable UniformConstant
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
65(psout): 64(ptr) Variable Function
|
||||||
|
10: 7 Load 9(g_tTex1df4a)
|
||||||
|
20: 19(ptr) AccessChain 17 18
|
||||||
|
21: 12(ivec2) Load 20
|
||||||
|
23: 22(fvec4) ImageRead 10 21
|
||||||
|
27: 24 Load 26(g_tTex1di4a)
|
||||||
|
28: 19(ptr) AccessChain 17 18
|
||||||
|
29: 12(ivec2) Load 28
|
||||||
|
30: 14(ivec4) ImageRead 27 29
|
||||||
|
35: 32 Load 34(g_tTex1du4a)
|
||||||
|
36: 19(ptr) AccessChain 17 18
|
||||||
|
37: 12(ivec2) Load 36
|
||||||
|
39: 38(ivec4) ImageRead 35 37
|
||||||
|
43: 40 Load 42(g_tTex2df4a)
|
||||||
|
46: 45(ptr) AccessChain 17 44
|
||||||
|
47: 13(ivec3) Load 46
|
||||||
|
48: 22(fvec4) ImageRead 43 47
|
||||||
|
52: 49 Load 51(g_tTex2di4a)
|
||||||
|
53: 45(ptr) AccessChain 17 44
|
||||||
|
54: 13(ivec3) Load 53
|
||||||
|
55: 14(ivec4) ImageRead 52 54
|
||||||
|
59: 56 Load 58(g_tTex2du4a)
|
||||||
|
60: 45(ptr) AccessChain 17 44
|
||||||
|
61: 13(ivec3) Load 60
|
||||||
|
62: 38(ivec4) ImageRead 59 61
|
||||||
|
70: 69(ptr) AccessChain 65(psout) 66
|
||||||
|
Store 70 68
|
||||||
|
72: 71(ptr) AccessChain 65(psout) 18
|
||||||
|
Store 72 67
|
||||||
|
75: 69(ptr) AccessChain 65(psout) 66
|
||||||
|
76: 22(fvec4) Load 75
|
||||||
|
Store 74(Color) 76
|
||||||
|
79: 71(ptr) AccessChain 65(psout) 18
|
||||||
|
80: 6(float) Load 79
|
||||||
|
Store 78(Depth) 80
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
432
Test/baseResults/hlsl.load.rwtexture.dx10.frag.out
Normal file
432
Test/baseResults/hlsl.load.rwtexture.dx10.frag.out
Normal file
@ -0,0 +1,432 @@
|
|||||||
|
hlsl.load.rwtexture.dx10.frag
|
||||||
|
Shader version: 450
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:40 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:44 imageLoad (global 4-component vector of float)
|
||||||
|
0:44 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||||
|
0:44 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:44 Constant:
|
||||||
|
0:44 0 (const uint)
|
||||||
|
0:45 imageLoad (global 4-component vector of int)
|
||||||
|
0:45 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
|
||||||
|
0:45 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:45 Constant:
|
||||||
|
0:45 0 (const uint)
|
||||||
|
0:46 imageLoad (global 4-component vector of uint)
|
||||||
|
0:46 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
|
||||||
|
0:46 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:46 Constant:
|
||||||
|
0:46 0 (const uint)
|
||||||
|
0:49 imageLoad (global 4-component vector of float)
|
||||||
|
0:49 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||||
|
0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:49 Constant:
|
||||||
|
0:49 1 (const uint)
|
||||||
|
0:50 imageLoad (global 4-component vector of int)
|
||||||
|
0:50 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
|
||||||
|
0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:50 Constant:
|
||||||
|
0:50 1 (const uint)
|
||||||
|
0:51 imageLoad (global 4-component vector of uint)
|
||||||
|
0:51 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
|
||||||
|
0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:51 Constant:
|
||||||
|
0:51 1 (const uint)
|
||||||
|
0:54 imageLoad (global 4-component vector of float)
|
||||||
|
0:54 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
|
||||||
|
0:54 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:54 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:54 Constant:
|
||||||
|
0:54 2 (const uint)
|
||||||
|
0:55 imageLoad (global 4-component vector of int)
|
||||||
|
0:55 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
|
||||||
|
0:55 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:55 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:55 Constant:
|
||||||
|
0:55 2 (const uint)
|
||||||
|
0:56 imageLoad (global 4-component vector of uint)
|
||||||
|
0:56 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
|
||||||
|
0:56 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:56 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 2 (const uint)
|
||||||
|
0:58 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:58 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:58 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:58 Constant:
|
||||||
|
0:58 0 (const int)
|
||||||
|
0:58 Constant:
|
||||||
|
0:58 1.000000
|
||||||
|
0:58 1.000000
|
||||||
|
0:58 1.000000
|
||||||
|
0:58 1.000000
|
||||||
|
0:59 move second child to first child (temp float)
|
||||||
|
0:59 Depth: direct index for structure (temp float)
|
||||||
|
0:59 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:59 Constant:
|
||||||
|
0:59 1 (const int)
|
||||||
|
0:59 Constant:
|
||||||
|
0:59 1.000000
|
||||||
|
0:61 Sequence
|
||||||
|
0:61 Sequence
|
||||||
|
0:61 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:61 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:61 Constant:
|
||||||
|
0:61 0 (const int)
|
||||||
|
0:61 move second child to first child (temp float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:61 Depth: direct index for structure (temp float)
|
||||||
|
0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:61 Constant:
|
||||||
|
0:61 1 (const int)
|
||||||
|
0:61 Branch: Return
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||||
|
0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||||
|
0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
|
||||||
|
0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
|
||||||
|
0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||||
|
0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
|
||||||
|
0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
|
||||||
|
0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
|
||||||
|
0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
|
||||||
|
0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
|
||||||
|
0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray)
|
||||||
|
0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray)
|
||||||
|
0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray)
|
||||||
|
0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray)
|
||||||
|
0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray)
|
||||||
|
0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
|
||||||
|
|
||||||
|
Linked fragment stage:
|
||||||
|
|
||||||
|
|
||||||
|
Shader version: 450
|
||||||
|
gl_FragCoord origin is upper left
|
||||||
|
0:? Sequence
|
||||||
|
0:40 Function Definition: main( (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:40 Function Parameters:
|
||||||
|
0:? Sequence
|
||||||
|
0:44 imageLoad (global 4-component vector of float)
|
||||||
|
0:44 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||||
|
0:44 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:44 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:44 Constant:
|
||||||
|
0:44 0 (const uint)
|
||||||
|
0:45 imageLoad (global 4-component vector of int)
|
||||||
|
0:45 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
|
||||||
|
0:45 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:45 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:45 Constant:
|
||||||
|
0:45 0 (const uint)
|
||||||
|
0:46 imageLoad (global 4-component vector of uint)
|
||||||
|
0:46 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
|
||||||
|
0:46 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||||
|
0:46 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:46 Constant:
|
||||||
|
0:46 0 (const uint)
|
||||||
|
0:49 imageLoad (global 4-component vector of float)
|
||||||
|
0:49 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||||
|
0:49 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:49 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:49 Constant:
|
||||||
|
0:49 1 (const uint)
|
||||||
|
0:50 imageLoad (global 4-component vector of int)
|
||||||
|
0:50 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
|
||||||
|
0:50 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:50 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:50 Constant:
|
||||||
|
0:50 1 (const uint)
|
||||||
|
0:51 imageLoad (global 4-component vector of uint)
|
||||||
|
0:51 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
|
||||||
|
0:51 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||||
|
0:51 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:51 Constant:
|
||||||
|
0:51 1 (const uint)
|
||||||
|
0:54 imageLoad (global 4-component vector of float)
|
||||||
|
0:54 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
|
||||||
|
0:54 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:54 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:54 Constant:
|
||||||
|
0:54 2 (const uint)
|
||||||
|
0:55 imageLoad (global 4-component vector of int)
|
||||||
|
0:55 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
|
||||||
|
0:55 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:55 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:55 Constant:
|
||||||
|
0:55 2 (const uint)
|
||||||
|
0:56 imageLoad (global 4-component vector of uint)
|
||||||
|
0:56 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
|
||||||
|
0:56 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||||
|
0:56 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
0:56 Constant:
|
||||||
|
0:56 2 (const uint)
|
||||||
|
0:58 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:58 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:58 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:58 Constant:
|
||||||
|
0:58 0 (const int)
|
||||||
|
0:58 Constant:
|
||||||
|
0:58 1.000000
|
||||||
|
0:58 1.000000
|
||||||
|
0:58 1.000000
|
||||||
|
0:58 1.000000
|
||||||
|
0:59 move second child to first child (temp float)
|
||||||
|
0:59 Depth: direct index for structure (temp float)
|
||||||
|
0:59 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:59 Constant:
|
||||||
|
0:59 1 (const int)
|
||||||
|
0:59 Constant:
|
||||||
|
0:59 1.000000
|
||||||
|
0:61 Sequence
|
||||||
|
0:61 Sequence
|
||||||
|
0:61 move second child to first child (temp 4-component vector of float)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:61 Color: direct index for structure (temp 4-component vector of float)
|
||||||
|
0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:61 Constant:
|
||||||
|
0:61 0 (const int)
|
||||||
|
0:61 move second child to first child (temp float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:61 Depth: direct index for structure (temp float)
|
||||||
|
0:61 'psout' (temp structure{temp 4-component vector of float Color, temp float Depth})
|
||||||
|
0:61 Constant:
|
||||||
|
0:61 1 (const int)
|
||||||
|
0:61 Branch: Return
|
||||||
|
0:? Linker Objects
|
||||||
|
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||||
|
0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||||
|
0:? 'g_tTex1di4' (layout(rgba32i ) uniform iimage1D)
|
||||||
|
0:? 'g_tTex1du4' (layout(rgba32ui ) uniform uimage1D)
|
||||||
|
0:? 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||||
|
0:? 'g_tTex2di4' (layout(rgba32i ) uniform iimage2D)
|
||||||
|
0:? 'g_tTex2du4' (layout(rgba32ui ) uniform uimage2D)
|
||||||
|
0:? 'g_tTex3df4' (layout(rgba32f ) uniform image3D)
|
||||||
|
0:? 'g_tTex3di4' (layout(rgba32i ) uniform iimage3D)
|
||||||
|
0:? 'g_tTex3du4' (layout(rgba32ui ) uniform uimage3D)
|
||||||
|
0:? 'g_tTex1df4a' (layout(rgba32f ) uniform image1DArray)
|
||||||
|
0:? 'g_tTex1di4a' (layout(rgba32i ) uniform iimage1DArray)
|
||||||
|
0:? 'g_tTex1du4a' (layout(rgba32ui ) uniform uimage1DArray)
|
||||||
|
0:? 'g_tTex2df4a' (layout(rgba32f ) uniform image2DArray)
|
||||||
|
0:? 'g_tTex2di4a' (layout(rgba32i ) uniform iimage2DArray)
|
||||||
|
0:? 'g_tTex2du4a' (layout(rgba32ui ) uniform uimage2DArray)
|
||||||
|
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||||
|
0:? 'Depth' (out float FragDepth)
|
||||||
|
0:? 'anon@0' (uniform block{layout(offset=0 ) uniform int c1, layout(offset=8 ) uniform 2-component vector of int c2, layout(offset=16 ) uniform 3-component vector of int c3, layout(offset=32 ) uniform 4-component vector of int c4, layout(offset=48 ) uniform int o1, layout(offset=56 ) uniform 2-component vector of int o2, layout(offset=64 ) uniform 3-component vector of int o3, layout(offset=80 ) uniform 4-component vector of int o4})
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80001
|
||||||
|
// Id's are bound by 125
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Sampled1D
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Fragment 4 "main" 96 100
|
||||||
|
ExecutionMode 4 OriginUpperLeft
|
||||||
|
Name 4 "main"
|
||||||
|
Name 9 "g_tTex1df4"
|
||||||
|
Name 15 "$Global"
|
||||||
|
MemberName 15($Global) 0 "c1"
|
||||||
|
MemberName 15($Global) 1 "c2"
|
||||||
|
MemberName 15($Global) 2 "c3"
|
||||||
|
MemberName 15($Global) 3 "c4"
|
||||||
|
MemberName 15($Global) 4 "o1"
|
||||||
|
MemberName 15($Global) 5 "o2"
|
||||||
|
MemberName 15($Global) 6 "o3"
|
||||||
|
MemberName 15($Global) 7 "o4"
|
||||||
|
Name 17 ""
|
||||||
|
Name 26 "g_tTex1di4"
|
||||||
|
Name 34 "g_tTex1du4"
|
||||||
|
Name 42 "g_tTex2df4"
|
||||||
|
Name 51 "g_tTex2di4"
|
||||||
|
Name 58 "g_tTex2du4"
|
||||||
|
Name 65 "g_tTex3df4"
|
||||||
|
Name 74 "g_tTex3di4"
|
||||||
|
Name 81 "g_tTex3du4"
|
||||||
|
Name 86 "PS_OUTPUT"
|
||||||
|
MemberName 86(PS_OUTPUT) 0 "Color"
|
||||||
|
MemberName 86(PS_OUTPUT) 1 "Depth"
|
||||||
|
Name 88 "psout"
|
||||||
|
Name 96 "Color"
|
||||||
|
Name 100 "Depth"
|
||||||
|
Name 106 "g_sSamp"
|
||||||
|
Name 109 "g_tTex1df4a"
|
||||||
|
Name 112 "g_tTex1di4a"
|
||||||
|
Name 115 "g_tTex1du4a"
|
||||||
|
Name 118 "g_tTex2df4a"
|
||||||
|
Name 121 "g_tTex2di4a"
|
||||||
|
Name 124 "g_tTex2du4a"
|
||||||
|
Decorate 9(g_tTex1df4) DescriptorSet 0
|
||||||
|
Decorate 9(g_tTex1df4) Binding 0
|
||||||
|
MemberDecorate 15($Global) 0 Offset 0
|
||||||
|
MemberDecorate 15($Global) 1 Offset 8
|
||||||
|
MemberDecorate 15($Global) 2 Offset 16
|
||||||
|
MemberDecorate 15($Global) 3 Offset 32
|
||||||
|
MemberDecorate 15($Global) 4 Offset 48
|
||||||
|
MemberDecorate 15($Global) 5 Offset 56
|
||||||
|
MemberDecorate 15($Global) 6 Offset 64
|
||||||
|
MemberDecorate 15($Global) 7 Offset 80
|
||||||
|
Decorate 15($Global) Block
|
||||||
|
Decorate 17 DescriptorSet 0
|
||||||
|
Decorate 26(g_tTex1di4) DescriptorSet 0
|
||||||
|
Decorate 34(g_tTex1du4) DescriptorSet 0
|
||||||
|
Decorate 42(g_tTex2df4) DescriptorSet 0
|
||||||
|
Decorate 51(g_tTex2di4) DescriptorSet 0
|
||||||
|
Decorate 58(g_tTex2du4) DescriptorSet 0
|
||||||
|
Decorate 65(g_tTex3df4) DescriptorSet 0
|
||||||
|
Decorate 74(g_tTex3di4) DescriptorSet 0
|
||||||
|
Decorate 81(g_tTex3du4) DescriptorSet 0
|
||||||
|
Decorate 96(Color) Location 0
|
||||||
|
Decorate 100(Depth) BuiltIn FragDepth
|
||||||
|
Decorate 106(g_sSamp) DescriptorSet 0
|
||||||
|
Decorate 106(g_sSamp) Binding 0
|
||||||
|
Decorate 109(g_tTex1df4a) DescriptorSet 0
|
||||||
|
Decorate 112(g_tTex1di4a) DescriptorSet 0
|
||||||
|
Decorate 115(g_tTex1du4a) DescriptorSet 0
|
||||||
|
Decorate 118(g_tTex2df4a) DescriptorSet 0
|
||||||
|
Decorate 121(g_tTex2di4a) DescriptorSet 0
|
||||||
|
Decorate 124(g_tTex2du4a) DescriptorSet 0
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeImage 6(float) 1D nonsampled format:Rgba32f
|
||||||
|
8: TypePointer UniformConstant 7
|
||||||
|
9(g_tTex1df4): 8(ptr) Variable UniformConstant
|
||||||
|
11: TypeInt 32 1
|
||||||
|
12: TypeVector 11(int) 2
|
||||||
|
13: TypeVector 11(int) 3
|
||||||
|
14: TypeVector 11(int) 4
|
||||||
|
15($Global): TypeStruct 11(int) 12(ivec2) 13(ivec3) 14(ivec4) 11(int) 12(ivec2) 13(ivec3) 14(ivec4)
|
||||||
|
16: TypePointer Uniform 15($Global)
|
||||||
|
17: 16(ptr) Variable Uniform
|
||||||
|
18: 11(int) Constant 0
|
||||||
|
19: TypePointer Uniform 11(int)
|
||||||
|
22: TypeVector 6(float) 4
|
||||||
|
24: TypeImage 11(int) 1D nonsampled format:Rgba32i
|
||||||
|
25: TypePointer UniformConstant 24
|
||||||
|
26(g_tTex1di4): 25(ptr) Variable UniformConstant
|
||||||
|
31: TypeInt 32 0
|
||||||
|
32: TypeImage 31(int) 1D nonsampled format:Rgba32ui
|
||||||
|
33: TypePointer UniformConstant 32
|
||||||
|
34(g_tTex1du4): 33(ptr) Variable UniformConstant
|
||||||
|
38: TypeVector 31(int) 4
|
||||||
|
40: TypeImage 6(float) 2D nonsampled format:Rgba32f
|
||||||
|
41: TypePointer UniformConstant 40
|
||||||
|
42(g_tTex2df4): 41(ptr) Variable UniformConstant
|
||||||
|
44: 11(int) Constant 1
|
||||||
|
45: TypePointer Uniform 12(ivec2)
|
||||||
|
49: TypeImage 11(int) 2D nonsampled format:Rgba32i
|
||||||
|
50: TypePointer UniformConstant 49
|
||||||
|
51(g_tTex2di4): 50(ptr) Variable UniformConstant
|
||||||
|
56: TypeImage 31(int) 2D nonsampled format:Rgba32ui
|
||||||
|
57: TypePointer UniformConstant 56
|
||||||
|
58(g_tTex2du4): 57(ptr) Variable UniformConstant
|
||||||
|
63: TypeImage 6(float) 3D nonsampled format:Rgba32f
|
||||||
|
64: TypePointer UniformConstant 63
|
||||||
|
65(g_tTex3df4): 64(ptr) Variable UniformConstant
|
||||||
|
67: 11(int) Constant 2
|
||||||
|
68: TypePointer Uniform 13(ivec3)
|
||||||
|
72: TypeImage 11(int) 3D nonsampled format:Rgba32i
|
||||||
|
73: TypePointer UniformConstant 72
|
||||||
|
74(g_tTex3di4): 73(ptr) Variable UniformConstant
|
||||||
|
79: TypeImage 31(int) 3D nonsampled format:Rgba32ui
|
||||||
|
80: TypePointer UniformConstant 79
|
||||||
|
81(g_tTex3du4): 80(ptr) Variable UniformConstant
|
||||||
|
86(PS_OUTPUT): TypeStruct 22(fvec4) 6(float)
|
||||||
|
87: TypePointer Function 86(PS_OUTPUT)
|
||||||
|
89: 6(float) Constant 1065353216
|
||||||
|
90: 22(fvec4) ConstantComposite 89 89 89 89
|
||||||
|
91: TypePointer Function 22(fvec4)
|
||||||
|
93: TypePointer Function 6(float)
|
||||||
|
95: TypePointer Output 22(fvec4)
|
||||||
|
96(Color): 95(ptr) Variable Output
|
||||||
|
99: TypePointer Output 6(float)
|
||||||
|
100(Depth): 99(ptr) Variable Output
|
||||||
|
104: TypeSampler
|
||||||
|
105: TypePointer UniformConstant 104
|
||||||
|
106(g_sSamp): 105(ptr) Variable UniformConstant
|
||||||
|
107: TypeImage 6(float) 1D array nonsampled format:Rgba32f
|
||||||
|
108: TypePointer UniformConstant 107
|
||||||
|
109(g_tTex1df4a): 108(ptr) Variable UniformConstant
|
||||||
|
110: TypeImage 11(int) 1D array nonsampled format:Rgba32i
|
||||||
|
111: TypePointer UniformConstant 110
|
||||||
|
112(g_tTex1di4a): 111(ptr) Variable UniformConstant
|
||||||
|
113: TypeImage 31(int) 1D array nonsampled format:Rgba32ui
|
||||||
|
114: TypePointer UniformConstant 113
|
||||||
|
115(g_tTex1du4a): 114(ptr) Variable UniformConstant
|
||||||
|
116: TypeImage 6(float) 2D array nonsampled format:Rgba32f
|
||||||
|
117: TypePointer UniformConstant 116
|
||||||
|
118(g_tTex2df4a): 117(ptr) Variable UniformConstant
|
||||||
|
119: TypeImage 11(int) 2D array nonsampled format:Rgba32i
|
||||||
|
120: TypePointer UniformConstant 119
|
||||||
|
121(g_tTex2di4a): 120(ptr) Variable UniformConstant
|
||||||
|
122: TypeImage 31(int) 2D array nonsampled format:Rgba32ui
|
||||||
|
123: TypePointer UniformConstant 122
|
||||||
|
124(g_tTex2du4a): 123(ptr) Variable UniformConstant
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
88(psout): 87(ptr) Variable Function
|
||||||
|
10: 7 Load 9(g_tTex1df4)
|
||||||
|
20: 19(ptr) AccessChain 17 18
|
||||||
|
21: 11(int) Load 20
|
||||||
|
23: 22(fvec4) ImageRead 10 21
|
||||||
|
27: 24 Load 26(g_tTex1di4)
|
||||||
|
28: 19(ptr) AccessChain 17 18
|
||||||
|
29: 11(int) Load 28
|
||||||
|
30: 14(ivec4) ImageRead 27 29
|
||||||
|
35: 32 Load 34(g_tTex1du4)
|
||||||
|
36: 19(ptr) AccessChain 17 18
|
||||||
|
37: 11(int) Load 36
|
||||||
|
39: 38(ivec4) ImageRead 35 37
|
||||||
|
43: 40 Load 42(g_tTex2df4)
|
||||||
|
46: 45(ptr) AccessChain 17 44
|
||||||
|
47: 12(ivec2) Load 46
|
||||||
|
48: 22(fvec4) ImageRead 43 47
|
||||||
|
52: 49 Load 51(g_tTex2di4)
|
||||||
|
53: 45(ptr) AccessChain 17 44
|
||||||
|
54: 12(ivec2) Load 53
|
||||||
|
55: 14(ivec4) ImageRead 52 54
|
||||||
|
59: 56 Load 58(g_tTex2du4)
|
||||||
|
60: 45(ptr) AccessChain 17 44
|
||||||
|
61: 12(ivec2) Load 60
|
||||||
|
62: 38(ivec4) ImageRead 59 61
|
||||||
|
66: 63 Load 65(g_tTex3df4)
|
||||||
|
69: 68(ptr) AccessChain 17 67
|
||||||
|
70: 13(ivec3) Load 69
|
||||||
|
71: 22(fvec4) ImageRead 66 70
|
||||||
|
75: 72 Load 74(g_tTex3di4)
|
||||||
|
76: 68(ptr) AccessChain 17 67
|
||||||
|
77: 13(ivec3) Load 76
|
||||||
|
78: 14(ivec4) ImageRead 75 77
|
||||||
|
82: 79 Load 81(g_tTex3du4)
|
||||||
|
83: 68(ptr) AccessChain 17 67
|
||||||
|
84: 13(ivec3) Load 83
|
||||||
|
85: 38(ivec4) ImageRead 82 84
|
||||||
|
92: 91(ptr) AccessChain 88(psout) 18
|
||||||
|
Store 92 90
|
||||||
|
94: 93(ptr) AccessChain 88(psout) 44
|
||||||
|
Store 94 89
|
||||||
|
97: 91(ptr) AccessChain 88(psout) 18
|
||||||
|
98: 22(fvec4) Load 97
|
||||||
|
Store 96(Color) 98
|
||||||
|
101: 93(ptr) AccessChain 88(psout) 44
|
||||||
|
102: 6(float) Load 101
|
||||||
|
Store 100(Depth) 102
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
96
Test/hlsl.getdimensions.rw.dx10.frag
Normal file
96
Test/hlsl.getdimensions.rw.dx10.frag
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
SamplerState g_sSamp : register(s0);
|
||||||
|
|
||||||
|
RWTexture1D <float4> g_tTex1df4 : register(t0);
|
||||||
|
RWTexture1D <int4> g_tTex1di4;
|
||||||
|
RWTexture1D <uint4> g_tTex1du4;
|
||||||
|
|
||||||
|
RWTexture2D <float4> g_tTex2df4;
|
||||||
|
RWTexture2D <int4> g_tTex2di4;
|
||||||
|
RWTexture2D <uint4> g_tTex2du4;
|
||||||
|
|
||||||
|
RWTexture3D <float4> g_tTex3df4;
|
||||||
|
RWTexture3D <int4> g_tTex3di4;
|
||||||
|
RWTexture3D <uint4> g_tTex3du4;
|
||||||
|
|
||||||
|
RWTexture1DArray <float4> g_tTex1df4a;
|
||||||
|
RWTexture1DArray <int4> g_tTex1di4a;
|
||||||
|
RWTexture1DArray <uint4> g_tTex1du4a;
|
||||||
|
|
||||||
|
RWTexture2DArray <float4> g_tTex2df4a;
|
||||||
|
RWTexture2DArray <int4> g_tTex2di4a;
|
||||||
|
RWTexture2DArray <uint4> g_tTex2du4a;
|
||||||
|
|
||||||
|
RWBuffer <float4> g_tBuffF;
|
||||||
|
RWBuffer <int4> g_tBuffI;
|
||||||
|
RWBuffer <uint4> g_tBuffU;
|
||||||
|
|
||||||
|
struct PS_OUTPUT
|
||||||
|
{
|
||||||
|
float4 Color : SV_Target0;
|
||||||
|
float Depth : SV_Depth;
|
||||||
|
};
|
||||||
|
|
||||||
|
uniform int c1;
|
||||||
|
uniform int2 c2;
|
||||||
|
uniform int3 c3;
|
||||||
|
uniform int4 c4;
|
||||||
|
|
||||||
|
uniform int o1;
|
||||||
|
uniform int2 o2;
|
||||||
|
uniform int3 o3;
|
||||||
|
uniform int4 o4;
|
||||||
|
|
||||||
|
PS_OUTPUT main()
|
||||||
|
{
|
||||||
|
PS_OUTPUT psout;
|
||||||
|
|
||||||
|
uint MipLevel;
|
||||||
|
uint WidthU;
|
||||||
|
uint HeightU;
|
||||||
|
uint ElementsU;
|
||||||
|
uint DepthU;
|
||||||
|
uint NumberOfLevelsU;
|
||||||
|
uint NumberOfSamplesU;
|
||||||
|
|
||||||
|
float WidthF;
|
||||||
|
float HeightF;
|
||||||
|
float ElementsF;
|
||||||
|
float DepthF;
|
||||||
|
float NumberOfLevelsF;
|
||||||
|
float NumberOfSamplesF;
|
||||||
|
|
||||||
|
// 1D, float/int/uint, uint params
|
||||||
|
g_tTex1df4.GetDimensions(WidthU);
|
||||||
|
g_tTex1di4.GetDimensions(WidthU);
|
||||||
|
g_tTex1du4.GetDimensions(WidthU);
|
||||||
|
|
||||||
|
// buffer, float/int/uint, uint params
|
||||||
|
g_tBuffF.GetDimensions(WidthU);
|
||||||
|
g_tBuffI.GetDimensions(WidthU);
|
||||||
|
g_tBuffU.GetDimensions(WidthU);
|
||||||
|
|
||||||
|
// 1DArray, float/int/uint, uint params
|
||||||
|
g_tTex1df4a.GetDimensions(WidthU, ElementsU);
|
||||||
|
g_tTex1di4a.GetDimensions(WidthU, ElementsU);
|
||||||
|
g_tTex1du4a.GetDimensions(WidthU, ElementsU);
|
||||||
|
|
||||||
|
// 2D, float/int/uint, uint params
|
||||||
|
g_tTex2df4.GetDimensions(WidthU, HeightU);
|
||||||
|
g_tTex2di4.GetDimensions(WidthU, HeightU);
|
||||||
|
g_tTex2du4.GetDimensions(WidthU, HeightU);
|
||||||
|
|
||||||
|
// 2DArray, float/int/uint, uint params
|
||||||
|
g_tTex2df4a.GetDimensions(WidthU, HeightU, ElementsU);
|
||||||
|
g_tTex2di4a.GetDimensions(WidthU, HeightU, ElementsU);
|
||||||
|
g_tTex2du4a.GetDimensions(WidthU, HeightU, ElementsU);
|
||||||
|
|
||||||
|
// 3D, float/int/uint, uint params
|
||||||
|
g_tTex3df4.GetDimensions(WidthU, HeightU, DepthU);
|
||||||
|
g_tTex3di4.GetDimensions(WidthU, HeightU, DepthU);
|
||||||
|
g_tTex3du4.GetDimensions(WidthU, HeightU, DepthU);
|
||||||
|
|
||||||
|
psout.Color = 1.0;
|
||||||
|
psout.Depth = 1.0;
|
||||||
|
|
||||||
|
return psout;
|
||||||
|
}
|
32
Test/hlsl.load.rwbuffer.dx10.frag
Normal file
32
Test/hlsl.load.rwbuffer.dx10.frag
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
RWBuffer <float4> g_tBuffF;
|
||||||
|
RWBuffer <int4> g_tBuffI;
|
||||||
|
RWBuffer <uint4> g_tBuffU;
|
||||||
|
|
||||||
|
struct PS_OUTPUT
|
||||||
|
{
|
||||||
|
float4 Color : SV_Target0;
|
||||||
|
};
|
||||||
|
|
||||||
|
uniform int c1;
|
||||||
|
uniform int2 c2;
|
||||||
|
uniform int3 c3;
|
||||||
|
uniform int4 c4;
|
||||||
|
|
||||||
|
uniform int o1;
|
||||||
|
uniform int2 o2;
|
||||||
|
uniform int3 o3;
|
||||||
|
uniform int4 o4;
|
||||||
|
|
||||||
|
PS_OUTPUT main()
|
||||||
|
{
|
||||||
|
PS_OUTPUT psout;
|
||||||
|
|
||||||
|
g_tBuffF.Load(c1);
|
||||||
|
g_tBuffU.Load(c1);
|
||||||
|
g_tBuffI.Load(c1);
|
||||||
|
|
||||||
|
psout.Color = 1.0;
|
||||||
|
|
||||||
|
return psout;
|
||||||
|
}
|
57
Test/hlsl.load.rwtexture.array.dx10.frag
Normal file
57
Test/hlsl.load.rwtexture.array.dx10.frag
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
SamplerState g_sSamp : register(s0);
|
||||||
|
|
||||||
|
RWTexture1D <float4> g_tTex1df4 : register(t0);
|
||||||
|
RWTexture1D <int4> g_tTex1di4;
|
||||||
|
RWTexture1D <uint4> g_tTex1du4;
|
||||||
|
|
||||||
|
RWTexture2D <float4> g_tTex2df4;
|
||||||
|
RWTexture2D <int4> g_tTex2di4;
|
||||||
|
RWTexture2D <uint4> g_tTex2du4;
|
||||||
|
|
||||||
|
RWTexture3D <float4> g_tTex3df4;
|
||||||
|
RWTexture3D <int4> g_tTex3di4;
|
||||||
|
RWTexture3D <uint4> g_tTex3du4;
|
||||||
|
|
||||||
|
RWTexture1DArray <float4> g_tTex1df4a;
|
||||||
|
RWTexture1DArray <int4> g_tTex1di4a;
|
||||||
|
RWTexture1DArray <uint4> g_tTex1du4a;
|
||||||
|
|
||||||
|
RWTexture2DArray <float4> g_tTex2df4a;
|
||||||
|
RWTexture2DArray <int4> g_tTex2di4a;
|
||||||
|
RWTexture2DArray <uint4> g_tTex2du4a;
|
||||||
|
|
||||||
|
struct PS_OUTPUT
|
||||||
|
{
|
||||||
|
float4 Color : SV_Target0;
|
||||||
|
float Depth : SV_Depth;
|
||||||
|
};
|
||||||
|
|
||||||
|
uniform int c1;
|
||||||
|
uniform int2 c2;
|
||||||
|
uniform int3 c3;
|
||||||
|
uniform int4 c4;
|
||||||
|
|
||||||
|
uniform int o1;
|
||||||
|
uniform int2 o2;
|
||||||
|
uniform int3 o3;
|
||||||
|
uniform int4 o4;
|
||||||
|
|
||||||
|
PS_OUTPUT main()
|
||||||
|
{
|
||||||
|
PS_OUTPUT psout;
|
||||||
|
|
||||||
|
// 1D
|
||||||
|
g_tTex1df4a.Load(c2);
|
||||||
|
g_tTex1di4a.Load(c2);
|
||||||
|
g_tTex1du4a.Load(c2);
|
||||||
|
|
||||||
|
// 2D
|
||||||
|
g_tTex2df4a.Load(c3);
|
||||||
|
g_tTex2di4a.Load(c3);
|
||||||
|
g_tTex2du4a.Load(c3);
|
||||||
|
|
||||||
|
psout.Color = 1.0;
|
||||||
|
psout.Depth = 1.0;
|
||||||
|
|
||||||
|
return psout;
|
||||||
|
}
|
62
Test/hlsl.load.rwtexture.dx10.frag
Normal file
62
Test/hlsl.load.rwtexture.dx10.frag
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
SamplerState g_sSamp : register(s0);
|
||||||
|
|
||||||
|
RWTexture1D <float4> g_tTex1df4 : register(t0);
|
||||||
|
RWTexture1D <int4> g_tTex1di4;
|
||||||
|
RWTexture1D <uint4> g_tTex1du4;
|
||||||
|
|
||||||
|
RWTexture2D <float4> g_tTex2df4;
|
||||||
|
RWTexture2D <int4> g_tTex2di4;
|
||||||
|
RWTexture2D <uint4> g_tTex2du4;
|
||||||
|
|
||||||
|
RWTexture3D <float4> g_tTex3df4;
|
||||||
|
RWTexture3D <int4> g_tTex3di4;
|
||||||
|
RWTexture3D <uint4> g_tTex3du4;
|
||||||
|
|
||||||
|
RWTexture1DArray <float4> g_tTex1df4a;
|
||||||
|
RWTexture1DArray <int4> g_tTex1di4a;
|
||||||
|
RWTexture1DArray <uint4> g_tTex1du4a;
|
||||||
|
|
||||||
|
RWTexture2DArray <float4> g_tTex2df4a;
|
||||||
|
RWTexture2DArray <int4> g_tTex2di4a;
|
||||||
|
RWTexture2DArray <uint4> g_tTex2du4a;
|
||||||
|
|
||||||
|
struct PS_OUTPUT
|
||||||
|
{
|
||||||
|
float4 Color : SV_Target0;
|
||||||
|
float Depth : SV_Depth;
|
||||||
|
};
|
||||||
|
|
||||||
|
uniform int c1;
|
||||||
|
uniform int2 c2;
|
||||||
|
uniform int3 c3;
|
||||||
|
uniform int4 c4;
|
||||||
|
|
||||||
|
uniform int o1;
|
||||||
|
uniform int2 o2;
|
||||||
|
uniform int3 o3;
|
||||||
|
uniform int4 o4;
|
||||||
|
|
||||||
|
PS_OUTPUT main()
|
||||||
|
{
|
||||||
|
PS_OUTPUT psout;
|
||||||
|
|
||||||
|
// 1D
|
||||||
|
g_tTex1df4.Load(c1);
|
||||||
|
g_tTex1di4.Load(c1);
|
||||||
|
g_tTex1du4.Load(c1);
|
||||||
|
|
||||||
|
// 2D
|
||||||
|
g_tTex2df4.Load(c2);
|
||||||
|
g_tTex2di4.Load(c2);
|
||||||
|
g_tTex2du4.Load(c2);
|
||||||
|
|
||||||
|
// 3D
|
||||||
|
g_tTex3df4.Load(c3);
|
||||||
|
g_tTex3di4.Load(c3);
|
||||||
|
g_tTex3du4.Load(c3);
|
||||||
|
|
||||||
|
psout.Color = 1.0;
|
||||||
|
psout.Depth = 1.0;
|
||||||
|
|
||||||
|
return psout;
|
||||||
|
}
|
@ -111,6 +111,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.gatherRGBA.offset.dx10.frag", "main"},
|
{"hlsl.gatherRGBA.offset.dx10.frag", "main"},
|
||||||
{"hlsl.gatherRGBA.offsetarray.dx10.frag", "main"},
|
{"hlsl.gatherRGBA.offsetarray.dx10.frag", "main"},
|
||||||
{"hlsl.getdimensions.dx10.frag", "main"},
|
{"hlsl.getdimensions.dx10.frag", "main"},
|
||||||
|
{"hlsl.getdimensions.rw.dx10.frag", "main"},
|
||||||
{"hlsl.getdimensions.dx10.vert", "main"},
|
{"hlsl.getdimensions.dx10.vert", "main"},
|
||||||
{"hlsl.getsampleposition.dx10.frag", "main"},
|
{"hlsl.getsampleposition.dx10.frag", "main"},
|
||||||
{"hlsl.if.frag", "PixelShaderFunction"},
|
{"hlsl.if.frag", "PixelShaderFunction"},
|
||||||
@ -133,6 +134,9 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.load.basic.dx10.frag", "main"},
|
{"hlsl.load.basic.dx10.frag", "main"},
|
||||||
{"hlsl.load.basic.dx10.vert", "main"},
|
{"hlsl.load.basic.dx10.vert", "main"},
|
||||||
{"hlsl.load.buffer.dx10.frag", "main"},
|
{"hlsl.load.buffer.dx10.frag", "main"},
|
||||||
|
{"hlsl.load.rwbuffer.dx10.frag", "main"},
|
||||||
|
{"hlsl.load.rwtexture.dx10.frag", "main"},
|
||||||
|
{"hlsl.load.rwtexture.array.dx10.frag", "main"},
|
||||||
{"hlsl.load.offset.dx10.frag", "main"},
|
{"hlsl.load.offset.dx10.frag", "main"},
|
||||||
{"hlsl.load.offsetarray.dx10.frag", "main"},
|
{"hlsl.load.offsetarray.dx10.frag", "main"},
|
||||||
{"hlsl.multiEntry.vert", "RealEntrypoint"},
|
{"hlsl.multiEntry.vert", "RealEntrypoint"},
|
||||||
|
@ -460,8 +460,14 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type)
|
|||||||
// further, it can create an anonymous instance of the block
|
// further, it can create an anonymous instance of the block
|
||||||
if (peekTokenClass(EHTokSemicolon))
|
if (peekTokenClass(EHTokSemicolon))
|
||||||
parseContext.declareBlock(loc, type);
|
parseContext.declareBlock(loc, type);
|
||||||
} else
|
} else {
|
||||||
|
// Some qualifiers are set when parsing the type. Merge those with
|
||||||
|
// whatever comes from acceptQualifier.
|
||||||
|
assert(qualifier.layoutFormat == ElfNone);
|
||||||
|
qualifier.layoutFormat = type.getQualifier().layoutFormat;
|
||||||
|
|
||||||
type.getQualifier() = qualifier;
|
type.getQualifier() = qualifier;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -827,6 +833,13 @@ bool HlslGrammar::acceptSamplerType(TType& type)
|
|||||||
// | TEXTURECUBEARRAY
|
// | TEXTURECUBEARRAY
|
||||||
// | TEXTURE2DMS
|
// | TEXTURE2DMS
|
||||||
// | TEXTURE2DMSARRAY
|
// | TEXTURE2DMSARRAY
|
||||||
|
// | RWBUFFER
|
||||||
|
// | RWTEXTURE1D
|
||||||
|
// | RWTEXTURE1DARRAY
|
||||||
|
// | RWTEXTURE2D
|
||||||
|
// | RWTEXTURE2DARRAY
|
||||||
|
// | RWTEXTURE3D
|
||||||
|
|
||||||
bool HlslGrammar::acceptTextureType(TType& type)
|
bool HlslGrammar::acceptTextureType(TType& type)
|
||||||
{
|
{
|
||||||
const EHlslTokenClass textureType = peek();
|
const EHlslTokenClass textureType = peek();
|
||||||
@ -834,6 +847,7 @@ bool HlslGrammar::acceptTextureType(TType& type)
|
|||||||
TSamplerDim dim = EsdNone;
|
TSamplerDim dim = EsdNone;
|
||||||
bool array = false;
|
bool array = false;
|
||||||
bool ms = false;
|
bool ms = false;
|
||||||
|
bool image = false;
|
||||||
|
|
||||||
switch (textureType) {
|
switch (textureType) {
|
||||||
case EHTokBuffer: dim = EsdBuffer; break;
|
case EHTokBuffer: dim = EsdBuffer; break;
|
||||||
@ -846,6 +860,12 @@ bool HlslGrammar::acceptTextureType(TType& type)
|
|||||||
case EHTokTextureCubearray: dim = EsdCube; array = true; break;
|
case EHTokTextureCubearray: dim = EsdCube; array = true; break;
|
||||||
case EHTokTexture2DMS: dim = Esd2D; ms = true; break;
|
case EHTokTexture2DMS: dim = Esd2D; ms = true; break;
|
||||||
case EHTokTexture2DMSarray: dim = Esd2D; array = true; ms = true; break;
|
case EHTokTexture2DMSarray: dim = Esd2D; array = true; ms = true; break;
|
||||||
|
case EHTokRWBuffer: dim = EsdBuffer; image=true; break;
|
||||||
|
case EHTokRWTexture1d: dim = Esd1D; array=false; image=true; break;
|
||||||
|
case EHTokRWTexture1darray: dim = Esd1D; array=true; image=true; break;
|
||||||
|
case EHTokRWTexture2d: dim = Esd2D; array=false; image=true; break;
|
||||||
|
case EHTokRWTexture2darray: dim = Esd2D; array=true; image=true; break;
|
||||||
|
case EHTokRWTexture3d: dim = Esd3D; array=false; image=true; break;
|
||||||
default:
|
default:
|
||||||
return false; // not a texture declaration
|
return false; // not a texture declaration
|
||||||
}
|
}
|
||||||
@ -856,7 +876,7 @@ bool HlslGrammar::acceptTextureType(TType& type)
|
|||||||
|
|
||||||
TIntermTyped* msCount = nullptr;
|
TIntermTyped* msCount = nullptr;
|
||||||
|
|
||||||
// texture type: required for multisample types!
|
// texture type: required for multisample types and RWBuffer/RWTextures!
|
||||||
if (acceptTokenClass(EHTokLeftAngle)) {
|
if (acceptTokenClass(EHTokLeftAngle)) {
|
||||||
if (! acceptType(txType)) {
|
if (! acceptType(txType)) {
|
||||||
expected("scalar or vector type");
|
expected("scalar or vector type");
|
||||||
@ -911,22 +931,45 @@ bool HlslGrammar::acceptTextureType(TType& type)
|
|||||||
} else if (ms) {
|
} else if (ms) {
|
||||||
expected("texture type for multisample");
|
expected("texture type for multisample");
|
||||||
return false;
|
return false;
|
||||||
|
} else if (image) {
|
||||||
|
expected("type for RWTexture/RWBuffer");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
TArraySizes* arraySizes = nullptr;
|
TArraySizes* arraySizes = nullptr;
|
||||||
const bool shadow = txType.isScalar() || (txType.isVector() && txType.getVectorSize() == 1);
|
const bool shadow = !image && (txType.isScalar() || (txType.isVector() && txType.getVectorSize() == 1));
|
||||||
|
|
||||||
TSampler sampler;
|
TSampler sampler;
|
||||||
|
TLayoutFormat format = ElfNone;
|
||||||
|
|
||||||
// Buffers are combined.
|
// RWBuffer and RWTexture (images) require a TLayoutFormat. We handle only a limit set.
|
||||||
if (dim == EsdBuffer) {
|
if (image) {
|
||||||
|
if (txType.getVectorSize() != 4)
|
||||||
|
expected("4 component image");
|
||||||
|
|
||||||
|
switch (txType.getBasicType()) {
|
||||||
|
case EbtFloat: format = ElfRgba32f; break;
|
||||||
|
case EbtInt: format = ElfRgba32i; break;
|
||||||
|
case EbtUint: format = ElfRgba32ui; break;
|
||||||
|
default:
|
||||||
|
expected("unknown basic type in image format");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Non-image Buffers are combined
|
||||||
|
if (dim == EsdBuffer && !image) {
|
||||||
sampler.set(txType.getBasicType(), dim, array);
|
sampler.set(txType.getBasicType(), dim, array);
|
||||||
} else {
|
} else {
|
||||||
// DX10 textures are separated. TODO: DX9.
|
// DX10 textures are separated. TODO: DX9.
|
||||||
sampler.setTexture(txType.getBasicType(), dim, array, shadow, ms);
|
if (image) {
|
||||||
|
sampler.setImage(txType.getBasicType(), dim, array, shadow, ms);
|
||||||
|
} else {
|
||||||
|
sampler.setTexture(txType.getBasicType(), dim, array, shadow, ms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type.shallowCopy(TType(sampler, EvqUniform, arraySizes));
|
type.shallowCopy(TType(sampler, EvqUniform, arraySizes));
|
||||||
|
type.getQualifier().layoutFormat = format;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -966,6 +1009,12 @@ bool HlslGrammar::acceptType(TType& type)
|
|||||||
case EHTokTextureCubearray: // ...
|
case EHTokTextureCubearray: // ...
|
||||||
case EHTokTexture2DMS: // ...
|
case EHTokTexture2DMS: // ...
|
||||||
case EHTokTexture2DMSarray: // ...
|
case EHTokTexture2DMSarray: // ...
|
||||||
|
case EHTokRWTexture1d: // ...
|
||||||
|
case EHTokRWTexture1darray: // ...
|
||||||
|
case EHTokRWTexture2d: // ...
|
||||||
|
case EHTokRWTexture2darray: // ...
|
||||||
|
case EHTokRWTexture3d: // ...
|
||||||
|
case EHTokRWBuffer: // ...
|
||||||
return acceptTextureType(type);
|
return acceptTextureType(type);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1252,15 +1252,17 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
|
|||||||
|
|
||||||
const TSampler& texSampler = texType.getSampler();
|
const TSampler& texSampler = texType.getSampler();
|
||||||
const TSamplerDim dim = texSampler.dim;
|
const TSamplerDim dim = texSampler.dim;
|
||||||
|
const bool isImage = texSampler.isImage();
|
||||||
const int numArgs = (int)argAggregate->getSequence().size();
|
const int numArgs = (int)argAggregate->getSequence().size();
|
||||||
|
|
||||||
int numDims = 0;
|
int numDims = 0;
|
||||||
|
|
||||||
switch (dim) {
|
switch (dim) {
|
||||||
case Esd1D: numDims = 1; break; // W
|
case Esd1D: numDims = 1; break; // W
|
||||||
case Esd2D: numDims = 2; break; // W, H
|
case Esd2D: numDims = 2; break; // W, H
|
||||||
case Esd3D: numDims = 3; break; // W, H, D
|
case Esd3D: numDims = 3; break; // W, H, D
|
||||||
case EsdCube: numDims = 2; break; // W, H (cube)
|
case EsdCube: numDims = 2; break; // W, H (cube)
|
||||||
|
case EsdBuffer: numDims = 1; break; // buffers
|
||||||
default:
|
default:
|
||||||
assert(0 && "unhandled texture dimension");
|
assert(0 && "unhandled texture dimension");
|
||||||
}
|
}
|
||||||
@ -1273,7 +1275,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
|
|||||||
const bool mipQuery = (numArgs > (numDims + 1)) && (!texSampler.isMultiSample());
|
const bool mipQuery = (numArgs > (numDims + 1)) && (!texSampler.isMultiSample());
|
||||||
|
|
||||||
// AST assumes integer return. Will be converted to float if required.
|
// AST assumes integer return. Will be converted to float if required.
|
||||||
TIntermAggregate* sizeQuery = new TIntermAggregate(EOpTextureQuerySize);
|
TIntermAggregate* sizeQuery = new TIntermAggregate(isImage ? EOpImageQuerySize : EOpTextureQuerySize);
|
||||||
sizeQuery->getSequence().push_back(argTex);
|
sizeQuery->getSequence().push_back(argTex);
|
||||||
// If we're querying an explicit LOD, add the LOD, which is always arg #1
|
// If we're querying an explicit LOD, add the LOD, which is always arg #1
|
||||||
if (mipQuery) {
|
if (mipQuery) {
|
||||||
@ -1419,11 +1421,12 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
|
|||||||
|
|
||||||
const bool isMS = argTex->getType().getSampler().isMultiSample();
|
const bool isMS = argTex->getType().getSampler().isMultiSample();
|
||||||
const bool isBuffer = argTex->getType().getSampler().dim == EsdBuffer;
|
const bool isBuffer = argTex->getType().getSampler().dim == EsdBuffer;
|
||||||
|
const bool isImage = argTex->getType().getSampler().isImage();
|
||||||
const TBasicType coordBaseType = argCoord->getType().getBasicType();
|
const TBasicType coordBaseType = argCoord->getType().getBasicType();
|
||||||
|
|
||||||
// Last component of coordinate is the mip level, for non-MS. we separate them here:
|
// Last component of coordinate is the mip level, for non-MS. we separate them here:
|
||||||
if (isMS || isBuffer) {
|
if (isMS || isBuffer || isImage) {
|
||||||
// MS and Buffer have no LOD
|
// MS, Buffer, and Image have no LOD
|
||||||
coordSwizzle = argCoord;
|
coordSwizzle = argCoord;
|
||||||
} else {
|
} else {
|
||||||
// Extract coordinate
|
// Extract coordinate
|
||||||
@ -1443,7 +1446,9 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
|
|||||||
const bool hasOffset = ((!isMS && numArgs == 3) || (isMS && numArgs == 4));
|
const bool hasOffset = ((!isMS && numArgs == 3) || (isMS && numArgs == 4));
|
||||||
|
|
||||||
// Create texel fetch
|
// Create texel fetch
|
||||||
const TOperator fetchOp = (hasOffset ? EOpTextureFetchOffset : EOpTextureFetch);
|
const TOperator fetchOp = (isImage ? EOpImageLoad :
|
||||||
|
hasOffset ? EOpTextureFetchOffset :
|
||||||
|
EOpTextureFetch);
|
||||||
TIntermAggregate* txfetch = new TIntermAggregate(fetchOp);
|
TIntermAggregate* txfetch = new TIntermAggregate(fetchOp);
|
||||||
|
|
||||||
// Build up the fetch
|
// Build up the fetch
|
||||||
@ -1456,6 +1461,8 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
|
|||||||
txfetch->getSequence().push_back(argSampleIdx);
|
txfetch->getSequence().push_back(argSampleIdx);
|
||||||
} else if (isBuffer) {
|
} else if (isBuffer) {
|
||||||
// Nothing else to do for buffers.
|
// Nothing else to do for buffers.
|
||||||
|
} else if (isImage) {
|
||||||
|
// Nothing else to do for images.
|
||||||
} else {
|
} else {
|
||||||
// 2DMS and buffer have no LOD, but everything else does.
|
// 2DMS and buffer have no LOD, but everything else does.
|
||||||
txfetch->getSequence().push_back(lodComponent);
|
txfetch->getSequence().push_back(lodComponent);
|
||||||
|
@ -67,20 +67,21 @@ const char* BaseTypeName(const char argOrder, const char* scalarName, const char
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsSamplerType(const char argType) { return argType == 'S' || argType == 's'; }
|
bool IsSamplerType(const char argType) { return argType == 'S' || argType == 's'; }
|
||||||
bool IsTextureArrayed(const char argOrder) { return argOrder == '@' || argOrder == '&'; }
|
bool IsArrayed(const char argOrder) { return argOrder == '@' || argOrder == '&' || argOrder == '#'; }
|
||||||
bool IsTextureMS(const char argOrder) { return argOrder == '$' || argOrder == '&'; }
|
bool IsTextureMS(const char argOrder) { return argOrder == '$' || argOrder == '&'; }
|
||||||
bool IsBuffer(const char argOrder) { return argOrder == '*'; }
|
bool IsBuffer(const char argOrder) { return argOrder == '*' || argOrder == '~'; }
|
||||||
|
bool IsImage(const char argOrder) { return argOrder == '!' || argOrder == '#' || argOrder == '~'; }
|
||||||
bool IsTextureType(const char argOrder)
|
bool IsTextureType(const char argOrder)
|
||||||
{
|
{
|
||||||
return argOrder == '%' || argOrder == '@' || IsTextureMS(argOrder) || IsBuffer(argOrder);
|
return argOrder == '%' || argOrder == '@' || IsTextureMS(argOrder) || IsBuffer(argOrder) | IsImage(argOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reject certain combinations that are illegal sample methods. For example,
|
// Reject certain combinations that are illegal sample methods. For example,
|
||||||
// 3D arrays.
|
// 3D arrays.
|
||||||
bool IsIllegalSample(const glslang::TString& name, const char* argOrder, int dim0)
|
bool IsIllegalSample(const glslang::TString& name, const char* argOrder, int dim0)
|
||||||
{
|
{
|
||||||
const bool isArrayed = IsTextureArrayed(*argOrder);
|
const bool isArrayed = IsArrayed(*argOrder);
|
||||||
const bool isMS = IsTextureMS(*argOrder);
|
const bool isMS = IsTextureMS(*argOrder);
|
||||||
const bool isBuffer = IsBuffer(*argOrder);
|
const bool isBuffer = IsBuffer(*argOrder);
|
||||||
|
|
||||||
@ -153,9 +154,9 @@ int CoordinateArgPos(const glslang::TString& name, bool isTexture)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Some texture methods use an addition coordinate dimension for the mip
|
// Some texture methods use an addition coordinate dimension for the mip
|
||||||
bool HasMipInCoord(const glslang::TString& name, bool isMS, bool isBuffer)
|
bool HasMipInCoord(const glslang::TString& name, bool isMS, bool isBuffer, bool isImage)
|
||||||
{
|
{
|
||||||
return name == "Load" && !isMS && !isBuffer;
|
return name == "Load" && !isMS && !isBuffer && !isImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
// LOD calculations don't pass the array level in the coordinate.
|
// LOD calculations don't pass the array level in the coordinate.
|
||||||
@ -219,10 +220,11 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons
|
|||||||
{
|
{
|
||||||
const bool isTranspose = (argOrder[0] == '^');
|
const bool isTranspose = (argOrder[0] == '^');
|
||||||
const bool isTexture = IsTextureType(argOrder[0]);
|
const bool isTexture = IsTextureType(argOrder[0]);
|
||||||
const bool isArrayed = IsTextureArrayed(argOrder[0]);
|
const bool isArrayed = IsArrayed(argOrder[0]);
|
||||||
const bool isSampler = IsSamplerType(argType[0]);
|
const bool isSampler = IsSamplerType(argType[0]);
|
||||||
const bool isMS = IsTextureMS(argOrder[0]);
|
const bool isMS = IsTextureMS(argOrder[0]);
|
||||||
const bool isBuffer = IsBuffer(argOrder[0]);
|
const bool isBuffer = IsBuffer(argOrder[0]);
|
||||||
|
const bool isImage = IsImage(argOrder[0]);
|
||||||
|
|
||||||
char type = *argType;
|
char type = *argType;
|
||||||
|
|
||||||
@ -253,9 +255,15 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons
|
|||||||
case 'B': s += "bool"; break;
|
case 'B': s += "bool"; break;
|
||||||
case 'S': s += "sampler"; break;
|
case 'S': s += "sampler"; break;
|
||||||
case 's': s += "SamplerComparisonState"; break;
|
case 's': s += "SamplerComparisonState"; break;
|
||||||
case 'T': s += (isBuffer ? "Buffer" : "Texture"); break;
|
case 'T': s += ((isBuffer && isImage) ? "RWBuffer" :
|
||||||
case 'i': s += (isBuffer ? "Buffer <int4>" : "Texture <int4>"); break;
|
isBuffer ? "Buffer" :
|
||||||
case 'u': s += (isBuffer ? "Buffer <uint4>" : "Texture <uint4>"); break;
|
isImage ? "RWTexture" : "Texture"); break;
|
||||||
|
case 'i': s += ((isBuffer && isImage) ? "RWBuffer <int4>" :
|
||||||
|
isBuffer ? "Buffer <int4>" :
|
||||||
|
isImage ? "RWTexture <int4>" : "Texture <int4>"); break;
|
||||||
|
case 'u': s += ((isBuffer && isImage) ? "RWBuffer <uint4>" :
|
||||||
|
isBuffer ? "Buffer <uint4>" :
|
||||||
|
isImage ? "RWTexture <uint4>" : "Texture <uint4>");break;
|
||||||
default: s += "UNKNOWN_TYPE"; break;
|
default: s += "UNKNOWN_TYPE"; break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -274,7 +282,10 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons
|
|||||||
if (type != 'T') // create itexture, utexture, etc
|
if (type != 'T') // create itexture, utexture, etc
|
||||||
s += type;
|
s += type;
|
||||||
|
|
||||||
s += (isBuffer ? "samplerBuffer" : "texture");
|
s += ((isImage && isBuffer) ? "imageBuffer" :
|
||||||
|
isImage ? "image" :
|
||||||
|
isBuffer ? "samplerBuffer" :
|
||||||
|
"texture");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: s += "UNKNOWN_TYPE"; break;
|
default: s += "UNKNOWN_TYPE"; break;
|
||||||
@ -507,6 +518,9 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c
|
|||||||
// '@' as first letter of order creates arrayed texture of given type
|
// '@' as first letter of order creates arrayed texture of given type
|
||||||
// '$' / '&' as first letter of order creates 2DMS / 2DMSArray textures
|
// '$' / '&' as first letter of order creates 2DMS / 2DMSArray textures
|
||||||
// '*' as first letter of order creates buffer object
|
// '*' as first letter of order creates buffer object
|
||||||
|
// '!' as first letter of order creates image object
|
||||||
|
// '#' as first letter of order creates arrayed image object
|
||||||
|
// '~' as first letter of order creates an image buffer object
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
const char* name; // intrinsic name
|
const char* name; // intrinsic name
|
||||||
@ -699,6 +713,11 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c
|
|||||||
{ "Load", /* +sampleidex*/ "V4", nullptr, "$&,V,S", "FIU,I,I", EShLangAll },
|
{ "Load", /* +sampleidex*/ "V4", nullptr, "$&,V,S", "FIU,I,I", EShLangAll },
|
||||||
{ "Load", /* +samplindex, offset*/ "V4", nullptr, "$&,V,S,V", "FIU,I,I,I", EShLangAll },
|
{ "Load", /* +samplindex, offset*/ "V4", nullptr, "$&,V,S,V", "FIU,I,I,I", EShLangAll },
|
||||||
|
|
||||||
|
// RWTexture loads
|
||||||
|
{ "Load", "V4", nullptr, "!#,V", "FIU,I", EShLangAll },
|
||||||
|
// RWBuffer loads
|
||||||
|
{ "Load", "V4", nullptr, "~1,V", "FIU,I", EShLangAll },
|
||||||
|
|
||||||
{ "Gather", /*!O*/ "V4", nullptr, "%@,S,V", "FIU,S,F", EShLangAll },
|
{ "Gather", /*!O*/ "V4", nullptr, "%@,S,V", "FIU,S,F", EShLangAll },
|
||||||
{ "Gather", /* O*/ "V4", nullptr, "%@,S,V,V", "FIU,S,F,I", EShLangAll },
|
{ "Gather", /* O*/ "V4", nullptr, "%@,S,V,V", "FIU,S,F,I", EShLangAll },
|
||||||
|
|
||||||
@ -710,36 +729,36 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c
|
|||||||
//
|
//
|
||||||
// UINT Width
|
// UINT Width
|
||||||
// UINT MipLevel, UINT Width, UINT NumberOfLevels
|
// UINT MipLevel, UINT Width, UINT NumberOfLevels
|
||||||
{ "GetDimensions", /* 1D */ "-", "-", "%1,>S", "FUI,U", EShLangAll },
|
{ "GetDimensions", /* 1D */ "-", "-", "%!~1,>S", "FUI,U", EShLangAll },
|
||||||
{ "GetDimensions", /* 1D */ "-", "-", "%1,>S", "FUI,F", EShLangAll },
|
{ "GetDimensions", /* 1D */ "-", "-", "%!~1,>S", "FUI,F", EShLangAll },
|
||||||
{ "GetDimensions", /* 1D */ "-", "-", "%1,S,>S,", "FUI,U,,", EShLangAll },
|
{ "GetDimensions", /* 1D */ "-", "-", "%1,S,>S,", "FUI,U,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 1D */ "-", "-", "%1,S,>S,", "FUI,U,F,", EShLangAll },
|
{ "GetDimensions", /* 1D */ "-", "-", "%1,S,>S,", "FUI,U,F,", EShLangAll },
|
||||||
|
|
||||||
// UINT Width, UINT Elements
|
// UINT Width, UINT Elements
|
||||||
// UINT MipLevel, UINT Width, UINT Elements, UINT NumberOfLevels
|
// UINT MipLevel, UINT Width, UINT Elements, UINT NumberOfLevels
|
||||||
{ "GetDimensions", /* 1DArray */ "-", "-", "@1,>S,", "FUI,U,", EShLangAll },
|
{ "GetDimensions", /* 1DArray */ "-", "-", "@#1,>S,", "FUI,U,", EShLangAll },
|
||||||
{ "GetDimensions", /* 1DArray */ "-", "-", "@1,>S,", "FUI,F,", EShLangAll },
|
{ "GetDimensions", /* 1DArray */ "-", "-", "@#1,>S,", "FUI,F,", EShLangAll },
|
||||||
{ "GetDimensions", /* 1DArray */ "-", "-", "@1,S,>S,,", "FUI,U,,,", EShLangAll },
|
{ "GetDimensions", /* 1DArray */ "-", "-", "@1,S,>S,,", "FUI,U,,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 1DArray */ "-", "-", "@1,S,>S,,", "FUI,U,F,,", EShLangAll },
|
{ "GetDimensions", /* 1DArray */ "-", "-", "@1,S,>S,,", "FUI,U,F,,", EShLangAll },
|
||||||
|
|
||||||
// UINT Width, UINT Height
|
// UINT Width, UINT Height
|
||||||
// UINT MipLevel, UINT Width, UINT Height, UINT NumberOfLevels
|
// UINT MipLevel, UINT Width, UINT Height, UINT NumberOfLevels
|
||||||
{ "GetDimensions", /* 2D */ "-", "-", "%2,>S,", "FUI,U,", EShLangAll },
|
{ "GetDimensions", /* 2D */ "-", "-", "%!2,>S,", "FUI,U,", EShLangAll },
|
||||||
{ "GetDimensions", /* 2D */ "-", "-", "%2,>S,", "FUI,F,", EShLangAll },
|
{ "GetDimensions", /* 2D */ "-", "-", "%!2,>S,", "FUI,F,", EShLangAll },
|
||||||
{ "GetDimensions", /* 2D */ "-", "-", "%2,S,>S,,", "FUI,U,,,", EShLangAll },
|
{ "GetDimensions", /* 2D */ "-", "-", "%2,S,>S,,", "FUI,U,,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 2D */ "-", "-", "%2,S,>S,,", "FUI,U,F,,", EShLangAll },
|
{ "GetDimensions", /* 2D */ "-", "-", "%2,S,>S,,", "FUI,U,F,,", EShLangAll },
|
||||||
|
|
||||||
// UINT Width, UINT Height, UINT Elements
|
// UINT Width, UINT Height, UINT Elements
|
||||||
// UINT MipLevel, UINT Width, UINT Height, UINT Elements, UINT NumberOfLevels
|
// UINT MipLevel, UINT Width, UINT Height, UINT Elements, UINT NumberOfLevels
|
||||||
{ "GetDimensions", /* 2DArray */ "-", "-", "@2,>S,,", "FUI,U,,", EShLangAll },
|
{ "GetDimensions", /* 2DArray */ "-", "-", "@#2,>S,,", "FUI,U,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 2DArray */ "-", "-", "@2,>S,,", "FUI,F,F,F", EShLangAll },
|
{ "GetDimensions", /* 2DArray */ "-", "-", "@#2,>S,,", "FUI,F,F,F", EShLangAll },
|
||||||
{ "GetDimensions", /* 2DArray */ "-", "-", "@2,S,>S,,,", "FUI,U,,,,", EShLangAll },
|
{ "GetDimensions", /* 2DArray */ "-", "-", "@2,S,>S,,,", "FUI,U,,,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 2DArray */ "-", "-", "@2,S,>S,,,", "FUI,U,F,,,", EShLangAll },
|
{ "GetDimensions", /* 2DArray */ "-", "-", "@2,S,>S,,,", "FUI,U,F,,,", EShLangAll },
|
||||||
|
|
||||||
// UINT Width, UINT Height, UINT Depth
|
// UINT Width, UINT Height, UINT Depth
|
||||||
// UINT MipLevel, UINT Width, UINT Height, UINT Depth, UINT NumberOfLevels
|
// UINT MipLevel, UINT Width, UINT Height, UINT Depth, UINT NumberOfLevels
|
||||||
{ "GetDimensions", /* 3D */ "-", "-", "%3,>S,,", "FUI,U,,", EShLangAll },
|
{ "GetDimensions", /* 3D */ "-", "-", "%!3,>S,,", "FUI,U,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 3D */ "-", "-", "%3,>S,,", "FUI,F,,", EShLangAll },
|
{ "GetDimensions", /* 3D */ "-", "-", "%!3,>S,,", "FUI,F,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 3D */ "-", "-", "%3,S,>S,,,", "FUI,U,,,,", EShLangAll },
|
{ "GetDimensions", /* 3D */ "-", "-", "%3,S,>S,,,", "FUI,U,,,,", EShLangAll },
|
||||||
{ "GetDimensions", /* 3D */ "-", "-", "%3,S,>S,,,", "FUI,U,F,,,", EShLangAll },
|
{ "GetDimensions", /* 3D */ "-", "-", "%3,S,>S,,,", "FUI,U,F,,,", EShLangAll },
|
||||||
|
|
||||||
@ -836,10 +855,11 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c
|
|||||||
|
|
||||||
for (const char* argOrder = intrinsic.argOrder; !IsEndOfArg(argOrder); ++argOrder) { // for each order...
|
for (const char* argOrder = intrinsic.argOrder; !IsEndOfArg(argOrder); ++argOrder) { // for each order...
|
||||||
const bool isTexture = IsTextureType(*argOrder);
|
const bool isTexture = IsTextureType(*argOrder);
|
||||||
const bool isArrayed = IsTextureArrayed(*argOrder);
|
const bool isArrayed = IsArrayed(*argOrder);
|
||||||
const bool isMS = IsTextureMS(*argOrder);
|
const bool isMS = IsTextureMS(*argOrder);
|
||||||
const bool isBuffer = IsBuffer(*argOrder);
|
const bool isBuffer = IsBuffer(*argOrder);
|
||||||
const bool mipInCoord = HasMipInCoord(intrinsic.name, isMS, isBuffer);
|
const bool isImage = IsImage(*argOrder);
|
||||||
|
const bool mipInCoord = HasMipInCoord(intrinsic.name, isMS, isBuffer, isImage);
|
||||||
const int fixedVecSize = FixedVecSize(argOrder);
|
const int fixedVecSize = FixedVecSize(argOrder);
|
||||||
const int coordArg = CoordinateArgPos(intrinsic.name, isTexture);
|
const int coordArg = CoordinateArgPos(intrinsic.name, isTexture);
|
||||||
|
|
||||||
|
@ -258,6 +258,13 @@ void HlslScanContext::fillInKeywordMap()
|
|||||||
(*KeywordMap)["TextureCubeArray"] = EHTokTextureCubearray;
|
(*KeywordMap)["TextureCubeArray"] = EHTokTextureCubearray;
|
||||||
(*KeywordMap)["Texture2DMS"] = EHTokTexture2DMS;
|
(*KeywordMap)["Texture2DMS"] = EHTokTexture2DMS;
|
||||||
(*KeywordMap)["Texture2DMSArray"] = EHTokTexture2DMSarray;
|
(*KeywordMap)["Texture2DMSArray"] = EHTokTexture2DMSarray;
|
||||||
|
(*KeywordMap)["RWTexture1D"] = EHTokRWTexture1d;
|
||||||
|
(*KeywordMap)["RWTexture1DArray"] = EHTokRWTexture1darray;
|
||||||
|
(*KeywordMap)["RWTexture2D"] = EHTokRWTexture2d;
|
||||||
|
(*KeywordMap)["RWTexture2DArray"] = EHTokRWTexture2darray;
|
||||||
|
(*KeywordMap)["RWTexture3D"] = EHTokRWTexture3d;
|
||||||
|
(*KeywordMap)["RWBuffer"] = EHTokRWBuffer;
|
||||||
|
|
||||||
|
|
||||||
(*KeywordMap)["struct"] = EHTokStruct;
|
(*KeywordMap)["struct"] = EHTokStruct;
|
||||||
(*KeywordMap)["cbuffer"] = EHTokCBuffer;
|
(*KeywordMap)["cbuffer"] = EHTokCBuffer;
|
||||||
@ -581,6 +588,12 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier()
|
|||||||
case EHTokTextureCubearray:
|
case EHTokTextureCubearray:
|
||||||
case EHTokTexture2DMS:
|
case EHTokTexture2DMS:
|
||||||
case EHTokTexture2DMSarray:
|
case EHTokTexture2DMSarray:
|
||||||
|
case EHTokRWTexture1d:
|
||||||
|
case EHTokRWTexture1darray:
|
||||||
|
case EHTokRWTexture2d:
|
||||||
|
case EHTokRWTexture2darray:
|
||||||
|
case EHTokRWTexture3d:
|
||||||
|
case EHTokRWBuffer:
|
||||||
return keyword;
|
return keyword;
|
||||||
|
|
||||||
// variable, user type, ...
|
// variable, user type, ...
|
||||||
|
@ -209,6 +209,13 @@ enum EHlslTokenClass {
|
|||||||
EHTokTextureCubearray,
|
EHTokTextureCubearray,
|
||||||
EHTokTexture2DMS,
|
EHTokTexture2DMS,
|
||||||
EHTokTexture2DMSarray,
|
EHTokTexture2DMSarray,
|
||||||
|
EHTokRWTexture1d,
|
||||||
|
EHTokRWTexture1darray,
|
||||||
|
EHTokRWTexture2d,
|
||||||
|
EHTokRWTexture2darray,
|
||||||
|
EHTokRWTexture3d,
|
||||||
|
EHTokRWBuffer,
|
||||||
|
|
||||||
|
|
||||||
// variable, user type, ...
|
// variable, user type, ...
|
||||||
EHTokIdentifier,
|
EHTokIdentifier,
|
||||||
|
Loading…
Reference in New Issue
Block a user