mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
HLSL: phase 2d: minor cleanup, & allow operator[] on non-rw textures
Improve comments. A few tweaked lines allow [] on non-rw tx. Add test case for this. Improve VectorTimesScalar handling.
This commit is contained in:
parent
0de16da2c0
commit
07830e805b
@ -813,25 +813,39 @@ gl_FragCoord origin is upper left
|
||||
0:132 'coordTemp' (temp int)
|
||||
0:132 'storeTempPost' (temp 4-component vector of uint)
|
||||
0:132 'storeTempPre' (temp 4-component vector of uint)
|
||||
0:134 move second child to first child (temp 4-component vector of float)
|
||||
0:134 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:134 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:134 Constant:
|
||||
0:134 0 (const int)
|
||||
0:134 Constant:
|
||||
0:134 1.000000
|
||||
0:134 1.000000
|
||||
0:134 1.000000
|
||||
0:134 1.000000
|
||||
0:136 Sequence
|
||||
0:136 Sequence
|
||||
0:136 move second child to first child (temp 4-component vector of float)
|
||||
0:135 Sequence
|
||||
0:135 move second child to first child (temp 4-component vector of float)
|
||||
0:135 'storeTemp' (temp 4-component vector of float)
|
||||
0:? imageLoad (temp 4-component vector of float)
|
||||
0:135 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||
0:? Constant:
|
||||
0:? 2 (const int)
|
||||
0:? 3 (const int)
|
||||
0:135 imageStore (temp void)
|
||||
0:135 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||
0:135 Constant:
|
||||
0:135 1 (const int)
|
||||
0:135 'storeTemp' (temp 4-component vector of float)
|
||||
0:135 'storeTemp' (temp 4-component vector of float)
|
||||
0:137 move second child to first child (temp 4-component vector of float)
|
||||
0:137 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:137 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:137 Constant:
|
||||
0:137 0 (const int)
|
||||
0:137 Constant:
|
||||
0:137 1.000000
|
||||
0:137 1.000000
|
||||
0:137 1.000000
|
||||
0:137 1.000000
|
||||
0:139 Sequence
|
||||
0:139 Sequence
|
||||
0:139 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:136 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:136 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:136 Constant:
|
||||
0:136 0 (const int)
|
||||
0:136 Branch: Return
|
||||
0:139 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:139 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:139 Constant:
|
||||
0:139 0 (const int)
|
||||
0:139 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||
@ -1670,25 +1684,39 @@ gl_FragCoord origin is upper left
|
||||
0:132 'coordTemp' (temp int)
|
||||
0:132 'storeTempPost' (temp 4-component vector of uint)
|
||||
0:132 'storeTempPre' (temp 4-component vector of uint)
|
||||
0:134 move second child to first child (temp 4-component vector of float)
|
||||
0:134 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:134 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:134 Constant:
|
||||
0:134 0 (const int)
|
||||
0:134 Constant:
|
||||
0:134 1.000000
|
||||
0:134 1.000000
|
||||
0:134 1.000000
|
||||
0:134 1.000000
|
||||
0:136 Sequence
|
||||
0:136 Sequence
|
||||
0:136 move second child to first child (temp 4-component vector of float)
|
||||
0:135 Sequence
|
||||
0:135 move second child to first child (temp 4-component vector of float)
|
||||
0:135 'storeTemp' (temp 4-component vector of float)
|
||||
0:? imageLoad (temp 4-component vector of float)
|
||||
0:135 'g_tTex2df4' (layout(rgba32f ) uniform image2D)
|
||||
0:? Constant:
|
||||
0:? 2 (const int)
|
||||
0:? 3 (const int)
|
||||
0:135 imageStore (temp void)
|
||||
0:135 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||
0:135 Constant:
|
||||
0:135 1 (const int)
|
||||
0:135 'storeTemp' (temp 4-component vector of float)
|
||||
0:135 'storeTemp' (temp 4-component vector of float)
|
||||
0:137 move second child to first child (temp 4-component vector of float)
|
||||
0:137 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:137 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:137 Constant:
|
||||
0:137 0 (const int)
|
||||
0:137 Constant:
|
||||
0:137 1.000000
|
||||
0:137 1.000000
|
||||
0:137 1.000000
|
||||
0:137 1.000000
|
||||
0:139 Sequence
|
||||
0:139 Sequence
|
||||
0:139 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:136 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:136 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:136 Constant:
|
||||
0:136 0 (const int)
|
||||
0:136 Branch: Return
|
||||
0:139 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:139 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:139 Constant:
|
||||
0:139 0 (const int)
|
||||
0:139 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4' (layout(binding=0 rgba32f ) uniform image1D)
|
||||
@ -1711,13 +1739,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 596
|
||||
// Id's are bound by 602
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 571
|
||||
EntryPoint Fragment 4 "main" 577
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 11 "Fn1(vi4;"
|
||||
@ -1832,17 +1860,18 @@ gl_FragCoord origin is upper left
|
||||
Name 550 "coordTemp"
|
||||
Name 553 "storeTempPre"
|
||||
Name 557 "storeTempPost"
|
||||
Name 565 "PS_OUTPUT"
|
||||
MemberName 565(PS_OUTPUT) 0 "Color"
|
||||
Name 567 "psout"
|
||||
Name 571 "Color"
|
||||
Name 577 "g_sSamp"
|
||||
Name 580 "g_tTex1df4a"
|
||||
Name 583 "g_tTex1di4a"
|
||||
Name 586 "g_tTex1du4a"
|
||||
Name 589 "g_tTex2df4a"
|
||||
Name 592 "g_tTex2di4a"
|
||||
Name 595 "g_tTex2du4a"
|
||||
Name 565 "storeTemp"
|
||||
Name 571 "PS_OUTPUT"
|
||||
MemberName 571(PS_OUTPUT) 0 "Color"
|
||||
Name 573 "psout"
|
||||
Name 577 "Color"
|
||||
Name 583 "g_sSamp"
|
||||
Name 586 "g_tTex1df4a"
|
||||
Name 589 "g_tTex1di4a"
|
||||
Name 592 "g_tTex1du4a"
|
||||
Name 595 "g_tTex2df4a"
|
||||
Name 598 "g_tTex2di4a"
|
||||
Name 601 "g_tTex2du4a"
|
||||
MemberDecorate 59($Global) 0 Offset 0
|
||||
MemberDecorate 59($Global) 1 Offset 8
|
||||
MemberDecorate 59($Global) 2 Offset 16
|
||||
@ -1866,15 +1895,15 @@ gl_FragCoord origin is upper left
|
||||
Decorate 127(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 137(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 145(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 571(Color) Location 0
|
||||
Decorate 577(g_sSamp) DescriptorSet 0
|
||||
Decorate 577(g_sSamp) Binding 0
|
||||
Decorate 580(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 583(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 586(g_tTex1du4a) DescriptorSet 0
|
||||
Decorate 589(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 592(g_tTex2di4a) DescriptorSet 0
|
||||
Decorate 595(g_tTex2du4a) DescriptorSet 0
|
||||
Decorate 577(Color) Location 0
|
||||
Decorate 583(g_sSamp) DescriptorSet 0
|
||||
Decorate 583(g_sSamp) Binding 0
|
||||
Decorate 586(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 589(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 592(g_tTex1du4a) DescriptorSet 0
|
||||
Decorate 595(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 598(g_tTex2di4a) DescriptorSet 0
|
||||
Decorate 601(g_tTex2du4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
@ -1962,32 +1991,33 @@ gl_FragCoord origin is upper left
|
||||
348: 13(int) Constant 9
|
||||
349: 14(ivec4) ConstantComposite 348 174 173 175
|
||||
404: 20(float) Constant 1065353216
|
||||
565(PS_OUTPUT): TypeStruct 21(fvec4)
|
||||
566: TypePointer Function 565(PS_OUTPUT)
|
||||
568: 21(fvec4) ConstantComposite 404 404 404 404
|
||||
570: TypePointer Output 21(fvec4)
|
||||
571(Color): 570(ptr) Variable Output
|
||||
575: TypeSampler
|
||||
576: TypePointer UniformConstant 575
|
||||
577(g_sSamp): 576(ptr) Variable UniformConstant
|
||||
578: TypeImage 20(float) 1D array nonsampled format:Rgba32f
|
||||
579: TypePointer UniformConstant 578
|
||||
580(g_tTex1df4a): 579(ptr) Variable UniformConstant
|
||||
581: TypeImage 6(int) 1D array nonsampled format:Rgba32i
|
||||
567: 57(ivec2) ConstantComposite 129 62
|
||||
571(PS_OUTPUT): TypeStruct 21(fvec4)
|
||||
572: TypePointer Function 571(PS_OUTPUT)
|
||||
574: 21(fvec4) ConstantComposite 404 404 404 404
|
||||
576: TypePointer Output 21(fvec4)
|
||||
577(Color): 576(ptr) Variable Output
|
||||
581: TypeSampler
|
||||
582: TypePointer UniformConstant 581
|
||||
583(g_tTex1di4a): 582(ptr) Variable UniformConstant
|
||||
584: TypeImage 13(int) 1D array nonsampled format:Rgba32ui
|
||||
583(g_sSamp): 582(ptr) Variable UniformConstant
|
||||
584: TypeImage 20(float) 1D array nonsampled format:Rgba32f
|
||||
585: TypePointer UniformConstant 584
|
||||
586(g_tTex1du4a): 585(ptr) Variable UniformConstant
|
||||
587: TypeImage 20(float) 2D array nonsampled format:Rgba32f
|
||||
586(g_tTex1df4a): 585(ptr) Variable UniformConstant
|
||||
587: TypeImage 6(int) 1D array nonsampled format:Rgba32i
|
||||
588: TypePointer UniformConstant 587
|
||||
589(g_tTex2df4a): 588(ptr) Variable UniformConstant
|
||||
590: TypeImage 6(int) 2D array nonsampled format:Rgba32i
|
||||
589(g_tTex1di4a): 588(ptr) Variable UniformConstant
|
||||
590: TypeImage 13(int) 1D array nonsampled format:Rgba32ui
|
||||
591: TypePointer UniformConstant 590
|
||||
592(g_tTex2di4a): 591(ptr) Variable UniformConstant
|
||||
593: TypeImage 13(int) 2D array nonsampled format:Rgba32ui
|
||||
592(g_tTex1du4a): 591(ptr) Variable UniformConstant
|
||||
593: TypeImage 20(float) 2D array nonsampled format:Rgba32f
|
||||
594: TypePointer UniformConstant 593
|
||||
595(g_tTex2du4a): 594(ptr) Variable UniformConstant
|
||||
595(g_tTex2df4a): 594(ptr) Variable UniformConstant
|
||||
596: TypeImage 6(int) 2D array nonsampled format:Rgba32i
|
||||
597: TypePointer UniformConstant 596
|
||||
598(g_tTex2di4a): 597(ptr) Variable UniformConstant
|
||||
599: TypeImage 13(int) 2D array nonsampled format:Rgba32ui
|
||||
600: TypePointer UniformConstant 599
|
||||
601(g_tTex2du4a): 600(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
77(r00): 22(ptr) Variable Function
|
||||
@ -2067,7 +2097,8 @@ gl_FragCoord origin is upper left
|
||||
550(coordTemp): 182(ptr) Variable Function
|
||||
553(storeTempPre): 15(ptr) Variable Function
|
||||
557(storeTempPost): 15(ptr) Variable Function
|
||||
567(psout): 566(ptr) Variable Function
|
||||
565(storeTemp): 22(ptr) Variable Function
|
||||
573(psout): 572(ptr) Variable Function
|
||||
72: 69 Load 71(g_tTex1df4)
|
||||
74: 73(ptr) AccessChain 61 51
|
||||
75: 6(int) Load 74
|
||||
@ -2562,11 +2593,17 @@ gl_FragCoord origin is upper left
|
||||
563: 6(int) Load 550(coordTemp)
|
||||
564: 14(ivec4) Load 557(storeTempPost)
|
||||
ImageWrite 562 563 564
|
||||
569: 22(ptr) AccessChain 567(psout) 51
|
||||
Store 569 568
|
||||
572: 22(ptr) AccessChain 567(psout) 51
|
||||
573: 21(fvec4) Load 572
|
||||
Store 571(Color) 573
|
||||
566: 99 Load 101(g_tTex2df4)
|
||||
568: 21(fvec4) ImageRead 566 567
|
||||
Store 565(storeTemp) 568
|
||||
569: 69 Load 71(g_tTex1df4)
|
||||
570: 21(fvec4) Load 565(storeTemp)
|
||||
ImageWrite 569 103 570
|
||||
575: 22(ptr) AccessChain 573(psout) 51
|
||||
Store 575 574
|
||||
578: 22(ptr) AccessChain 573(psout) 51
|
||||
579: 21(fvec4) Load 578
|
||||
Store 577(Color) 579
|
||||
Return
|
||||
FunctionEnd
|
||||
11(Fn1(vi4;): 7(ivec4) Function None 9
|
||||
|
702
Test/baseResults/hlsl.tx.bracket.frag.out
Normal file
702
Test/baseResults/hlsl.tx.bracket.frag.out
Normal file
@ -0,0 +1,702 @@
|
||||
hlsl.tx.bracket.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:38 Function Definition: Fn1(vi4; (temp 4-component vector of int)
|
||||
0:38 Function Parameters:
|
||||
0:38 'x' (in 4-component vector of int)
|
||||
0:? Sequence
|
||||
0:38 Branch: Return with expression
|
||||
0:38 'x' (in 4-component vector of int)
|
||||
0:39 Function Definition: Fn1(vu4; (temp 4-component vector of uint)
|
||||
0:39 Function Parameters:
|
||||
0:39 'x' (in 4-component vector of uint)
|
||||
0:? Sequence
|
||||
0:39 Branch: Return with expression
|
||||
0:39 'x' (in 4-component vector of uint)
|
||||
0:40 Function Definition: Fn1(vf4; (temp 4-component vector of float)
|
||||
0:40 Function Parameters:
|
||||
0:40 'x' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:40 Branch: Return with expression
|
||||
0:40 'x' (in 4-component vector of float)
|
||||
0:42 Function Definition: SomeValue( (temp 4-component vector of float)
|
||||
0:42 Function Parameters:
|
||||
0:? Sequence
|
||||
0:42 Branch: Return with expression
|
||||
0:42 Convert int to float (temp 4-component vector of float)
|
||||
0:42 c4: direct index for structure (layout(offset=32 ) uniform 4-component vector of int)
|
||||
0:42 '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:42 Constant:
|
||||
0:42 3 (const uint)
|
||||
0:45 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:45 Function Parameters:
|
||||
0:? Sequence
|
||||
0:49 textureFetch (temp 4-component vector of float)
|
||||
0:49 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:49 c1: direct index for structure (layout(offset=0 ) uniform 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 0 (const uint)
|
||||
0:49 Constant:
|
||||
0:49 0 (const int)
|
||||
0:51 Sequence
|
||||
0:51 move second child to first child (temp 4-component vector of float)
|
||||
0:51 'r00' (temp 4-component vector of float)
|
||||
0:51 textureFetch (temp 4-component vector of float)
|
||||
0:51 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:51 c1: direct index for structure (layout(offset=0 ) uniform 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 0 (const uint)
|
||||
0:51 Constant:
|
||||
0:51 0 (const int)
|
||||
0:52 Sequence
|
||||
0:52 move second child to first child (temp 4-component vector of int)
|
||||
0:52 'r01' (temp 4-component vector of int)
|
||||
0:52 textureFetch (temp 4-component vector of int)
|
||||
0:52 'g_tTex1di4' (uniform itexture1D)
|
||||
0:52 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:52 '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:52 Constant:
|
||||
0:52 0 (const uint)
|
||||
0:52 Constant:
|
||||
0:52 0 (const int)
|
||||
0:53 Sequence
|
||||
0:53 move second child to first child (temp 4-component vector of uint)
|
||||
0:53 'r02' (temp 4-component vector of uint)
|
||||
0:53 textureFetch (temp 4-component vector of uint)
|
||||
0:53 'g_tTex1du4' (uniform utexture1D)
|
||||
0:53 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:53 '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:53 Constant:
|
||||
0:53 0 (const uint)
|
||||
0:53 Constant:
|
||||
0:53 0 (const int)
|
||||
0:56 Sequence
|
||||
0:56 move second child to first child (temp 4-component vector of float)
|
||||
0:56 'r10' (temp 4-component vector of float)
|
||||
0:56 textureFetch (temp 4-component vector of float)
|
||||
0:56 'g_tTex2df4' (uniform texture2D)
|
||||
0:56 c2: direct index for structure (layout(offset=8 ) uniform 2-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 1 (const uint)
|
||||
0:56 Constant:
|
||||
0:56 0 (const int)
|
||||
0:57 Sequence
|
||||
0:57 move second child to first child (temp 4-component vector of int)
|
||||
0:57 'r11' (temp 4-component vector of int)
|
||||
0:57 textureFetch (temp 4-component vector of int)
|
||||
0:57 'g_tTex2di4' (uniform itexture2D)
|
||||
0:57 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||
0:57 '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:57 Constant:
|
||||
0:57 1 (const uint)
|
||||
0:57 Constant:
|
||||
0:57 0 (const int)
|
||||
0:58 Sequence
|
||||
0:58 move second child to first child (temp 4-component vector of uint)
|
||||
0:58 'r12' (temp 4-component vector of uint)
|
||||
0:58 textureFetch (temp 4-component vector of uint)
|
||||
0:58 'g_tTex2du4' (uniform utexture2D)
|
||||
0:58 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||
0:58 '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:58 Constant:
|
||||
0:58 1 (const uint)
|
||||
0:58 Constant:
|
||||
0:58 0 (const int)
|
||||
0:61 Sequence
|
||||
0:61 move second child to first child (temp 4-component vector of float)
|
||||
0:61 'r20' (temp 4-component vector of float)
|
||||
0:61 textureFetch (temp 4-component vector of float)
|
||||
0:61 'g_tTex3df4' (uniform texture3D)
|
||||
0:61 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||
0:61 '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:61 Constant:
|
||||
0:61 2 (const uint)
|
||||
0:61 Constant:
|
||||
0:61 0 (const int)
|
||||
0:62 Sequence
|
||||
0:62 move second child to first child (temp 4-component vector of int)
|
||||
0:62 'r21' (temp 4-component vector of int)
|
||||
0:62 textureFetch (temp 4-component vector of int)
|
||||
0:62 'g_tTex3di4' (uniform itexture3D)
|
||||
0:62 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||
0:62 '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:62 Constant:
|
||||
0:62 2 (const uint)
|
||||
0:62 Constant:
|
||||
0:62 0 (const int)
|
||||
0:63 Sequence
|
||||
0:63 move second child to first child (temp 4-component vector of uint)
|
||||
0:63 'r22' (temp 4-component vector of uint)
|
||||
0:63 textureFetch (temp 4-component vector of uint)
|
||||
0:63 'g_tTex3du4' (uniform utexture3D)
|
||||
0:63 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||
0:63 '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:63 Constant:
|
||||
0:63 2 (const uint)
|
||||
0:63 Constant:
|
||||
0:63 0 (const int)
|
||||
0:66 Function Call: Fn1(vf4; (temp 4-component vector of float)
|
||||
0:66 textureFetch (temp 4-component vector of float)
|
||||
0:66 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:66 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:66 '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:66 Constant:
|
||||
0:66 0 (const uint)
|
||||
0:66 Constant:
|
||||
0:66 0 (const int)
|
||||
0:67 Function Call: Fn1(vi4; (temp 4-component vector of int)
|
||||
0:67 textureFetch (temp 4-component vector of int)
|
||||
0:67 'g_tTex1di4' (uniform itexture1D)
|
||||
0:67 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:67 '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:67 Constant:
|
||||
0:67 0 (const uint)
|
||||
0:67 Constant:
|
||||
0:67 0 (const int)
|
||||
0:68 Function Call: Fn1(vu4; (temp 4-component vector of uint)
|
||||
0:68 textureFetch (temp 4-component vector of uint)
|
||||
0:68 'g_tTex1du4' (uniform utexture1D)
|
||||
0:68 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:68 '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:68 Constant:
|
||||
0:68 0 (const uint)
|
||||
0:68 Constant:
|
||||
0:68 0 (const int)
|
||||
0:70 move second child to first child (temp 4-component vector of float)
|
||||
0:70 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:70 Constant:
|
||||
0:70 0 (const int)
|
||||
0:70 Constant:
|
||||
0:70 1.000000
|
||||
0:70 1.000000
|
||||
0:70 1.000000
|
||||
0:70 1.000000
|
||||
0:72 Sequence
|
||||
0:72 Sequence
|
||||
0:72 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:72 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:72 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:72 Constant:
|
||||
0:72 0 (const int)
|
||||
0:72 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:? 'g_tTex1di4' (uniform itexture1D)
|
||||
0:? 'g_tTex1du4' (uniform utexture1D)
|
||||
0:? 'g_tTex2df4' (uniform texture2D)
|
||||
0:? 'g_tTex2di4' (uniform itexture2D)
|
||||
0:? 'g_tTex2du4' (uniform utexture2D)
|
||||
0:? 'g_tTex3df4' (uniform texture3D)
|
||||
0:? 'g_tTex3di4' (uniform itexture3D)
|
||||
0:? 'g_tTex3du4' (uniform utexture3D)
|
||||
0:? 'g_tTex1df4a' (uniform texture1DArray)
|
||||
0:? 'g_tTex1di4a' (uniform itexture1DArray)
|
||||
0:? 'g_tTex1du4a' (uniform utexture1DArray)
|
||||
0:? 'g_tTex2df4a' (uniform texture2DArray)
|
||||
0:? 'g_tTex2di4a' (uniform itexture2DArray)
|
||||
0:? 'g_tTex2du4a' (uniform utexture2DArray)
|
||||
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})
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:38 Function Definition: Fn1(vi4; (temp 4-component vector of int)
|
||||
0:38 Function Parameters:
|
||||
0:38 'x' (in 4-component vector of int)
|
||||
0:? Sequence
|
||||
0:38 Branch: Return with expression
|
||||
0:38 'x' (in 4-component vector of int)
|
||||
0:39 Function Definition: Fn1(vu4; (temp 4-component vector of uint)
|
||||
0:39 Function Parameters:
|
||||
0:39 'x' (in 4-component vector of uint)
|
||||
0:? Sequence
|
||||
0:39 Branch: Return with expression
|
||||
0:39 'x' (in 4-component vector of uint)
|
||||
0:40 Function Definition: Fn1(vf4; (temp 4-component vector of float)
|
||||
0:40 Function Parameters:
|
||||
0:40 'x' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
0:40 Branch: Return with expression
|
||||
0:40 'x' (in 4-component vector of float)
|
||||
0:42 Function Definition: SomeValue( (temp 4-component vector of float)
|
||||
0:42 Function Parameters:
|
||||
0:? Sequence
|
||||
0:42 Branch: Return with expression
|
||||
0:42 Convert int to float (temp 4-component vector of float)
|
||||
0:42 c4: direct index for structure (layout(offset=32 ) uniform 4-component vector of int)
|
||||
0:42 '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:42 Constant:
|
||||
0:42 3 (const uint)
|
||||
0:45 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:45 Function Parameters:
|
||||
0:? Sequence
|
||||
0:49 textureFetch (temp 4-component vector of float)
|
||||
0:49 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:49 c1: direct index for structure (layout(offset=0 ) uniform 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 0 (const uint)
|
||||
0:49 Constant:
|
||||
0:49 0 (const int)
|
||||
0:51 Sequence
|
||||
0:51 move second child to first child (temp 4-component vector of float)
|
||||
0:51 'r00' (temp 4-component vector of float)
|
||||
0:51 textureFetch (temp 4-component vector of float)
|
||||
0:51 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:51 c1: direct index for structure (layout(offset=0 ) uniform 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 0 (const uint)
|
||||
0:51 Constant:
|
||||
0:51 0 (const int)
|
||||
0:52 Sequence
|
||||
0:52 move second child to first child (temp 4-component vector of int)
|
||||
0:52 'r01' (temp 4-component vector of int)
|
||||
0:52 textureFetch (temp 4-component vector of int)
|
||||
0:52 'g_tTex1di4' (uniform itexture1D)
|
||||
0:52 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:52 '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:52 Constant:
|
||||
0:52 0 (const uint)
|
||||
0:52 Constant:
|
||||
0:52 0 (const int)
|
||||
0:53 Sequence
|
||||
0:53 move second child to first child (temp 4-component vector of uint)
|
||||
0:53 'r02' (temp 4-component vector of uint)
|
||||
0:53 textureFetch (temp 4-component vector of uint)
|
||||
0:53 'g_tTex1du4' (uniform utexture1D)
|
||||
0:53 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:53 '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:53 Constant:
|
||||
0:53 0 (const uint)
|
||||
0:53 Constant:
|
||||
0:53 0 (const int)
|
||||
0:56 Sequence
|
||||
0:56 move second child to first child (temp 4-component vector of float)
|
||||
0:56 'r10' (temp 4-component vector of float)
|
||||
0:56 textureFetch (temp 4-component vector of float)
|
||||
0:56 'g_tTex2df4' (uniform texture2D)
|
||||
0:56 c2: direct index for structure (layout(offset=8 ) uniform 2-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 1 (const uint)
|
||||
0:56 Constant:
|
||||
0:56 0 (const int)
|
||||
0:57 Sequence
|
||||
0:57 move second child to first child (temp 4-component vector of int)
|
||||
0:57 'r11' (temp 4-component vector of int)
|
||||
0:57 textureFetch (temp 4-component vector of int)
|
||||
0:57 'g_tTex2di4' (uniform itexture2D)
|
||||
0:57 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||
0:57 '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:57 Constant:
|
||||
0:57 1 (const uint)
|
||||
0:57 Constant:
|
||||
0:57 0 (const int)
|
||||
0:58 Sequence
|
||||
0:58 move second child to first child (temp 4-component vector of uint)
|
||||
0:58 'r12' (temp 4-component vector of uint)
|
||||
0:58 textureFetch (temp 4-component vector of uint)
|
||||
0:58 'g_tTex2du4' (uniform utexture2D)
|
||||
0:58 c2: direct index for structure (layout(offset=8 ) uniform 2-component vector of int)
|
||||
0:58 '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:58 Constant:
|
||||
0:58 1 (const uint)
|
||||
0:58 Constant:
|
||||
0:58 0 (const int)
|
||||
0:61 Sequence
|
||||
0:61 move second child to first child (temp 4-component vector of float)
|
||||
0:61 'r20' (temp 4-component vector of float)
|
||||
0:61 textureFetch (temp 4-component vector of float)
|
||||
0:61 'g_tTex3df4' (uniform texture3D)
|
||||
0:61 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||
0:61 '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:61 Constant:
|
||||
0:61 2 (const uint)
|
||||
0:61 Constant:
|
||||
0:61 0 (const int)
|
||||
0:62 Sequence
|
||||
0:62 move second child to first child (temp 4-component vector of int)
|
||||
0:62 'r21' (temp 4-component vector of int)
|
||||
0:62 textureFetch (temp 4-component vector of int)
|
||||
0:62 'g_tTex3di4' (uniform itexture3D)
|
||||
0:62 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||
0:62 '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:62 Constant:
|
||||
0:62 2 (const uint)
|
||||
0:62 Constant:
|
||||
0:62 0 (const int)
|
||||
0:63 Sequence
|
||||
0:63 move second child to first child (temp 4-component vector of uint)
|
||||
0:63 'r22' (temp 4-component vector of uint)
|
||||
0:63 textureFetch (temp 4-component vector of uint)
|
||||
0:63 'g_tTex3du4' (uniform utexture3D)
|
||||
0:63 c3: direct index for structure (layout(offset=16 ) uniform 3-component vector of int)
|
||||
0:63 '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:63 Constant:
|
||||
0:63 2 (const uint)
|
||||
0:63 Constant:
|
||||
0:63 0 (const int)
|
||||
0:66 Function Call: Fn1(vf4; (temp 4-component vector of float)
|
||||
0:66 textureFetch (temp 4-component vector of float)
|
||||
0:66 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:66 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:66 '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:66 Constant:
|
||||
0:66 0 (const uint)
|
||||
0:66 Constant:
|
||||
0:66 0 (const int)
|
||||
0:67 Function Call: Fn1(vi4; (temp 4-component vector of int)
|
||||
0:67 textureFetch (temp 4-component vector of int)
|
||||
0:67 'g_tTex1di4' (uniform itexture1D)
|
||||
0:67 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:67 '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:67 Constant:
|
||||
0:67 0 (const uint)
|
||||
0:67 Constant:
|
||||
0:67 0 (const int)
|
||||
0:68 Function Call: Fn1(vu4; (temp 4-component vector of uint)
|
||||
0:68 textureFetch (temp 4-component vector of uint)
|
||||
0:68 'g_tTex1du4' (uniform utexture1D)
|
||||
0:68 c1: direct index for structure (layout(offset=0 ) uniform int)
|
||||
0:68 '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:68 Constant:
|
||||
0:68 0 (const uint)
|
||||
0:68 Constant:
|
||||
0:68 0 (const int)
|
||||
0:70 move second child to first child (temp 4-component vector of float)
|
||||
0:70 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:70 Constant:
|
||||
0:70 0 (const int)
|
||||
0:70 Constant:
|
||||
0:70 1.000000
|
||||
0:70 1.000000
|
||||
0:70 1.000000
|
||||
0:70 1.000000
|
||||
0:72 Sequence
|
||||
0:72 Sequence
|
||||
0:72 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:72 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:72 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:72 Constant:
|
||||
0:72 0 (const int)
|
||||
0:72 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
0:? 'g_tTex1df4' (layout(binding=0 ) uniform texture1D)
|
||||
0:? 'g_tTex1di4' (uniform itexture1D)
|
||||
0:? 'g_tTex1du4' (uniform utexture1D)
|
||||
0:? 'g_tTex2df4' (uniform texture2D)
|
||||
0:? 'g_tTex2di4' (uniform itexture2D)
|
||||
0:? 'g_tTex2du4' (uniform utexture2D)
|
||||
0:? 'g_tTex3df4' (uniform texture3D)
|
||||
0:? 'g_tTex3di4' (uniform itexture3D)
|
||||
0:? 'g_tTex3du4' (uniform utexture3D)
|
||||
0:? 'g_tTex1df4a' (uniform texture1DArray)
|
||||
0:? 'g_tTex1di4a' (uniform itexture1DArray)
|
||||
0:? 'g_tTex1du4a' (uniform utexture1DArray)
|
||||
0:? 'g_tTex2df4a' (uniform texture2DArray)
|
||||
0:? 'g_tTex2di4a' (uniform itexture2DArray)
|
||||
0:? 'g_tTex2du4a' (uniform utexture2DArray)
|
||||
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})
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 183
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 158
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 11 "Fn1(vi4;"
|
||||
Name 10 "x"
|
||||
Name 18 "Fn1(vu4;"
|
||||
Name 17 "x"
|
||||
Name 25 "Fn1(vf4;"
|
||||
Name 24 "x"
|
||||
Name 28 "SomeValue("
|
||||
Name 41 "$Global"
|
||||
MemberName 41($Global) 0 "c1"
|
||||
MemberName 41($Global) 1 "c2"
|
||||
MemberName 41($Global) 2 "c3"
|
||||
MemberName 41($Global) 3 "c4"
|
||||
MemberName 41($Global) 4 "o1"
|
||||
MemberName 41($Global) 5 "o2"
|
||||
MemberName 41($Global) 6 "o3"
|
||||
MemberName 41($Global) 7 "o4"
|
||||
Name 43 ""
|
||||
Name 53 "g_tTex1df4"
|
||||
Name 60 "r00"
|
||||
Name 65 "r01"
|
||||
Name 68 "g_tTex1di4"
|
||||
Name 73 "r02"
|
||||
Name 76 "g_tTex1du4"
|
||||
Name 81 "r10"
|
||||
Name 84 "g_tTex2df4"
|
||||
Name 91 "r11"
|
||||
Name 94 "g_tTex2di4"
|
||||
Name 99 "r12"
|
||||
Name 102 "g_tTex2du4"
|
||||
Name 107 "r20"
|
||||
Name 110 "g_tTex3df4"
|
||||
Name 117 "r21"
|
||||
Name 120 "g_tTex3di4"
|
||||
Name 125 "r22"
|
||||
Name 128 "g_tTex3du4"
|
||||
Name 137 "param"
|
||||
Name 143 "param"
|
||||
Name 149 "param"
|
||||
Name 151 "PS_OUTPUT"
|
||||
MemberName 151(PS_OUTPUT) 0 "Color"
|
||||
Name 153 "psout"
|
||||
Name 158 "Color"
|
||||
Name 164 "g_sSamp"
|
||||
Name 167 "g_tTex1df4a"
|
||||
Name 170 "g_tTex1di4a"
|
||||
Name 173 "g_tTex1du4a"
|
||||
Name 176 "g_tTex2df4a"
|
||||
Name 179 "g_tTex2di4a"
|
||||
Name 182 "g_tTex2du4a"
|
||||
MemberDecorate 41($Global) 0 Offset 0
|
||||
MemberDecorate 41($Global) 1 Offset 8
|
||||
MemberDecorate 41($Global) 2 Offset 16
|
||||
MemberDecorate 41($Global) 3 Offset 32
|
||||
MemberDecorate 41($Global) 4 Offset 48
|
||||
MemberDecorate 41($Global) 5 Offset 56
|
||||
MemberDecorate 41($Global) 6 Offset 64
|
||||
MemberDecorate 41($Global) 7 Offset 80
|
||||
Decorate 41($Global) Block
|
||||
Decorate 43 DescriptorSet 0
|
||||
Decorate 53(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 53(g_tTex1df4) Binding 0
|
||||
Decorate 68(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 76(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 84(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 94(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 102(g_tTex2du4) DescriptorSet 0
|
||||
Decorate 110(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 120(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 128(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 158(Color) Location 0
|
||||
Decorate 164(g_sSamp) DescriptorSet 0
|
||||
Decorate 164(g_sSamp) Binding 0
|
||||
Decorate 167(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 170(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 173(g_tTex1du4a) DescriptorSet 0
|
||||
Decorate 176(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 179(g_tTex2di4a) DescriptorSet 0
|
||||
Decorate 182(g_tTex2du4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypeVector 6(int) 4
|
||||
8: TypePointer Function 7(ivec4)
|
||||
9: TypeFunction 7(ivec4) 8(ptr)
|
||||
13: TypeInt 32 0
|
||||
14: TypeVector 13(int) 4
|
||||
15: TypePointer Function 14(ivec4)
|
||||
16: TypeFunction 14(ivec4) 15(ptr)
|
||||
20: TypeFloat 32
|
||||
21: TypeVector 20(float) 4
|
||||
22: TypePointer Function 21(fvec4)
|
||||
23: TypeFunction 21(fvec4) 22(ptr)
|
||||
27: TypeFunction 21(fvec4)
|
||||
39: TypeVector 6(int) 2
|
||||
40: TypeVector 6(int) 3
|
||||
41($Global): TypeStruct 6(int) 39(ivec2) 40(ivec3) 7(ivec4) 6(int) 39(ivec2) 40(ivec3) 7(ivec4)
|
||||
42: TypePointer Uniform 41($Global)
|
||||
43: 42(ptr) Variable Uniform
|
||||
44: 6(int) Constant 3
|
||||
45: TypePointer Uniform 7(ivec4)
|
||||
51: TypeImage 20(float) 1D sampled format:Unknown
|
||||
52: TypePointer UniformConstant 51
|
||||
53(g_tTex1df4): 52(ptr) Variable UniformConstant
|
||||
55: 6(int) Constant 0
|
||||
56: TypePointer Uniform 6(int)
|
||||
66: TypeImage 6(int) 1D sampled format:Unknown
|
||||
67: TypePointer UniformConstant 66
|
||||
68(g_tTex1di4): 67(ptr) Variable UniformConstant
|
||||
74: TypeImage 13(int) 1D sampled format:Unknown
|
||||
75: TypePointer UniformConstant 74
|
||||
76(g_tTex1du4): 75(ptr) Variable UniformConstant
|
||||
82: TypeImage 20(float) 2D sampled format:Unknown
|
||||
83: TypePointer UniformConstant 82
|
||||
84(g_tTex2df4): 83(ptr) Variable UniformConstant
|
||||
86: 6(int) Constant 1
|
||||
87: TypePointer Uniform 39(ivec2)
|
||||
92: TypeImage 6(int) 2D sampled format:Unknown
|
||||
93: TypePointer UniformConstant 92
|
||||
94(g_tTex2di4): 93(ptr) Variable UniformConstant
|
||||
100: TypeImage 13(int) 2D sampled format:Unknown
|
||||
101: TypePointer UniformConstant 100
|
||||
102(g_tTex2du4): 101(ptr) Variable UniformConstant
|
||||
108: TypeImage 20(float) 3D sampled format:Unknown
|
||||
109: TypePointer UniformConstant 108
|
||||
110(g_tTex3df4): 109(ptr) Variable UniformConstant
|
||||
112: 6(int) Constant 2
|
||||
113: TypePointer Uniform 40(ivec3)
|
||||
118: TypeImage 6(int) 3D sampled format:Unknown
|
||||
119: TypePointer UniformConstant 118
|
||||
120(g_tTex3di4): 119(ptr) Variable UniformConstant
|
||||
126: TypeImage 13(int) 3D sampled format:Unknown
|
||||
127: TypePointer UniformConstant 126
|
||||
128(g_tTex3du4): 127(ptr) Variable UniformConstant
|
||||
151(PS_OUTPUT): TypeStruct 21(fvec4)
|
||||
152: TypePointer Function 151(PS_OUTPUT)
|
||||
154: 20(float) Constant 1065353216
|
||||
155: 21(fvec4) ConstantComposite 154 154 154 154
|
||||
157: TypePointer Output 21(fvec4)
|
||||
158(Color): 157(ptr) Variable Output
|
||||
162: TypeSampler
|
||||
163: TypePointer UniformConstant 162
|
||||
164(g_sSamp): 163(ptr) Variable UniformConstant
|
||||
165: TypeImage 20(float) 1D array sampled format:Unknown
|
||||
166: TypePointer UniformConstant 165
|
||||
167(g_tTex1df4a): 166(ptr) Variable UniformConstant
|
||||
168: TypeImage 6(int) 1D array sampled format:Unknown
|
||||
169: TypePointer UniformConstant 168
|
||||
170(g_tTex1di4a): 169(ptr) Variable UniformConstant
|
||||
171: TypeImage 13(int) 1D array sampled format:Unknown
|
||||
172: TypePointer UniformConstant 171
|
||||
173(g_tTex1du4a): 172(ptr) Variable UniformConstant
|
||||
174: TypeImage 20(float) 2D array sampled format:Unknown
|
||||
175: TypePointer UniformConstant 174
|
||||
176(g_tTex2df4a): 175(ptr) Variable UniformConstant
|
||||
177: TypeImage 6(int) 2D array sampled format:Unknown
|
||||
178: TypePointer UniformConstant 177
|
||||
179(g_tTex2di4a): 178(ptr) Variable UniformConstant
|
||||
180: TypeImage 13(int) 2D array sampled format:Unknown
|
||||
181: TypePointer UniformConstant 180
|
||||
182(g_tTex2du4a): 181(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
60(r00): 22(ptr) Variable Function
|
||||
65(r01): 8(ptr) Variable Function
|
||||
73(r02): 15(ptr) Variable Function
|
||||
81(r10): 22(ptr) Variable Function
|
||||
91(r11): 8(ptr) Variable Function
|
||||
99(r12): 15(ptr) Variable Function
|
||||
107(r20): 22(ptr) Variable Function
|
||||
117(r21): 8(ptr) Variable Function
|
||||
125(r22): 15(ptr) Variable Function
|
||||
137(param): 22(ptr) Variable Function
|
||||
143(param): 8(ptr) Variable Function
|
||||
149(param): 15(ptr) Variable Function
|
||||
153(psout): 152(ptr) Variable Function
|
||||
54: 51 Load 53(g_tTex1df4)
|
||||
57: 56(ptr) AccessChain 43 55
|
||||
58: 6(int) Load 57
|
||||
59: 21(fvec4) ImageFetch 54 58 Lod 55
|
||||
61: 51 Load 53(g_tTex1df4)
|
||||
62: 56(ptr) AccessChain 43 55
|
||||
63: 6(int) Load 62
|
||||
64: 21(fvec4) ImageFetch 61 63 Lod 55
|
||||
Store 60(r00) 64
|
||||
69: 66 Load 68(g_tTex1di4)
|
||||
70: 56(ptr) AccessChain 43 55
|
||||
71: 6(int) Load 70
|
||||
72: 7(ivec4) ImageFetch 69 71 Lod 55
|
||||
Store 65(r01) 72
|
||||
77: 74 Load 76(g_tTex1du4)
|
||||
78: 56(ptr) AccessChain 43 55
|
||||
79: 6(int) Load 78
|
||||
80: 14(ivec4) ImageFetch 77 79 Lod 55
|
||||
Store 73(r02) 80
|
||||
85: 82 Load 84(g_tTex2df4)
|
||||
88: 87(ptr) AccessChain 43 86
|
||||
89: 39(ivec2) Load 88
|
||||
90: 21(fvec4) ImageFetch 85 89 Lod 55
|
||||
Store 81(r10) 90
|
||||
95: 92 Load 94(g_tTex2di4)
|
||||
96: 87(ptr) AccessChain 43 86
|
||||
97: 39(ivec2) Load 96
|
||||
98: 7(ivec4) ImageFetch 95 97 Lod 55
|
||||
Store 91(r11) 98
|
||||
103: 100 Load 102(g_tTex2du4)
|
||||
104: 87(ptr) AccessChain 43 86
|
||||
105: 39(ivec2) Load 104
|
||||
106: 14(ivec4) ImageFetch 103 105 Lod 55
|
||||
Store 99(r12) 106
|
||||
111: 108 Load 110(g_tTex3df4)
|
||||
114: 113(ptr) AccessChain 43 112
|
||||
115: 40(ivec3) Load 114
|
||||
116: 21(fvec4) ImageFetch 111 115 Lod 55
|
||||
Store 107(r20) 116
|
||||
121: 118 Load 120(g_tTex3di4)
|
||||
122: 113(ptr) AccessChain 43 112
|
||||
123: 40(ivec3) Load 122
|
||||
124: 7(ivec4) ImageFetch 121 123 Lod 55
|
||||
Store 117(r21) 124
|
||||
129: 126 Load 128(g_tTex3du4)
|
||||
130: 113(ptr) AccessChain 43 112
|
||||
131: 40(ivec3) Load 130
|
||||
132: 14(ivec4) ImageFetch 129 131 Lod 55
|
||||
Store 125(r22) 132
|
||||
133: 51 Load 53(g_tTex1df4)
|
||||
134: 56(ptr) AccessChain 43 55
|
||||
135: 6(int) Load 134
|
||||
136: 21(fvec4) ImageFetch 133 135 Lod 55
|
||||
Store 137(param) 136
|
||||
138: 21(fvec4) FunctionCall 25(Fn1(vf4;) 137(param)
|
||||
139: 66 Load 68(g_tTex1di4)
|
||||
140: 56(ptr) AccessChain 43 55
|
||||
141: 6(int) Load 140
|
||||
142: 7(ivec4) ImageFetch 139 141 Lod 55
|
||||
Store 143(param) 142
|
||||
144: 7(ivec4) FunctionCall 11(Fn1(vi4;) 143(param)
|
||||
145: 74 Load 76(g_tTex1du4)
|
||||
146: 56(ptr) AccessChain 43 55
|
||||
147: 6(int) Load 146
|
||||
148: 14(ivec4) ImageFetch 145 147 Lod 55
|
||||
Store 149(param) 148
|
||||
150: 14(ivec4) FunctionCall 18(Fn1(vu4;) 149(param)
|
||||
156: 22(ptr) AccessChain 153(psout) 55
|
||||
Store 156 155
|
||||
159: 22(ptr) AccessChain 153(psout) 55
|
||||
160: 21(fvec4) Load 159
|
||||
Store 158(Color) 160
|
||||
Return
|
||||
FunctionEnd
|
||||
11(Fn1(vi4;): 7(ivec4) Function None 9
|
||||
10(x): 8(ptr) FunctionParameter
|
||||
12: Label
|
||||
30: 7(ivec4) Load 10(x)
|
||||
ReturnValue 30
|
||||
FunctionEnd
|
||||
18(Fn1(vu4;): 14(ivec4) Function None 16
|
||||
17(x): 15(ptr) FunctionParameter
|
||||
19: Label
|
||||
33: 14(ivec4) Load 17(x)
|
||||
ReturnValue 33
|
||||
FunctionEnd
|
||||
25(Fn1(vf4;): 21(fvec4) Function None 23
|
||||
24(x): 22(ptr) FunctionParameter
|
||||
26: Label
|
||||
36: 21(fvec4) Load 24(x)
|
||||
ReturnValue 36
|
||||
FunctionEnd
|
||||
28(SomeValue(): 21(fvec4) Function None 27
|
||||
29: Label
|
||||
46: 45(ptr) AccessChain 43 44
|
||||
47: 7(ivec4) Load 46
|
||||
48: 21(fvec4) ConvertSToF 47
|
||||
ReturnValue 48
|
||||
FunctionEnd
|
@ -74,7 +74,7 @@ PS_OUTPUT main()
|
||||
|
||||
// Test as L-values
|
||||
// 1D
|
||||
g_tTex1df4[c1] = SomeValue(); // complex L-value
|
||||
g_tTex1df4[c1] = SomeValue(); // complex R-value
|
||||
g_tTex1df4[c1] = lf4;
|
||||
g_tTex1di4[c1] = int4(2,2,3,4);
|
||||
g_tTex1du4[c1] = uint4(3,2,3,4);
|
||||
@ -103,7 +103,7 @@ PS_OUTPUT main()
|
||||
g_tTex3di4[c3] = int4(8,6,7,8);
|
||||
g_tTex3du4[c3] = uint4(9,2,3,4);
|
||||
|
||||
// // Test function calling
|
||||
// Test function calling
|
||||
Fn1(g_tTex1df4[c1]); // in
|
||||
Fn1(g_tTex1di4[c1]); // in
|
||||
Fn1(g_tTex1du4[c1]); // in
|
||||
@ -131,6 +131,9 @@ PS_OUTPUT main()
|
||||
g_tTex1di4[c1]++;
|
||||
g_tTex1du4[c1]--;
|
||||
|
||||
// read and write
|
||||
g_tTex1df4[1] = g_tTex2df4[int2(2,3)];
|
||||
|
||||
psout.Color = 1.0;
|
||||
|
||||
return psout;
|
||||
|
73
Test/hlsl.tx.bracket.frag
Normal file
73
Test/hlsl.tx.bracket.frag
Normal file
@ -0,0 +1,73 @@
|
||||
SamplerState g_sSamp : register(s0);
|
||||
|
||||
Texture1D <float4> g_tTex1df4 : register(t0);
|
||||
Texture1D <int4> g_tTex1di4;
|
||||
Texture1D <uint4> g_tTex1du4;
|
||||
|
||||
Texture2D <float4> g_tTex2df4;
|
||||
Texture2D <int4> g_tTex2di4;
|
||||
Texture2D <uint4> g_tTex2du4;
|
||||
|
||||
Texture3D <float4> g_tTex3df4;
|
||||
Texture3D <int4> g_tTex3di4;
|
||||
Texture3D <uint4> g_tTex3du4;
|
||||
|
||||
Texture1DArray <float4> g_tTex1df4a;
|
||||
Texture1DArray <int4> g_tTex1di4a;
|
||||
Texture1DArray <uint4> g_tTex1du4a;
|
||||
|
||||
Texture2DArray <float4> g_tTex2df4a;
|
||||
Texture2DArray <int4> g_tTex2di4a;
|
||||
Texture2DArray <uint4> g_tTex2du4a;
|
||||
|
||||
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;
|
||||
|
||||
int4 Fn1(in int4 x) { return x; }
|
||||
uint4 Fn1(in uint4 x) { return x; }
|
||||
float4 Fn1(in float4 x) { return x; }
|
||||
|
||||
float4 SomeValue() { return c4; }
|
||||
|
||||
PS_OUTPUT main()
|
||||
{
|
||||
PS_OUTPUT psout;
|
||||
|
||||
// 1D
|
||||
g_tTex1df4[c1];
|
||||
|
||||
float4 r00 = g_tTex1df4[c1];
|
||||
int4 r01 = g_tTex1di4[c1];
|
||||
uint4 r02 = g_tTex1du4[c1];
|
||||
|
||||
// 2D
|
||||
float4 r10 = g_tTex2df4[c2];
|
||||
int4 r11 = g_tTex2di4[c2];
|
||||
uint4 r12 = g_tTex2du4[c2];
|
||||
|
||||
// 3D
|
||||
float4 r20 = g_tTex3df4[c3];
|
||||
int4 r21 = g_tTex3di4[c3];
|
||||
uint4 r22 = g_tTex3du4[c3];
|
||||
|
||||
// Test function calling
|
||||
Fn1(g_tTex1df4[c1]); // in
|
||||
Fn1(g_tTex1di4[c1]); // in
|
||||
Fn1(g_tTex1du4[c1]); // in
|
||||
|
||||
psout.Color = 1.0;
|
||||
|
||||
return psout;
|
||||
}
|
@ -2046,8 +2046,9 @@ bool TIntermBinary::promote()
|
||||
break;
|
||||
|
||||
case EOpVectorTimesScalarAssign:
|
||||
if (left->isVector() && right->isScalar())
|
||||
return true;
|
||||
if (!left->isVector() || !right->isScalar())
|
||||
return false;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
@ -2069,6 +2070,7 @@ bool TIntermBinary::promote()
|
||||
case EOpExclusiveOrAssign:
|
||||
case EOpLeftShiftAssign:
|
||||
case EOpRightShiftAssign:
|
||||
case EOpVectorTimesScalarAssign:
|
||||
if (getType() != left->getType())
|
||||
return false;
|
||||
break;
|
||||
|
@ -191,6 +191,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
{"hlsl.switch.frag", "PixelShaderFunction"},
|
||||
{"hlsl.swizzle.frag", "PixelShaderFunction"},
|
||||
{"hlsl.templatetypes.frag", "PixelShaderFunction"},
|
||||
{"hlsl.tx.bracket.frag", "main"},
|
||||
{"hlsl.typedef.frag", "PixelShaderFunction"},
|
||||
{"hlsl.whileLoop.frag", "PixelShaderFunction"},
|
||||
{"hlsl.void.frag", "PixelShaderFunction"},
|
||||
|
@ -1948,7 +1948,7 @@ bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node)
|
||||
return true;
|
||||
|
||||
node = intermediate.addUnaryMath(unaryOp, node, loc);
|
||||
node = parseContext.handleLvalue(loc, "", node);
|
||||
node = parseContext.handleLvalue(loc, "unary operator", node);
|
||||
|
||||
return node != nullptr;
|
||||
}
|
||||
@ -2064,7 +2064,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
|
||||
case EOpPostDecrement:
|
||||
// DEC_OP
|
||||
node = intermediate.addUnaryMath(postOp, node, loc);
|
||||
node = parseContext.handleLvalue(loc, "", node);
|
||||
node = parseContext.handleLvalue(loc, "unary operator", node);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
|
@ -130,6 +130,10 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner&
|
||||
return numErrors == 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Return true if this l-value node should be converted in some manner.
|
||||
// For instance: turning a load aggregate into a store in an l-value.
|
||||
//
|
||||
bool HlslParseContext::shouldConvertLValue(const TIntermNode* node) const
|
||||
{
|
||||
if (node == nullptr)
|
||||
@ -177,6 +181,9 @@ bool HlslParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, T
|
||||
//
|
||||
TIntermTyped* HlslParseContext::handleLvalue(const TSourceLoc& loc, const char* op, TIntermTyped* node)
|
||||
{
|
||||
if (node == nullptr)
|
||||
return nullptr;
|
||||
|
||||
TIntermBinary* nodeAsBinary = node->getAsBinaryNode();
|
||||
TIntermUnary* nodeAsUnary = node->getAsUnaryNode();
|
||||
TIntermAggregate* sequence = nullptr;
|
||||
@ -571,12 +578,18 @@ TIntermTyped* HlslParseContext::handleBracketOperator(const TSourceLoc& loc, TIn
|
||||
const TSampler& sampler = base->getType().getSampler();
|
||||
if (sampler.isImage() || sampler.isTexture()) {
|
||||
const int vecSize = 4; // TODO: handle arbitrary sizes (get from qualifier)
|
||||
TIntermAggregate* load = new TIntermAggregate(EOpImageLoad);
|
||||
TIntermAggregate* load = new TIntermAggregate(sampler.isImage() ? EOpImageLoad : EOpTextureFetch);
|
||||
|
||||
load->setType(TType(sampler.type, EvqTemporary, vecSize));
|
||||
load->setLoc(loc);
|
||||
load->getSequence().push_back(base);
|
||||
load->getSequence().push_back(index);
|
||||
|
||||
// Textures need a MIP. First indirection is always to mip 0. If there's another, we'll add it
|
||||
// later.
|
||||
if (sampler.isTexture())
|
||||
load->getSequence().push_back(intermediate.addConstantUnion(0, loc, true));
|
||||
|
||||
return load;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user