Parser: Some function prototypes of interpolateAtXXX are incorrect.

This commit is contained in:
Rex Xu 2016-10-10 15:38:15 +08:00
parent 19bdf90eba
commit 4c25709f45
3 changed files with 107 additions and 108 deletions

View File

@ -7,7 +7,7 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 535
// Id's are bound by 534
Capability Shader
Capability Float16
@ -81,77 +81,77 @@ Linked fragment stage:
Name 445 "f16v2"
Name 463 "f16v"
Name 465 "if16v"
Name 515 "S"
MemberName 515(S) 0 "x"
MemberName 515(S) 1 "y"
MemberName 515(S) 2 "z"
Name 517 "B1"
MemberName 517(B1) 0 "a"
MemberName 517(B1) 1 "b"
MemberName 517(B1) 2 "c"
MemberName 517(B1) 3 "d"
MemberName 517(B1) 4 "e"
MemberName 517(B1) 5 "f"
MemberName 517(B1) 6 "g"
MemberName 517(B1) 7 "h"
Name 519 ""
Name 522 "S"
MemberName 522(S) 0 "x"
MemberName 522(S) 1 "y"
MemberName 522(S) 2 "z"
Name 524 "B2"
MemberName 524(B2) 0 "o"
MemberName 524(B2) 1 "p"
MemberName 524(B2) 2 "q"
MemberName 524(B2) 3 "r"
MemberName 524(B2) 4 "s"
MemberName 524(B2) 5 "t"
MemberName 524(B2) 6 "u"
MemberName 524(B2) 7 "v"
Name 526 ""
Decorate 513 ArrayStride 16
Decorate 514 ArrayStride 32
MemberDecorate 515(S) 0 Offset 0
MemberDecorate 515(S) 1 Offset 4
MemberDecorate 515(S) 2 Offset 8
Decorate 516 ArrayStride 16
MemberDecorate 517(B1) 0 Offset 0
MemberDecorate 517(B1) 1 Offset 4
MemberDecorate 517(B1) 2 Offset 8
MemberDecorate 517(B1) 3 Offset 16
MemberDecorate 517(B1) 4 ColMajor
MemberDecorate 517(B1) 4 Offset 48
MemberDecorate 517(B1) 4 MatrixStride 16
MemberDecorate 517(B1) 5 ColMajor
MemberDecorate 517(B1) 5 Offset 80
MemberDecorate 517(B1) 5 MatrixStride 16
MemberDecorate 517(B1) 6 Offset 144
MemberDecorate 517(B1) 7 Offset 160
Decorate 517(B1) Block
Decorate 519 DescriptorSet 0
Decorate 520 ArrayStride 2
Decorate 521 ArrayStride 12
MemberDecorate 522(S) 0 Offset 0
MemberDecorate 522(S) 1 Offset 4
MemberDecorate 522(S) 2 Offset 8
Decorate 523 ArrayStride 16
MemberDecorate 524(B2) 0 Offset 0
MemberDecorate 524(B2) 1 Offset 4
MemberDecorate 524(B2) 2 Offset 8
MemberDecorate 524(B2) 3 Offset 14
MemberDecorate 524(B2) 4 RowMajor
MemberDecorate 524(B2) 4 Offset 20
MemberDecorate 524(B2) 4 MatrixStride 4
MemberDecorate 524(B2) 5 RowMajor
MemberDecorate 524(B2) 5 Offset 32
MemberDecorate 524(B2) 5 MatrixStride 4
MemberDecorate 524(B2) 6 Offset 56
MemberDecorate 524(B2) 7 Offset 72
Decorate 524(B2) BufferBlock
Decorate 526 DescriptorSet 0
Decorate 527 SpecId 100
Decorate 528 SpecId 101
Decorate 529 SpecId 102
Name 514 "S"
MemberName 514(S) 0 "x"
MemberName 514(S) 1 "y"
MemberName 514(S) 2 "z"
Name 516 "B1"
MemberName 516(B1) 0 "a"
MemberName 516(B1) 1 "b"
MemberName 516(B1) 2 "c"
MemberName 516(B1) 3 "d"
MemberName 516(B1) 4 "e"
MemberName 516(B1) 5 "f"
MemberName 516(B1) 6 "g"
MemberName 516(B1) 7 "h"
Name 518 ""
Name 521 "S"
MemberName 521(S) 0 "x"
MemberName 521(S) 1 "y"
MemberName 521(S) 2 "z"
Name 523 "B2"
MemberName 523(B2) 0 "o"
MemberName 523(B2) 1 "p"
MemberName 523(B2) 2 "q"
MemberName 523(B2) 3 "r"
MemberName 523(B2) 4 "s"
MemberName 523(B2) 5 "t"
MemberName 523(B2) 6 "u"
MemberName 523(B2) 7 "v"
Name 525 ""
Decorate 512 ArrayStride 16
Decorate 513 ArrayStride 32
MemberDecorate 514(S) 0 Offset 0
MemberDecorate 514(S) 1 Offset 4
MemberDecorate 514(S) 2 Offset 8
Decorate 515 ArrayStride 16
MemberDecorate 516(B1) 0 Offset 0
MemberDecorate 516(B1) 1 Offset 4
MemberDecorate 516(B1) 2 Offset 8
MemberDecorate 516(B1) 3 Offset 16
MemberDecorate 516(B1) 4 ColMajor
MemberDecorate 516(B1) 4 Offset 48
MemberDecorate 516(B1) 4 MatrixStride 16
MemberDecorate 516(B1) 5 ColMajor
MemberDecorate 516(B1) 5 Offset 80
MemberDecorate 516(B1) 5 MatrixStride 16
MemberDecorate 516(B1) 6 Offset 144
MemberDecorate 516(B1) 7 Offset 160
Decorate 516(B1) Block
Decorate 518 DescriptorSet 0
Decorate 519 ArrayStride 2
Decorate 520 ArrayStride 12
MemberDecorate 521(S) 0 Offset 0
MemberDecorate 521(S) 1 Offset 4
MemberDecorate 521(S) 2 Offset 8
Decorate 522 ArrayStride 16
MemberDecorate 523(B2) 0 Offset 0
MemberDecorate 523(B2) 1 Offset 4
MemberDecorate 523(B2) 2 Offset 8
MemberDecorate 523(B2) 3 Offset 14
MemberDecorate 523(B2) 4 RowMajor
MemberDecorate 523(B2) 4 Offset 20
MemberDecorate 523(B2) 4 MatrixStride 4
MemberDecorate 523(B2) 5 RowMajor
MemberDecorate 523(B2) 5 Offset 32
MemberDecorate 523(B2) 5 MatrixStride 4
MemberDecorate 523(B2) 6 Offset 56
MemberDecorate 523(B2) 7 Offset 72
Decorate 523(B2) BufferBlock
Decorate 525 DescriptorSet 0
Decorate 526 SpecId 100
Decorate 527 SpecId 101
Decorate 528 SpecId 102
2: TypeVoid
3: TypeFunction 2
28: TypeFloat 16
@ -210,32 +210,31 @@ Linked fragment stage:
465(if16v): 464(ptr) Variable Input
466: TypePointer Input 28(float)
503: 183(int) Constant 1
508: TypeVector 164(float) 2
509: 164(float) Constant 1056964608
510: 508(fvec2) ConstantComposite 509 509
512: 33(int) Constant 2
513: TypeArray 28(float) 512
514: TypeArray 406 512
515(S): TypeStruct 28(float) 29(fvec2) 151(fvec3)
516: TypeArray 515(S) 512
517(B1): TypeStruct 28(float) 29(fvec2) 151(fvec3) 513 406 514 515(S) 516
518: TypePointer Uniform 517(B1)
519: 518(ptr) Variable Uniform
520: TypeArray 28(float) 512
521: TypeArray 406 512
522(S): TypeStruct 28(float) 29(fvec2) 151(fvec3)
523: TypeArray 522(S) 512
524(B2): TypeStruct 28(float) 29(fvec2) 151(fvec3) 520 406 521 522(S) 523
525: TypePointer Uniform 524(B2)
526: 525(ptr) Variable Uniform
527: 28(float) SpecConstant 12288
528: 164(float) SpecConstant 1048576000
529: 172(float) SpecConstant 0 1071644672
530: 164(float) SpecConstantOp 115 527
531: 164(float) SpecConstantOp 115 527
532: 172(float) SpecConstantOp 115 531
508: 28(float) Constant 14336
509: 29(fvec2) ConstantComposite 508 508
511: 33(int) Constant 2
512: TypeArray 28(float) 511
513: TypeArray 406 511
514(S): TypeStruct 28(float) 29(fvec2) 151(fvec3)
515: TypeArray 514(S) 511
516(B1): TypeStruct 28(float) 29(fvec2) 151(fvec3) 512 406 513 514(S) 515
517: TypePointer Uniform 516(B1)
518: 517(ptr) Variable Uniform
519: TypeArray 28(float) 511
520: TypeArray 406 511
521(S): TypeStruct 28(float) 29(fvec2) 151(fvec3)
522: TypeArray 521(S) 511
523(B2): TypeStruct 28(float) 29(fvec2) 151(fvec3) 519 406 520 521(S) 522
524: TypePointer Uniform 523(B2)
525: 524(ptr) Variable Uniform
526: 28(float) SpecConstant 12288
527: 164(float) SpecConstant 1048576000
528: 172(float) SpecConstant 0 1071644672
529: 164(float) SpecConstantOp 115 526
530: 164(float) SpecConstantOp 115 526
531: 172(float) SpecConstantOp 115 530
532: 28(float) SpecConstantOp 115 527
533: 28(float) SpecConstantOp 115 528
534: 28(float) SpecConstantOp 115 529
4(main): 2 Function None 3
5: Label
Return
@ -831,7 +830,7 @@ Linked fragment stage:
506: 151(fvec3) Load 463(f16v)
507: 151(fvec3) VectorShuffle 506 505 3 4 2
Store 463(f16v) 507
511: 151(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 465(if16v) 510
Store 463(f16v) 511
510: 151(fvec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 465(if16v) 509
Store 463(f16v) 510
Return
FunctionEnd

View File

@ -302,5 +302,5 @@ void builtinFragProcFuncs()
// Interpolation
f16v.x = interpolateAtCentroid(if16v.x);
f16v.xy = interpolateAtSample(if16v.xy, 1);
f16v = interpolateAtOffset(if16v, vec2(0.5));
f16v = interpolateAtOffset(if16v, f16vec2(0.5hf));
}

View File

@ -2336,10 +2336,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"uvec3 interpolateAtVertexAMD(uvec3, uint);"
"uvec4 interpolateAtVertexAMD(uvec4, uint);"
"uint interpolateAtVertexAMD(float16_t, uint);"
"uvec2 interpolateAtVertexAMD(f16vec2, uint);"
"uvec3 interpolateAtVertexAMD(f16vec3, uint);"
"uvec4 interpolateAtVertexAMD(f16vec4, uint);"
"float16_t interpolateAtVertexAMD(float16_t, uint);"
"f16vec2 interpolateAtVertexAMD(f16vec2, uint);"
"f16vec3 interpolateAtVertexAMD(f16vec3, uint);"
"f16vec4 interpolateAtVertexAMD(f16vec4, uint);"
"\n");
}
@ -2402,10 +2402,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"f16vec3 interpolateAtSample(f16vec3, int);"
"f16vec4 interpolateAtSample(f16vec4, int);"
"float16_t interpolateAtOffset(float16_t, vec2);"
"f16vec2 interpolateAtOffset(f16vec2, vec2);"
"f16vec3 interpolateAtOffset(f16vec3, vec2);"
"f16vec4 interpolateAtOffset(f16vec4, vec2);"
"float16_t interpolateAtOffset(float16_t, f16vec2);"
"f16vec2 interpolateAtOffset(f16vec2, f16vec2);"
"f16vec3 interpolateAtOffset(f16vec3, f16vec2);"
"f16vec4 interpolateAtOffset(f16vec4, f16vec2);"
"\n");
}