Revert "GLSL: Fix #1279: refract does not have a double-type eta."

This reverts commit ebec909487.

Khronos decided glslang was originally correct, and the specifications
are incorrect.
This commit is contained in:
John Kessenich 2018-06-19 09:43:09 -06:00
parent bea08fe02a
commit 2a805d9cea
7 changed files with 674 additions and 678 deletions

View file

@ -1,7 +1,7 @@
spv.float64.frag
// Module Version 10300
// Generated by (magic number): 80007
// Id's are bound by 523
// Id's are bound by 521
Capability Shader
Capability Float16
@ -13,7 +13,7 @@ spv.float64.frag
Capability InterpolationFunction
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 461
EntryPoint Fragment 4 "main" 458
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_KHX_shader_explicit_arithmetic_types"
@ -67,63 +67,62 @@ spv.float64.frag
Name 372 "f64v1"
Name 376 "f64v2"
Name 382 "f64v3"
Name 399 "f"
Name 404 "f64m3"
Name 405 "f64m1"
Name 407 "f64m2"
Name 416 "f64v1"
Name 418 "f64v2"
Name 423 "f64m4"
Name 426 "f64"
Name 429 "f64m5"
Name 434 "f64m6"
Name 435 "f64m7"
Name 438 "bv"
Name 439 "f64v1"
Name 441 "f64v2"
Name 459 "f64v"
Name 461 "if64v"
Name 510 "S"
MemberName 510(S) 0 "x"
MemberName 510(S) 1 "y"
MemberName 510(S) 2 "z"
Name 512 "B1"
MemberName 512(B1) 0 "a"
MemberName 512(B1) 1 "b"
MemberName 512(B1) 2 "c"
MemberName 512(B1) 3 "d"
MemberName 512(B1) 4 "e"
MemberName 512(B1) 5 "f"
MemberName 512(B1) 6 "g"
MemberName 512(B1) 7 "h"
Name 514 ""
Name 515 "sf16"
Name 516 "sf"
Name 517 "sd"
Decorate 461(if64v) Flat
Decorate 508 ArrayStride 16
Decorate 509 ArrayStride 64
MemberDecorate 510(S) 0 Offset 0
MemberDecorate 510(S) 1 Offset 16
MemberDecorate 510(S) 2 Offset 32
Decorate 511 ArrayStride 64
MemberDecorate 512(B1) 0 Offset 0
MemberDecorate 512(B1) 1 Offset 16
MemberDecorate 512(B1) 2 Offset 32
MemberDecorate 512(B1) 3 Offset 64
MemberDecorate 512(B1) 4 ColMajor
MemberDecorate 512(B1) 4 Offset 96
MemberDecorate 512(B1) 4 MatrixStride 32
MemberDecorate 512(B1) 5 ColMajor
MemberDecorate 512(B1) 5 Offset 160
MemberDecorate 512(B1) 5 MatrixStride 32
MemberDecorate 512(B1) 6 Offset 288
MemberDecorate 512(B1) 7 Offset 352
Decorate 512(B1) Block
Decorate 514 DescriptorSet 0
Decorate 515(sf16) SpecId 100
Decorate 516(sf) SpecId 101
Decorate 517(sd) SpecId 102
Name 401 "f64m3"
Name 402 "f64m1"
Name 404 "f64m2"
Name 413 "f64v1"
Name 415 "f64v2"
Name 420 "f64m4"
Name 423 "f64"
Name 426 "f64m5"
Name 431 "f64m6"
Name 432 "f64m7"
Name 435 "bv"
Name 436 "f64v1"
Name 438 "f64v2"
Name 456 "f64v"
Name 458 "if64v"
Name 507 "S"
MemberName 507(S) 0 "x"
MemberName 507(S) 1 "y"
MemberName 507(S) 2 "z"
Name 509 "B1"
MemberName 509(B1) 0 "a"
MemberName 509(B1) 1 "b"
MemberName 509(B1) 2 "c"
MemberName 509(B1) 3 "d"
MemberName 509(B1) 4 "e"
MemberName 509(B1) 5 "f"
MemberName 509(B1) 6 "g"
MemberName 509(B1) 7 "h"
Name 511 ""
Name 512 "sf16"
Name 514 "sf"
Name 515 "sd"
Decorate 458(if64v) Flat
Decorate 505 ArrayStride 16
Decorate 506 ArrayStride 64
MemberDecorate 507(S) 0 Offset 0
MemberDecorate 507(S) 1 Offset 16
MemberDecorate 507(S) 2 Offset 32
Decorate 508 ArrayStride 64
MemberDecorate 509(B1) 0 Offset 0
MemberDecorate 509(B1) 1 Offset 16
MemberDecorate 509(B1) 2 Offset 32
MemberDecorate 509(B1) 3 Offset 64
MemberDecorate 509(B1) 4 ColMajor
MemberDecorate 509(B1) 4 Offset 96
MemberDecorate 509(B1) 4 MatrixStride 32
MemberDecorate 509(B1) 5 ColMajor
MemberDecorate 509(B1) 5 Offset 160
MemberDecorate 509(B1) 5 MatrixStride 32
MemberDecorate 509(B1) 6 Offset 288
MemberDecorate 509(B1) 7 Offset 352
Decorate 509(B1) Block
Decorate 511 DescriptorSet 0
Decorate 512(sf16) SpecId 100
Decorate 514(sf) SpecId 101
Decorate 515(sd) SpecId 102
2: TypeVoid
3: TypeFunction 2
26: TypeFloat 64
@ -175,38 +174,37 @@ spv.float64.frag
214: TypeVector 26(float64_t) 4
215: TypePointer Function 214(f64vec4)
364(ResType): TypeStruct 149(f64vec3) 183(ivec3)
397: TypeFloat 32
398: TypePointer Function 397(float)
402: TypeMatrix 149(f64vec3) 2
403: TypePointer Function 402
421: TypeMatrix 27(f64vec2) 3
422: TypePointer Function 421
427: TypeMatrix 149(f64vec3) 3
428: TypePointer Function 427
432: TypeMatrix 214(f64vec4) 4
433: TypePointer Function 432
460: TypePointer Input 149(f64vec3)
461(if64v): 460(ptr) Variable Input
462: TypePointer Input 26(float64_t)
499: 182(int) Constant 1
504:26(float64_t) Constant 0 1071644672
505: 27(f64vec2) ConstantComposite 504 504
507: 31(int) Constant 2
508: TypeArray 26(float64_t) 507
509: TypeArray 402 507
510(S): TypeStruct 26(float64_t) 27(f64vec2) 149(f64vec3)
511: TypeArray 510(S) 507
512(B1): TypeStruct 26(float64_t) 27(f64vec2) 149(f64vec3) 508 402 509 510(S) 511
513: TypePointer Uniform 512(B1)
514: 513(ptr) Variable Uniform
515(sf16):162(float16_t) SpecConstant 12288
516(sf): 397(float) SpecConstant 1048576000
517(sd):26(float64_t) SpecConstant 0 1071644672
518: 397(float) SpecConstantOp 115 515(sf16)
519: 397(float) SpecConstantOp 115 515(sf16)
520:26(float64_t) SpecConstantOp 115 519
521:162(float16_t) SpecConstantOp 115 516(sf)
522:162(float16_t) SpecConstantOp 115 517(sd)
399: TypeMatrix 149(f64vec3) 2
400: TypePointer Function 399
418: TypeMatrix 27(f64vec2) 3
419: TypePointer Function 418
424: TypeMatrix 149(f64vec3) 3
425: TypePointer Function 424
429: TypeMatrix 214(f64vec4) 4
430: TypePointer Function 429
457: TypePointer Input 149(f64vec3)
458(if64v): 457(ptr) Variable Input
459: TypePointer Input 26(float64_t)
496: 182(int) Constant 1
501:26(float64_t) Constant 0 1071644672
502: 27(f64vec2) ConstantComposite 501 501
504: 31(int) Constant 2
505: TypeArray 26(float64_t) 504
506: TypeArray 399 504
507(S): TypeStruct 26(float64_t) 27(f64vec2) 149(f64vec3)
508: TypeArray 507(S) 504
509(B1): TypeStruct 26(float64_t) 27(f64vec2) 149(f64vec3) 505 399 506 507(S) 508
510: TypePointer Uniform 509(B1)
511: 510(ptr) Variable Uniform
512(sf16):162(float16_t) SpecConstant 12288
513: TypeFloat 32
514(sf): 513(float) SpecConstant 1048576000
515(sd):26(float64_t) SpecConstant 0 1071644672
516: 513(float) SpecConstantOp 115 512(sf16)
517: 513(float) SpecConstantOp 115 512(sf16)
518:26(float64_t) SpecConstantOp 115 517
519:162(float16_t) SpecConstantOp 115 514(sf)
520:162(float16_t) SpecConstantOp 115 515(sd)
4(main): 2 Function None 3
5: Label
Return
@ -628,7 +626,6 @@ spv.float64.frag
372(f64v1): 150(ptr) Variable Function
376(f64v2): 150(ptr) Variable Function
382(f64v3): 150(ptr) Variable Function
399(f): 398(ptr) Variable Function
373:149(f64vec3) Load 372(f64v1)
374:26(float64_t) ExtInst 1(GLSL.std.450) 66(Length) 373
Store 371(f64) 374
@ -658,134 +655,134 @@ spv.float64.frag
Store 382(f64v3) 394
395:149(f64vec3) Load 372(f64v1)
396:149(f64vec3) Load 376(f64v2)
400: 397(float) Load 399(f)
401:149(f64vec3) ExtInst 1(GLSL.std.450) 72(Refract) 395 396 400
Store 382(f64v3) 401
397:26(float64_t) Load 371(f64)
398:149(f64vec3) ExtInst 1(GLSL.std.450) 72(Refract) 395 396 397
Store 382(f64v3) 398
Return
FunctionEnd
20(builtinMatrixFuncs(): 2 Function None 3
21: Label
404(f64m3): 403(ptr) Variable Function
405(f64m1): 403(ptr) Variable Function
407(f64m2): 403(ptr) Variable Function
416(f64v1): 150(ptr) Variable Function
418(f64v2): 28(ptr) Variable Function
423(f64m4): 422(ptr) Variable Function
426(f64): 33(ptr) Variable Function
429(f64m5): 428(ptr) Variable Function
434(f64m6): 433(ptr) Variable Function
435(f64m7): 433(ptr) Variable Function
406: 402 Load 405(f64m1)
408: 402 Load 407(f64m2)
409:149(f64vec3) CompositeExtract 406 0
410:149(f64vec3) CompositeExtract 408 0
401(f64m3): 400(ptr) Variable Function
402(f64m1): 400(ptr) Variable Function
404(f64m2): 400(ptr) Variable Function
413(f64v1): 150(ptr) Variable Function
415(f64v2): 28(ptr) Variable Function
420(f64m4): 419(ptr) Variable Function
423(f64): 33(ptr) Variable Function
426(f64m5): 425(ptr) Variable Function
431(f64m6): 430(ptr) Variable Function
432(f64m7): 430(ptr) Variable Function
403: 399 Load 402(f64m1)
405: 399 Load 404(f64m2)
406:149(f64vec3) CompositeExtract 403 0
407:149(f64vec3) CompositeExtract 405 0
408:149(f64vec3) FMul 406 407
409:149(f64vec3) CompositeExtract 403 1
410:149(f64vec3) CompositeExtract 405 1
411:149(f64vec3) FMul 409 410
412:149(f64vec3) CompositeExtract 406 1
413:149(f64vec3) CompositeExtract 408 1
414:149(f64vec3) FMul 412 413
415: 402 CompositeConstruct 411 414
Store 404(f64m3) 415
417:149(f64vec3) Load 416(f64v1)
419: 27(f64vec2) Load 418(f64v2)
420: 402 OuterProduct 417 419
Store 405(f64m1) 420
424: 402 Load 405(f64m1)
425: 421 Transpose 424
Store 423(f64m4) 425
430: 427 Load 429(f64m5)
431:26(float64_t) ExtInst 1(GLSL.std.450) 33(Determinant) 430
Store 426(f64) 431
436: 432 Load 435(f64m7)
437: 432 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 436
Store 434(f64m6) 437
412: 399 CompositeConstruct 408 411
Store 401(f64m3) 412
414:149(f64vec3) Load 413(f64v1)
416: 27(f64vec2) Load 415(f64v2)
417: 399 OuterProduct 414 416
Store 402(f64m1) 417
421: 399 Load 402(f64m1)
422: 418 Transpose 421
Store 420(f64m4) 422
427: 424 Load 426(f64m5)
428:26(float64_t) ExtInst 1(GLSL.std.450) 33(Determinant) 427
Store 423(f64) 428
433: 429 Load 432(f64m7)
434: 429 ExtInst 1(GLSL.std.450) 34(MatrixInverse) 433
Store 431(f64m6) 434
Return
FunctionEnd
22(builtinVecRelFuncs(): 2 Function None 3
23: Label
438(bv): 153(ptr) Variable Function
439(f64v1): 150(ptr) Variable Function
441(f64v2): 150(ptr) Variable Function
440:149(f64vec3) Load 439(f64v1)
442:149(f64vec3) Load 441(f64v2)
443: 152(bvec3) FOrdLessThan 440 442
Store 438(bv) 443
444:149(f64vec3) Load 439(f64v1)
445:149(f64vec3) Load 441(f64v2)
446: 152(bvec3) FOrdLessThanEqual 444 445
Store 438(bv) 446
447:149(f64vec3) Load 439(f64v1)
448:149(f64vec3) Load 441(f64v2)
449: 152(bvec3) FOrdGreaterThan 447 448
Store 438(bv) 449
450:149(f64vec3) Load 439(f64v1)
451:149(f64vec3) Load 441(f64v2)
452: 152(bvec3) FOrdGreaterThanEqual 450 451
Store 438(bv) 452
453:149(f64vec3) Load 439(f64v1)
454:149(f64vec3) Load 441(f64v2)
455: 152(bvec3) FOrdEqual 453 454
Store 438(bv) 455
456:149(f64vec3) Load 439(f64v1)
457:149(f64vec3) Load 441(f64v2)
458: 152(bvec3) FOrdNotEqual 456 457
Store 438(bv) 458
435(bv): 153(ptr) Variable Function
436(f64v1): 150(ptr) Variable Function
438(f64v2): 150(ptr) Variable Function
437:149(f64vec3) Load 436(f64v1)
439:149(f64vec3) Load 438(f64v2)
440: 152(bvec3) FOrdLessThan 437 439
Store 435(bv) 440
441:149(f64vec3) Load 436(f64v1)
442:149(f64vec3) Load 438(f64v2)
443: 152(bvec3) FOrdLessThanEqual 441 442
Store 435(bv) 443
444:149(f64vec3) Load 436(f64v1)
445:149(f64vec3) Load 438(f64v2)
446: 152(bvec3) FOrdGreaterThan 444 445
Store 435(bv) 446
447:149(f64vec3) Load 436(f64v1)
448:149(f64vec3) Load 438(f64v2)
449: 152(bvec3) FOrdGreaterThanEqual 447 448
Store 435(bv) 449
450:149(f64vec3) Load 436(f64v1)
451:149(f64vec3) Load 438(f64v2)
452: 152(bvec3) FOrdEqual 450 451
Store 435(bv) 452
453:149(f64vec3) Load 436(f64v1)
454:149(f64vec3) Load 438(f64v2)
455: 152(bvec3) FOrdNotEqual 453 454
Store 435(bv) 455
Return
FunctionEnd
24(builtinFragProcFuncs(): 2 Function None 3
25: Label
459(f64v): 150(ptr) Variable Function
463: 462(ptr) AccessChain 461(if64v) 32
464:26(float64_t) Load 463
465:26(float64_t) DPdx 464
466: 33(ptr) AccessChain 459(f64v) 32
Store 466 465
467: 462(ptr) AccessChain 461(if64v) 88
468:26(float64_t) Load 467
469:26(float64_t) DPdy 468
470: 33(ptr) AccessChain 459(f64v) 88
Store 470 469
471:149(f64vec3) Load 461(if64v)
472: 27(f64vec2) VectorShuffle 471 471 0 1
473: 27(f64vec2) DPdxFine 472
474:149(f64vec3) Load 459(f64v)
475:149(f64vec3) VectorShuffle 474 473 3 4 2
Store 459(f64v) 475
476:149(f64vec3) Load 461(if64v)
477: 27(f64vec2) VectorShuffle 476 476 0 1
478: 27(f64vec2) DPdyFine 477
479:149(f64vec3) Load 459(f64v)
480:149(f64vec3) VectorShuffle 479 478 3 4 2
Store 459(f64v) 480
481:149(f64vec3) Load 461(if64v)
482:149(f64vec3) DPdxCoarse 481
Store 459(f64v) 482
483:149(f64vec3) Load 461(if64v)
484:149(f64vec3) DPdxCoarse 483
Store 459(f64v) 484
485: 462(ptr) AccessChain 461(if64v) 32
486:26(float64_t) Load 485
487:26(float64_t) Fwidth 486
488: 33(ptr) AccessChain 459(f64v) 32
Store 488 487
489:149(f64vec3) Load 461(if64v)
490: 27(f64vec2) VectorShuffle 489 489 0 1
491: 27(f64vec2) FwidthFine 490
492:149(f64vec3) Load 459(f64v)
493:149(f64vec3) VectorShuffle 492 491 3 4 2
Store 459(f64v) 493
494:149(f64vec3) Load 461(if64v)
495:149(f64vec3) FwidthCoarse 494
Store 459(f64v) 495
496: 462(ptr) AccessChain 461(if64v) 32
497:26(float64_t) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 496
498: 33(ptr) AccessChain 459(f64v) 32
Store 498 497
500:149(f64vec3) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 461(if64v) 499
501: 27(f64vec2) VectorShuffle 500 500 0 1
502:149(f64vec3) Load 459(f64v)
503:149(f64vec3) VectorShuffle 502 501 3 4 2
Store 459(f64v) 503
506:149(f64vec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 461(if64v) 505
Store 459(f64v) 506
456(f64v): 150(ptr) Variable Function
460: 459(ptr) AccessChain 458(if64v) 32
461:26(float64_t) Load 460
462:26(float64_t) DPdx 461
463: 33(ptr) AccessChain 456(f64v) 32
Store 463 462
464: 459(ptr) AccessChain 458(if64v) 88
465:26(float64_t) Load 464
466:26(float64_t) DPdy 465
467: 33(ptr) AccessChain 456(f64v) 88
Store 467 466
468:149(f64vec3) Load 458(if64v)
469: 27(f64vec2) VectorShuffle 468 468 0 1
470: 27(f64vec2) DPdxFine 469
471:149(f64vec3) Load 456(f64v)
472:149(f64vec3) VectorShuffle 471 470 3 4 2
Store 456(f64v) 472
473:149(f64vec3) Load 458(if64v)
474: 27(f64vec2) VectorShuffle 473 473 0 1
475: 27(f64vec2) DPdyFine 474
476:149(f64vec3) Load 456(f64v)
477:149(f64vec3) VectorShuffle 476 475 3 4 2
Store 456(f64v) 477
478:149(f64vec3) Load 458(if64v)
479:149(f64vec3) DPdxCoarse 478
Store 456(f64v) 479
480:149(f64vec3) Load 458(if64v)
481:149(f64vec3) DPdxCoarse 480
Store 456(f64v) 481
482: 459(ptr) AccessChain 458(if64v) 32
483:26(float64_t) Load 482
484:26(float64_t) Fwidth 483
485: 33(ptr) AccessChain 456(f64v) 32
Store 485 484
486:149(f64vec3) Load 458(if64v)
487: 27(f64vec2) VectorShuffle 486 486 0 1
488: 27(f64vec2) FwidthFine 487
489:149(f64vec3) Load 456(f64v)
490:149(f64vec3) VectorShuffle 489 488 3 4 2
Store 456(f64v) 490
491:149(f64vec3) Load 458(if64v)
492:149(f64vec3) FwidthCoarse 491
Store 456(f64v) 492
493: 459(ptr) AccessChain 458(if64v) 32
494:26(float64_t) ExtInst 1(GLSL.std.450) 76(InterpolateAtCentroid) 493
495: 33(ptr) AccessChain 456(f64v) 32
Store 495 494
497:149(f64vec3) ExtInst 1(GLSL.std.450) 77(InterpolateAtSample) 458(if64v) 496
498: 27(f64vec2) VectorShuffle 497 497 0 1
499:149(f64vec3) Load 456(f64v)
500:149(f64vec3) VectorShuffle 499 498 3 4 2
Store 456(f64v) 500
503:149(f64vec3) ExtInst 1(GLSL.std.450) 78(InterpolateAtOffset) 458(if64v) 502
Store 456(f64v) 503
Return
FunctionEnd