HLSL: Fix 1201: Accept 'layout' as an identifier.
This commit is contained in:
parent
046bae0bab
commit
fd1e8a78a8
@ -6,23 +6,33 @@ gl_FragCoord origin is upper left
|
|||||||
0:16 Function Parameters:
|
0:16 Function Parameters:
|
||||||
0:16 'input' ( in 4-component vector of float)
|
0:16 'input' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:17 Branch: Return with expression
|
0:17 Sequence
|
||||||
0:17 add ( temp 4-component vector of float)
|
0:17 move second child to first child ( temp 4-component vector of float)
|
||||||
0:17 add ( temp 4-component vector of float)
|
0:17 'layout' ( temp 4-component vector of float)
|
||||||
0:17 add ( temp 4-component vector of float)
|
0:17 Constant:
|
||||||
0:17 'input' ( in 4-component vector of float)
|
0:17 2.000000
|
||||||
0:17 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
0:17 2.000000
|
||||||
0:17 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
0:17 2.000000
|
||||||
0:17 Constant:
|
0:17 2.000000
|
||||||
0:17 0 (const uint)
|
0:18 Branch: Return with expression
|
||||||
0:17 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float)
|
0:18 add ( temp 4-component vector of float)
|
||||||
0:17 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
0:18 add ( temp 4-component vector of float)
|
||||||
0:17 Constant:
|
0:18 add ( temp 4-component vector of float)
|
||||||
0:17 0 (const uint)
|
0:18 'input' ( in 4-component vector of float)
|
||||||
0:17 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
0:18 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||||
0:17 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
0:18 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||||
0:17 Constant:
|
0:18 Constant:
|
||||||
0:17 0 (const uint)
|
0:18 0 (const uint)
|
||||||
|
0:18 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float)
|
||||||
|
0:18 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||||
|
0:18 Constant:
|
||||||
|
0:18 0 (const uint)
|
||||||
|
0:18 component-wise multiply ( temp 4-component vector of float)
|
||||||
|
0:18 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||||
|
0:18 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||||
|
0:18 Constant:
|
||||||
|
0:18 0 (const uint)
|
||||||
|
0:18 'layout' ( temp 4-component vector of float)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||||
0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||||
@ -42,23 +52,33 @@ gl_FragCoord origin is upper left
|
|||||||
0:16 Function Parameters:
|
0:16 Function Parameters:
|
||||||
0:16 'input' ( in 4-component vector of float)
|
0:16 'input' ( in 4-component vector of float)
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:17 Branch: Return with expression
|
0:17 Sequence
|
||||||
0:17 add ( temp 4-component vector of float)
|
0:17 move second child to first child ( temp 4-component vector of float)
|
||||||
0:17 add ( temp 4-component vector of float)
|
0:17 'layout' ( temp 4-component vector of float)
|
||||||
0:17 add ( temp 4-component vector of float)
|
0:17 Constant:
|
||||||
0:17 'input' ( in 4-component vector of float)
|
0:17 2.000000
|
||||||
0:17 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
0:17 2.000000
|
||||||
0:17 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
0:17 2.000000
|
||||||
0:17 Constant:
|
0:17 2.000000
|
||||||
0:17 0 (const uint)
|
0:18 Branch: Return with expression
|
||||||
0:17 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float)
|
0:18 add ( temp 4-component vector of float)
|
||||||
0:17 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
0:18 add ( temp 4-component vector of float)
|
||||||
0:17 Constant:
|
0:18 add ( temp 4-component vector of float)
|
||||||
0:17 0 (const uint)
|
0:18 'input' ( in 4-component vector of float)
|
||||||
0:17 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
0:18 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||||
0:17 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
0:18 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||||
0:17 Constant:
|
0:18 Constant:
|
||||||
0:17 0 (const uint)
|
0:18 0 (const uint)
|
||||||
|
0:18 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float)
|
||||||
|
0:18 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||||
|
0:18 Constant:
|
||||||
|
0:18 0 (const uint)
|
||||||
|
0:18 component-wise multiply ( temp 4-component vector of float)
|
||||||
|
0:18 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float)
|
||||||
|
0:18 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout})
|
||||||
|
0:18 Constant:
|
||||||
|
0:18 0 (const uint)
|
||||||
|
0:18 'layout' ( temp 4-component vector of float)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1})
|
||||||
0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5})
|
||||||
@ -68,7 +88,7 @@ gl_FragCoord origin is upper left
|
|||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80003
|
// Generated by (magic number): 80003
|
||||||
// Id's are bound by 39
|
// Id's are bound by 44
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
@ -79,50 +99,53 @@ gl_FragCoord origin is upper left
|
|||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 11 "PixelShaderFunction(vf4;"
|
Name 11 "PixelShaderFunction(vf4;"
|
||||||
Name 10 "input"
|
Name 10 "input"
|
||||||
Name 14 "tbufName"
|
Name 13 "layout"
|
||||||
MemberName 14(tbufName) 0 "v1"
|
Name 17 "tbufName"
|
||||||
Name 16 ""
|
MemberName 17(tbufName) 0 "v1"
|
||||||
Name 23 "tbufName2"
|
Name 19 ""
|
||||||
MemberName 23(tbufName2) 0 "v5"
|
Name 26 "tbufName2"
|
||||||
Name 25 ""
|
MemberName 26(tbufName2) 0 "v5"
|
||||||
Name 30 "tbufName2"
|
Name 28 ""
|
||||||
MemberName 30(tbufName2) 0 "v1PostLayout"
|
Name 33 "tbufName2"
|
||||||
Name 32 ""
|
MemberName 33(tbufName2) 0 "v1PostLayout"
|
||||||
Name 38 "specConst"
|
Name 35 ""
|
||||||
MemberDecorate 14(tbufName) 0 NonWritable
|
Name 43 "specConst"
|
||||||
MemberDecorate 14(tbufName) 0 Offset 16
|
MemberDecorate 17(tbufName) 0 NonWritable
|
||||||
Decorate 14(tbufName) BufferBlock
|
MemberDecorate 17(tbufName) 0 Offset 16
|
||||||
Decorate 16 DescriptorSet 3
|
Decorate 17(tbufName) BufferBlock
|
||||||
Decorate 16 Binding 5
|
Decorate 19 DescriptorSet 3
|
||||||
MemberDecorate 23(tbufName2) 0 NonWritable
|
Decorate 19 Binding 5
|
||||||
MemberDecorate 23(tbufName2) 0 Offset 0
|
MemberDecorate 26(tbufName2) 0 NonWritable
|
||||||
Decorate 23(tbufName2) BufferBlock
|
MemberDecorate 26(tbufName2) 0 Offset 0
|
||||||
MemberDecorate 30(tbufName2) 0 NonWritable
|
Decorate 26(tbufName2) BufferBlock
|
||||||
MemberDecorate 30(tbufName2) 0 Offset 16
|
MemberDecorate 33(tbufName2) 0 NonWritable
|
||||||
Decorate 30(tbufName2) BufferBlock
|
MemberDecorate 33(tbufName2) 0 Offset 16
|
||||||
Decorate 32 DescriptorSet 4
|
Decorate 33(tbufName2) BufferBlock
|
||||||
Decorate 32 Binding 7
|
Decorate 35 DescriptorSet 4
|
||||||
Decorate 38(specConst) SpecId 17
|
Decorate 35 Binding 7
|
||||||
|
Decorate 43(specConst) SpecId 17
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
7: TypeVector 6(float) 4
|
7: TypeVector 6(float) 4
|
||||||
8: TypePointer Function 7(fvec4)
|
8: TypePointer Function 7(fvec4)
|
||||||
9: TypeFunction 7(fvec4) 8(ptr)
|
9: TypeFunction 7(fvec4) 8(ptr)
|
||||||
14(tbufName): TypeStruct 7(fvec4)
|
14: 6(float) Constant 1073741824
|
||||||
15: TypePointer Uniform 14(tbufName)
|
15: 7(fvec4) ConstantComposite 14 14 14 14
|
||||||
16: 15(ptr) Variable Uniform
|
17(tbufName): TypeStruct 7(fvec4)
|
||||||
17: TypeInt 32 1
|
18: TypePointer Uniform 17(tbufName)
|
||||||
18: 17(int) Constant 0
|
19: 18(ptr) Variable Uniform
|
||||||
19: TypePointer Uniform 7(fvec4)
|
20: TypeInt 32 1
|
||||||
23(tbufName2): TypeStruct 7(fvec4)
|
21: 20(int) Constant 0
|
||||||
24: TypePointer PushConstant 23(tbufName2)
|
22: TypePointer Uniform 7(fvec4)
|
||||||
25: 24(ptr) Variable PushConstant
|
26(tbufName2): TypeStruct 7(fvec4)
|
||||||
26: TypePointer PushConstant 7(fvec4)
|
27: TypePointer PushConstant 26(tbufName2)
|
||||||
30(tbufName2): TypeStruct 7(fvec4)
|
28: 27(ptr) Variable PushConstant
|
||||||
31: TypePointer Uniform 30(tbufName2)
|
29: TypePointer PushConstant 7(fvec4)
|
||||||
32: 31(ptr) Variable Uniform
|
33(tbufName2): TypeStruct 7(fvec4)
|
||||||
38(specConst): 17(int) SpecConstant 10
|
34: TypePointer Uniform 33(tbufName2)
|
||||||
|
35: 34(ptr) Variable Uniform
|
||||||
|
43(specConst): 20(int) SpecConstant 10
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
Return
|
Return
|
||||||
@ -130,15 +153,19 @@ gl_FragCoord origin is upper left
|
|||||||
11(PixelShaderFunction(vf4;): 7(fvec4) Function None 9
|
11(PixelShaderFunction(vf4;): 7(fvec4) Function None 9
|
||||||
10(input): 8(ptr) FunctionParameter
|
10(input): 8(ptr) FunctionParameter
|
||||||
12: Label
|
12: Label
|
||||||
13: 7(fvec4) Load 10(input)
|
13(layout): 8(ptr) Variable Function
|
||||||
20: 19(ptr) AccessChain 16 18
|
Store 13(layout) 15
|
||||||
21: 7(fvec4) Load 20
|
16: 7(fvec4) Load 10(input)
|
||||||
22: 7(fvec4) FAdd 13 21
|
23: 22(ptr) AccessChain 19 21
|
||||||
27: 26(ptr) AccessChain 25 18
|
24: 7(fvec4) Load 23
|
||||||
28: 7(fvec4) Load 27
|
25: 7(fvec4) FAdd 16 24
|
||||||
29: 7(fvec4) FAdd 22 28
|
30: 29(ptr) AccessChain 28 21
|
||||||
33: 19(ptr) AccessChain 32 18
|
31: 7(fvec4) Load 30
|
||||||
34: 7(fvec4) Load 33
|
32: 7(fvec4) FAdd 25 31
|
||||||
35: 7(fvec4) FAdd 29 34
|
36: 22(ptr) AccessChain 35 21
|
||||||
ReturnValue 35
|
37: 7(fvec4) Load 36
|
||||||
|
38: 7(fvec4) Load 13(layout)
|
||||||
|
39: 7(fvec4) FMul 37 38
|
||||||
|
40: 7(fvec4) FAdd 32 39
|
||||||
|
ReturnValue 40
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -14,5 +14,6 @@ tbuffer tbufName2 : layout(set=4,binding=7) {
|
|||||||
|
|
||||||
float4 PixelShaderFunction(float4 input) : COLOR0
|
float4 PixelShaderFunction(float4 input) : COLOR0
|
||||||
{
|
{
|
||||||
return input + v1 + v5 + v1PostLayout;
|
float4 layout = 2.0;
|
||||||
|
return input + v1 + v5 + v1PostLayout * layout;
|
||||||
}
|
}
|
||||||
|
@ -4077,6 +4077,7 @@ const char* HlslGrammar::getTypeString(EHlslTokenClass tokenClass) const
|
|||||||
case EHTokMin16int: return "min16int";
|
case EHTokMin16int: return "min16int";
|
||||||
case EHTokMin12int: return "min12int";
|
case EHTokMin12int: return "min12int";
|
||||||
case EHTokConstantBuffer: return "ConstantBuffer";
|
case EHTokConstantBuffer: return "ConstantBuffer";
|
||||||
|
case EHTokLayout: return "layout";
|
||||||
default:
|
default:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user