Fix validation failures of test cases regarding GL_EXT_spirv_intrinsics
1. The test cases of OpReadClockKHR is invalid. The return type is unsigned integer rather than signed integer. 2. When SPIR-V decorate or SPIR-V type is specified, we should avoid auto location mapping because the semantics are totally decided by SPIR-V tokens.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
spv.intrinsicsSpirvDecorate.frag
|
||||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 43
|
||||
@@ -28,19 +27,12 @@ Validation failed
|
||||
Decorate 10(floatIn) Location 0
|
||||
Decorate 10(floatIn) ExplicitInterpAMD
|
||||
Decorate 18(vec2Out) Location 1
|
||||
Decorate 20(gl_BaryCoordNoPerspAMD) Location 0
|
||||
Decorate 20(gl_BaryCoordNoPerspAMD) BuiltIn BaryCoordNoPerspAMD
|
||||
Decorate 22(gl_BaryCoordNoPerspCentroidAMD) Location 1
|
||||
Decorate 22(gl_BaryCoordNoPerspCentroidAMD) BuiltIn BaryCoordNoPerspCentroidAMD
|
||||
Decorate 25(gl_BaryCoordNoPerspSampleAMD) Location 2
|
||||
Decorate 25(gl_BaryCoordNoPerspSampleAMD) BuiltIn BaryCoordNoPerspSampleAMD
|
||||
Decorate 28(gl_BaryCoordSmoothAMD) Location 3
|
||||
Decorate 28(gl_BaryCoordSmoothAMD) BuiltIn BaryCoordSmoothAMD
|
||||
Decorate 31(gl_BaryCoordSmoothCentroidAMD) Location 4
|
||||
Decorate 31(gl_BaryCoordSmoothCentroidAMD) BuiltIn BaryCoordSmoothCentroidAMD
|
||||
Decorate 34(gl_BaryCoordSmoothSampleAMD) Location 5
|
||||
Decorate 34(gl_BaryCoordSmoothSampleAMD) BuiltIn BaryCoordSmoothSampleAMD
|
||||
Decorate 39(gl_BaryCoordPullModelAMD) Location 6
|
||||
Decorate 39(gl_BaryCoordPullModelAMD) BuiltIn BaryCoordPullModelAMD
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
spv.intrinsicsSpirvExecutionMode.frag
|
||||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 12
|
||||
@@ -17,7 +16,6 @@ Validation failed
|
||||
Name 4 "main"
|
||||
Name 8 "gl_FragStencilRef"
|
||||
Name 10 "color"
|
||||
Decorate 8(gl_FragStencilRef) Location 0
|
||||
Decorate 8(gl_FragStencilRef) BuiltIn FragStencilRefEXT
|
||||
Decorate 10(color) Flat
|
||||
Decorate 10(color) Location 0
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
spv.intrinsicsSpirvInstruction.vert
|
||||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 30
|
||||
// Id's are bound by 32
|
||||
|
||||
Capability Shader
|
||||
Capability Int64
|
||||
@@ -10,50 +9,52 @@ Validation failed
|
||||
Extension "SPV_AMD_shader_trinary_minmax"
|
||||
Extension "SPV_KHR_shader_clock"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
28: ExtInstImport "SPV_AMD_shader_trinary_minmax"
|
||||
30: ExtInstImport "SPV_AMD_shader_trinary_minmax"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 9 13 18 21
|
||||
EntryPoint Vertex 4 "main" 9 15 20 23
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_ARB_gpu_shader_int64"
|
||||
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||
Name 4 "main"
|
||||
Name 9 "uvec2Out"
|
||||
Name 13 "i64Out"
|
||||
Name 18 "vec2Out"
|
||||
Name 21 "vec3In"
|
||||
Name 15 "u64Out"
|
||||
Name 20 "vec2Out"
|
||||
Name 23 "vec3In"
|
||||
Decorate 9(uvec2Out) Location 0
|
||||
Decorate 13(i64Out) Location 1
|
||||
Decorate 18(vec2Out) Location 2
|
||||
Decorate 21(vec3In) Location 0
|
||||
Decorate 15(u64Out) Location 1
|
||||
Decorate 20(vec2Out) Location 2
|
||||
Decorate 23(vec3In) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 2
|
||||
8: TypePointer Output 7(ivec2)
|
||||
9(uvec2Out): 8(ptr) Variable Output
|
||||
11: TypeInt 64 1
|
||||
12: TypePointer Output 11(int64_t)
|
||||
13(i64Out): 12(ptr) Variable Output
|
||||
15: TypeFloat 32
|
||||
16: TypeVector 15(float) 2
|
||||
17: TypePointer Output 16(fvec2)
|
||||
18(vec2Out): 17(ptr) Variable Output
|
||||
19: TypeVector 15(float) 3
|
||||
20: TypePointer Input 19(fvec3)
|
||||
21(vec3In): 20(ptr) Variable Input
|
||||
10: TypeInt 32 1
|
||||
11: 10(int) Constant 1
|
||||
13: TypeInt 64 0
|
||||
14: TypePointer Output 13(int64_t)
|
||||
15(u64Out): 14(ptr) Variable Output
|
||||
17: TypeFloat 32
|
||||
18: TypeVector 17(float) 2
|
||||
19: TypePointer Output 18(fvec2)
|
||||
20(vec2Out): 19(ptr) Variable Output
|
||||
21: TypeVector 17(float) 3
|
||||
22: TypePointer Input 21(fvec3)
|
||||
23(vec3In): 22(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
10: 7(ivec2) ReadClockKHR
|
||||
Store 9(uvec2Out) 10
|
||||
14: 11(int64_t) ReadClockKHR
|
||||
Store 13(i64Out) 14
|
||||
22: 19(fvec3) Load 21(vec3In)
|
||||
23: 16(fvec2) VectorShuffle 22 22 0 1
|
||||
24: 19(fvec3) Load 21(vec3In)
|
||||
25: 16(fvec2) VectorShuffle 24 24 1 2
|
||||
26: 19(fvec3) Load 21(vec3In)
|
||||
27: 16(fvec2) VectorShuffle 26 26 2 0
|
||||
29: 16(fvec2) ExtInst 28(SPV_AMD_shader_trinary_minmax) 1(FMin3AMD) 23 25 27
|
||||
Store 18(vec2Out) 29
|
||||
12: 7(ivec2) ReadClockKHR 11
|
||||
Store 9(uvec2Out) 12
|
||||
16: 13(int64_t) ReadClockKHR 11
|
||||
Store 15(u64Out) 16
|
||||
24: 21(fvec3) Load 23(vec3In)
|
||||
25: 18(fvec2) VectorShuffle 24 24 0 1
|
||||
26: 21(fvec3) Load 23(vec3In)
|
||||
27: 18(fvec2) VectorShuffle 26 26 1 2
|
||||
28: 21(fvec3) Load 23(vec3In)
|
||||
29: 18(fvec2) VectorShuffle 28 28 2 0
|
||||
31: 18(fvec2) ExtInst 30(SPV_AMD_shader_trinary_minmax) 1(FMin3AMD) 25 27 29
|
||||
Store 20(vec2Out) 31
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
spv.intrinsicsSpirvType.rgen
|
||||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 21
|
||||
@@ -17,7 +16,6 @@ Validation failed
|
||||
Name 4 "main"
|
||||
Name 8 "rq"
|
||||
Name 11 "as"
|
||||
Decorate 11(as) Location 0
|
||||
Decorate 11(as) DescriptorSet 0
|
||||
Decorate 11(as) Binding 0
|
||||
2: TypeVoid
|
||||
|
||||
Reference in New Issue
Block a user