Add HLSL memory barrier intrinsics, fix dst, add lit & EvaluateAttributeSnapped

This commit is contained in:
LoopDawg 2016-06-15 09:50:24 -06:00
parent 19b92fff7e
commit 6e72fddaa2
18 changed files with 1170 additions and 466 deletions

View file

@ -530,7 +530,7 @@ Shader version: 450
0:227 dot-product (global float)
0:227 'inF0' (in 4-component vector of float)
0:227 'inF1' (in 4-component vector of float)
0:228 Construct vec4 (temp float)
0:228 Construct vec4 (temp 4-component vector of float)
0:228 Constant:
0:228 1.000000
0:228 component-wise multiply (temp float)
@ -1759,7 +1759,7 @@ Shader version: 450
0:227 dot-product (global float)
0:227 'inF0' (in 4-component vector of float)
0:227 'inF1' (in 4-component vector of float)
0:228 Construct vec4 (temp float)
0:228 Construct vec4 (temp 4-component vector of float)
0:228 Constant:
0:228 1.000000
0:228 component-wise multiply (temp float)
@ -2455,12 +2455,12 @@ Shader version: 450
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 1089
// Id's are bound by 1090
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "VertexShaderFunction" 48 67 73 80 174 192 198 205 321 339 345 352 470 488 494 501 625 639 646 741 755 762 860 874 881
EntryPoint Vertex 4 "VertexShaderFunction" 48 67 73 80 174 192 198 205 321 339 345 352 470 488 494 501 626 640 647 742 756 763 861 875 882
Source HLSL 450
Name 4 "VertexShaderFunction"
Name 19 "TestGenMul(f1;f1;vf2;vf2;mf22;mf22;"
@ -2503,46 +2503,46 @@ Shader version: 450
Name 488 "inU0"
Name 494 "inF1"
Name 501 "inF2"
Name 545 "ResType"
Name 625 "inF0"
Name 639 "inF1"
Name 646 "inF2"
Name 677 "ResType"
Name 741 "inF0"
Name 755 "inF1"
Name 762 "inF2"
Name 796 "ResType"
Name 860 "inF0"
Name 874 "inF1"
Name 881 "inF2"
Name 918 "ResType"
Name 981 "r0"
Name 985 "r1"
Name 989 "r2"
Name 993 "r3"
Name 997 "r4"
Name 1001 "r5"
Name 1005 "r6"
Name 1009 "r7"
Name 1013 "r8"
Name 1017 "r0"
Name 1021 "r1"
Name 1025 "r2"
Name 1029 "r3"
Name 1033 "r4"
Name 1037 "r5"
Name 1041 "r6"
Name 1045 "r7"
Name 1049 "r8"
Name 1053 "r0"
Name 1057 "r1"
Name 1061 "r2"
Name 1065 "r3"
Name 1069 "r4"
Name 1073 "r5"
Name 1077 "r6"
Name 1081 "r7"
Name 1085 "r8"
Name 546 "ResType"
Name 626 "inF0"
Name 640 "inF1"
Name 647 "inF2"
Name 678 "ResType"
Name 742 "inF0"
Name 756 "inF1"
Name 763 "inF2"
Name 797 "ResType"
Name 861 "inF0"
Name 875 "inF1"
Name 882 "inF2"
Name 919 "ResType"
Name 982 "r0"
Name 986 "r1"
Name 990 "r2"
Name 994 "r3"
Name 998 "r4"
Name 1002 "r5"
Name 1006 "r6"
Name 1010 "r7"
Name 1014 "r8"
Name 1018 "r0"
Name 1022 "r1"
Name 1026 "r2"
Name 1030 "r3"
Name 1034 "r4"
Name 1038 "r5"
Name 1042 "r6"
Name 1046 "r7"
Name 1050 "r8"
Name 1054 "r0"
Name 1058 "r1"
Name 1062 "r2"
Name 1066 "r3"
Name 1070 "r4"
Name 1074 "r5"
Name 1078 "r6"
Name 1082 "r7"
Name 1086 "r8"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -2618,33 +2618,33 @@ Shader version: 450
494(inF1): 469(ptr) Variable Input
501(inF2): 469(ptr) Variable Input
508: 485(ivec4) ConstantComposite 87 212 359 136
545(ResType): TypeStruct 34(fvec4) 482(ivec4)
550: TypeVector 50(bool) 4
585: 64(int) Constant 4
586: 485(ivec4) ConstantComposite 282 136 212 585
621: 6(float) Constant 1082130432
622: 34(fvec4) ConstantComposite 144 280 466 621
624: TypePointer Input 10
625(inF0): 624(ptr) Variable Input
639(inF1): 624(ptr) Variable Input
646(inF2): 624(ptr) Variable Input
677(ResType): TypeStruct 10 186(ivec2)
737: 8(fvec2) ConstantComposite 280 280
738: 10 ConstantComposite 737 737
740: TypePointer Input 23
741(inF0): 740(ptr) Variable Input
755(inF1): 740(ptr) Variable Input
762(inF2): 740(ptr) Variable Input
796(ResType): TypeStruct 23 333(ivec3)
856: 21(fvec3) ConstantComposite 466 466 466
857: 23 ConstantComposite 856 856 856
859: TypePointer Input 36
860(inF0): 859(ptr) Variable Input
874(inF1): 859(ptr) Variable Input
881(inF2): 859(ptr) Variable Input
918(ResType): TypeStruct 36 482(ivec4)
978: 34(fvec4) ConstantComposite 621 621 621 621
979: 36 ConstantComposite 978 978 978 978
546(ResType): TypeStruct 34(fvec4) 482(ivec4)
551: TypeVector 50(bool) 4
586: 64(int) Constant 4
587: 485(ivec4) ConstantComposite 282 136 212 586
622: 6(float) Constant 1082130432
623: 34(fvec4) ConstantComposite 144 280 466 622
625: TypePointer Input 10
626(inF0): 625(ptr) Variable Input
640(inF1): 625(ptr) Variable Input
647(inF2): 625(ptr) Variable Input
678(ResType): TypeStruct 10 186(ivec2)
738: 8(fvec2) ConstantComposite 280 280
739: 10 ConstantComposite 738 738
741: TypePointer Input 23
742(inF0): 741(ptr) Variable Input
756(inF1): 741(ptr) Variable Input
763(inF2): 741(ptr) Variable Input
797(ResType): TypeStruct 23 333(ivec3)
857: 21(fvec3) ConstantComposite 466 466 466
858: 23 ConstantComposite 857 857 857
860: TypePointer Input 36
861(inF0): 860(ptr) Variable Input
875(inF1): 860(ptr) Variable Input
882(inF2): 860(ptr) Variable Input
919(ResType): TypeStruct 36 482(ivec4)
979: 34(fvec4) ConstantComposite 622 622 622 622
980: 36 ConstantComposite 979 979 979 979
4(VertexShaderFunction): 2 Function None 3
5: Label
49: 6(float) Load 48(inF0)
@ -2768,51 +2768,51 @@ Shader version: 450
17(inFM0): 11(ptr) FunctionParameter
18(inFM1): 11(ptr) FunctionParameter
20: Label
981(r0): 7(ptr) Variable Function
985(r1): 9(ptr) Variable Function
989(r2): 9(ptr) Variable Function
993(r3): 7(ptr) Variable Function
997(r4): 9(ptr) Variable Function
1001(r5): 9(ptr) Variable Function
1005(r6): 11(ptr) Variable Function
1009(r7): 11(ptr) Variable Function
1013(r8): 11(ptr) Variable Function
982: 6(float) Load 13(inF0)
983: 6(float) Load 14(inF1)
984: 6(float) FMul 982 983
Store 981(r0) 984
986: 8(fvec2) Load 15(inFV0)
987: 6(float) Load 13(inF0)
988: 8(fvec2) VectorTimesScalar 986 987
Store 985(r1) 988
990: 6(float) Load 13(inF0)
991: 8(fvec2) Load 15(inFV0)
992: 8(fvec2) VectorTimesScalar 991 990
Store 989(r2) 992
994: 8(fvec2) Load 15(inFV0)
995: 8(fvec2) Load 16(inFV1)
996: 6(float) Dot 994 995
Store 993(r3) 996
998: 10 Load 17(inFM0)
999: 8(fvec2) Load 15(inFV0)
1000: 8(fvec2) MatrixTimesVector 998 999
Store 997(r4) 1000
1002: 8(fvec2) Load 15(inFV0)
1003: 10 Load 17(inFM0)
1004: 8(fvec2) VectorTimesMatrix 1002 1003
Store 1001(r5) 1004
1006: 10 Load 17(inFM0)
1007: 6(float) Load 13(inF0)
1008: 10 MatrixTimesScalar 1006 1007
Store 1005(r6) 1008
1010: 6(float) Load 13(inF0)
1011: 10 Load 17(inFM0)
1012: 10 MatrixTimesScalar 1011 1010
Store 1009(r7) 1012
1014: 10 Load 17(inFM0)
1015: 10 Load 18(inFM1)
1016: 10 MatrixTimesMatrix 1014 1015
Store 1013(r8) 1016
982(r0): 7(ptr) Variable Function
986(r1): 9(ptr) Variable Function
990(r2): 9(ptr) Variable Function
994(r3): 7(ptr) Variable Function
998(r4): 9(ptr) Variable Function
1002(r5): 9(ptr) Variable Function
1006(r6): 11(ptr) Variable Function
1010(r7): 11(ptr) Variable Function
1014(r8): 11(ptr) Variable Function
983: 6(float) Load 13(inF0)
984: 6(float) Load 14(inF1)
985: 6(float) FMul 983 984
Store 982(r0) 985
987: 8(fvec2) Load 15(inFV0)
988: 6(float) Load 13(inF0)
989: 8(fvec2) VectorTimesScalar 987 988
Store 986(r1) 989
991: 6(float) Load 13(inF0)
992: 8(fvec2) Load 15(inFV0)
993: 8(fvec2) VectorTimesScalar 992 991
Store 990(r2) 993
995: 8(fvec2) Load 15(inFV0)
996: 8(fvec2) Load 16(inFV1)
997: 6(float) Dot 995 996
Store 994(r3) 997
999: 10 Load 17(inFM0)
1000: 8(fvec2) Load 15(inFV0)
1001: 8(fvec2) MatrixTimesVector 999 1000
Store 998(r4) 1001
1003: 8(fvec2) Load 15(inFV0)
1004: 10 Load 17(inFM0)
1005: 8(fvec2) VectorTimesMatrix 1003 1004
Store 1002(r5) 1005
1007: 10 Load 17(inFM0)
1008: 6(float) Load 13(inF0)
1009: 10 MatrixTimesScalar 1007 1008
Store 1006(r6) 1009
1011: 6(float) Load 13(inF0)
1012: 10 Load 17(inFM0)
1013: 10 MatrixTimesScalar 1012 1011
Store 1010(r7) 1013
1015: 10 Load 17(inFM0)
1016: 10 Load 18(inFM1)
1017: 10 MatrixTimesMatrix 1015 1016
Store 1014(r8) 1017
Return
FunctionEnd
32(TestGenMul(f1;f1;vf3;vf3;mf33;mf33;): 2 Function None 25
@ -2823,51 +2823,51 @@ Shader version: 450
30(inFM0): 24(ptr) FunctionParameter
31(inFM1): 24(ptr) FunctionParameter
33: Label
1017(r0): 7(ptr) Variable Function
1021(r1): 22(ptr) Variable Function
1025(r2): 22(ptr) Variable Function
1029(r3): 7(ptr) Variable Function
1033(r4): 22(ptr) Variable Function
1037(r5): 22(ptr) Variable Function
1041(r6): 24(ptr) Variable Function
1045(r7): 24(ptr) Variable Function
1049(r8): 24(ptr) Variable Function
1018: 6(float) Load 26(inF0)
1019: 6(float) Load 27(inF1)
1020: 6(float) FMul 1018 1019
Store 1017(r0) 1020
1022: 21(fvec3) Load 28(inFV0)
1023: 6(float) Load 26(inF0)
1024: 21(fvec3) VectorTimesScalar 1022 1023
Store 1021(r1) 1024
1026: 6(float) Load 26(inF0)
1027: 21(fvec3) Load 28(inFV0)
1028: 21(fvec3) VectorTimesScalar 1027 1026
Store 1025(r2) 1028
1030: 21(fvec3) Load 28(inFV0)
1031: 21(fvec3) Load 29(inFV1)
1032: 6(float) Dot 1030 1031
Store 1029(r3) 1032
1034: 23 Load 30(inFM0)
1035: 21(fvec3) Load 28(inFV0)
1036: 21(fvec3) MatrixTimesVector 1034 1035
Store 1033(r4) 1036
1038: 21(fvec3) Load 28(inFV0)
1039: 23 Load 30(inFM0)
1040: 21(fvec3) VectorTimesMatrix 1038 1039
Store 1037(r5) 1040
1042: 23 Load 30(inFM0)
1043: 6(float) Load 26(inF0)
1044: 23 MatrixTimesScalar 1042 1043
Store 1041(r6) 1044
1046: 6(float) Load 26(inF0)
1047: 23 Load 30(inFM0)
1048: 23 MatrixTimesScalar 1047 1046
Store 1045(r7) 1048
1050: 23 Load 30(inFM0)
1051: 23 Load 31(inFM1)
1052: 23 MatrixTimesMatrix 1050 1051
Store 1049(r8) 1052
1018(r0): 7(ptr) Variable Function
1022(r1): 22(ptr) Variable Function
1026(r2): 22(ptr) Variable Function
1030(r3): 7(ptr) Variable Function
1034(r4): 22(ptr) Variable Function
1038(r5): 22(ptr) Variable Function
1042(r6): 24(ptr) Variable Function
1046(r7): 24(ptr) Variable Function
1050(r8): 24(ptr) Variable Function
1019: 6(float) Load 26(inF0)
1020: 6(float) Load 27(inF1)
1021: 6(float) FMul 1019 1020
Store 1018(r0) 1021
1023: 21(fvec3) Load 28(inFV0)
1024: 6(float) Load 26(inF0)
1025: 21(fvec3) VectorTimesScalar 1023 1024
Store 1022(r1) 1025
1027: 6(float) Load 26(inF0)
1028: 21(fvec3) Load 28(inFV0)
1029: 21(fvec3) VectorTimesScalar 1028 1027
Store 1026(r2) 1029
1031: 21(fvec3) Load 28(inFV0)
1032: 21(fvec3) Load 29(inFV1)
1033: 6(float) Dot 1031 1032
Store 1030(r3) 1033
1035: 23 Load 30(inFM0)
1036: 21(fvec3) Load 28(inFV0)
1037: 21(fvec3) MatrixTimesVector 1035 1036
Store 1034(r4) 1037
1039: 21(fvec3) Load 28(inFV0)
1040: 23 Load 30(inFM0)
1041: 21(fvec3) VectorTimesMatrix 1039 1040
Store 1038(r5) 1041
1043: 23 Load 30(inFM0)
1044: 6(float) Load 26(inF0)
1045: 23 MatrixTimesScalar 1043 1044
Store 1042(r6) 1045
1047: 6(float) Load 26(inF0)
1048: 23 Load 30(inFM0)
1049: 23 MatrixTimesScalar 1048 1047
Store 1046(r7) 1049
1051: 23 Load 30(inFM0)
1052: 23 Load 31(inFM1)
1053: 23 MatrixTimesMatrix 1051 1052
Store 1050(r8) 1053
Return
FunctionEnd
45(TestGenMul(f1;f1;vf4;vf4;mf44;mf44;): 2 Function None 38
@ -2878,50 +2878,50 @@ Shader version: 450
43(inFM0): 37(ptr) FunctionParameter
44(inFM1): 37(ptr) FunctionParameter
46: Label
1053(r0): 7(ptr) Variable Function
1057(r1): 35(ptr) Variable Function
1061(r2): 35(ptr) Variable Function
1065(r3): 7(ptr) Variable Function
1069(r4): 35(ptr) Variable Function
1073(r5): 35(ptr) Variable Function
1077(r6): 37(ptr) Variable Function
1081(r7): 37(ptr) Variable Function
1085(r8): 37(ptr) Variable Function
1054: 6(float) Load 39(inF0)
1055: 6(float) Load 40(inF1)
1056: 6(float) FMul 1054 1055
Store 1053(r0) 1056
1058: 34(fvec4) Load 41(inFV0)
1059: 6(float) Load 39(inF0)
1060: 34(fvec4) VectorTimesScalar 1058 1059
Store 1057(r1) 1060
1062: 6(float) Load 39(inF0)
1063: 34(fvec4) Load 41(inFV0)
1064: 34(fvec4) VectorTimesScalar 1063 1062
Store 1061(r2) 1064
1066: 34(fvec4) Load 41(inFV0)
1067: 34(fvec4) Load 42(inFV1)
1068: 6(float) Dot 1066 1067
Store 1065(r3) 1068
1070: 36 Load 43(inFM0)
1071: 34(fvec4) Load 41(inFV0)
1072: 34(fvec4) MatrixTimesVector 1070 1071
Store 1069(r4) 1072
1074: 34(fvec4) Load 41(inFV0)
1075: 36 Load 43(inFM0)
1076: 34(fvec4) VectorTimesMatrix 1074 1075
Store 1073(r5) 1076
1078: 36 Load 43(inFM0)
1079: 6(float) Load 39(inF0)
1080: 36 MatrixTimesScalar 1078 1079
Store 1077(r6) 1080
1082: 6(float) Load 39(inF0)
1083: 36 Load 43(inFM0)
1084: 36 MatrixTimesScalar 1083 1082
Store 1081(r7) 1084
1086: 36 Load 43(inFM0)
1087: 36 Load 44(inFM1)
1088: 36 MatrixTimesMatrix 1086 1087
Store 1085(r8) 1088
1054(r0): 7(ptr) Variable Function
1058(r1): 35(ptr) Variable Function
1062(r2): 35(ptr) Variable Function
1066(r3): 7(ptr) Variable Function
1070(r4): 35(ptr) Variable Function
1074(r5): 35(ptr) Variable Function
1078(r6): 37(ptr) Variable Function
1082(r7): 37(ptr) Variable Function
1086(r8): 37(ptr) Variable Function
1055: 6(float) Load 39(inF0)
1056: 6(float) Load 40(inF1)
1057: 6(float) FMul 1055 1056
Store 1054(r0) 1057
1059: 34(fvec4) Load 41(inFV0)
1060: 6(float) Load 39(inF0)
1061: 34(fvec4) VectorTimesScalar 1059 1060
Store 1058(r1) 1061
1063: 6(float) Load 39(inF0)
1064: 34(fvec4) Load 41(inFV0)
1065: 34(fvec4) VectorTimesScalar 1064 1063
Store 1062(r2) 1065
1067: 34(fvec4) Load 41(inFV0)
1068: 34(fvec4) Load 42(inFV1)
1069: 6(float) Dot 1067 1068
Store 1066(r3) 1069
1071: 36 Load 43(inFM0)
1072: 34(fvec4) Load 41(inFV0)
1073: 34(fvec4) MatrixTimesVector 1071 1072
Store 1070(r4) 1073
1075: 34(fvec4) Load 41(inFV0)
1076: 36 Load 43(inFM0)
1077: 34(fvec4) VectorTimesMatrix 1075 1076
Store 1074(r5) 1077
1079: 36 Load 43(inFM0)
1080: 6(float) Load 39(inF0)
1081: 36 MatrixTimesScalar 1079 1080
Store 1078(r6) 1081
1083: 6(float) Load 39(inF0)
1084: 36 Load 43(inFM0)
1085: 36 MatrixTimesScalar 1084 1083
Store 1082(r7) 1085
1087: 36 Load 43(inFM0)
1088: 36 Load 44(inFM1)
1089: 36 MatrixTimesMatrix 1087 1088
Store 1086(r8) 1089
Return
FunctionEnd