HLSL: Fix an issue of frexp().
The "exp" parameter is floating-point type in HLSL intrinsic while it is integer type in GLSL built-in function.
This commit is contained in:
parent
86e49d1773
commit
470026f9d7
4 changed files with 154 additions and 115 deletions
|
|
@ -114,7 +114,7 @@ Shader version: 450
|
|||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 74
|
||||
// Id's are bound by 78
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
|
|
@ -134,9 +134,9 @@ Shader version: 450
|
|||
Name 30 "inF0"
|
||||
Name 31 "inF1"
|
||||
Name 36 "ResType"
|
||||
Name 45 "ResType"
|
||||
Name 56 "ResType"
|
||||
Name 66 "ResType"
|
||||
Name 46 "ResType"
|
||||
Name 58 "ResType"
|
||||
Name 69 "ResType"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -153,20 +153,20 @@ Shader version: 450
|
|||
29: TypeFunction 27(fvec4) 28(ptr) 28(ptr)
|
||||
35: TypeInt 32 1
|
||||
36(ResType): TypeStruct 6(float) 35(int)
|
||||
40: 6(float) Constant 0
|
||||
44: TypeVector 35(int) 2
|
||||
45(ResType): TypeStruct 13(fvec2) 44(ivec2)
|
||||
49: 6(float) Constant 1065353216
|
||||
50: 6(float) Constant 1073741824
|
||||
51: 13(fvec2) ConstantComposite 49 50
|
||||
55: TypeVector 35(int) 3
|
||||
56(ResType): TypeStruct 20(fvec3) 55(ivec3)
|
||||
60: 6(float) Constant 1077936128
|
||||
61: 20(fvec3) ConstantComposite 49 50 60
|
||||
65: TypeVector 35(int) 4
|
||||
66(ResType): TypeStruct 27(fvec4) 65(ivec4)
|
||||
70: 6(float) Constant 1082130432
|
||||
71: 27(fvec4) ConstantComposite 49 50 60 70
|
||||
41: 6(float) Constant 0
|
||||
45: TypeVector 35(int) 2
|
||||
46(ResType): TypeStruct 13(fvec2) 45(ivec2)
|
||||
51: 6(float) Constant 1065353216
|
||||
52: 6(float) Constant 1073741824
|
||||
53: 13(fvec2) ConstantComposite 51 52
|
||||
57: TypeVector 35(int) 3
|
||||
58(ResType): TypeStruct 20(fvec3) 57(ivec3)
|
||||
63: 6(float) Constant 1077936128
|
||||
64: 20(fvec3) ConstantComposite 51 52 63
|
||||
68: TypeVector 35(int) 4
|
||||
69(ResType): TypeStruct 27(fvec4) 68(ivec4)
|
||||
74: 6(float) Constant 1082130432
|
||||
75: 27(fvec4) ConstantComposite 51 52 63 74
|
||||
4(VertexShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
Return
|
||||
|
|
@ -178,40 +178,44 @@ Shader version: 450
|
|||
34: 6(float) Load 9(inF0)
|
||||
37: 36(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 34
|
||||
38: 35(int) CompositeExtract 37 1
|
||||
Store 10(inF1) 38
|
||||
39: 6(float) CompositeExtract 37 0
|
||||
ReturnValue 40
|
||||
39: 6(float) ConvertSToF 38
|
||||
Store 10(inF1) 39
|
||||
40: 6(float) CompositeExtract 37 0
|
||||
ReturnValue 41
|
||||
FunctionEnd
|
||||
18(VertexShaderFunction2(vf2;vf2;): 13(fvec2) Function None 15
|
||||
16(inF0): 14(ptr) FunctionParameter
|
||||
17(inF1): 14(ptr) FunctionParameter
|
||||
19: Label
|
||||
43: 13(fvec2) Load 16(inF0)
|
||||
46: 45(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 43
|
||||
47: 44(ivec2) CompositeExtract 46 1
|
||||
Store 17(inF1) 47
|
||||
48: 13(fvec2) CompositeExtract 46 0
|
||||
ReturnValue 51
|
||||
44: 13(fvec2) Load 16(inF0)
|
||||
47: 46(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 44
|
||||
48: 45(ivec2) CompositeExtract 47 1
|
||||
49: 13(fvec2) ConvertSToF 48
|
||||
Store 17(inF1) 49
|
||||
50: 13(fvec2) CompositeExtract 47 0
|
||||
ReturnValue 53
|
||||
FunctionEnd
|
||||
25(VertexShaderFunction3(vf3;vf3;): 20(fvec3) Function None 22
|
||||
23(inF0): 21(ptr) FunctionParameter
|
||||
24(inF1): 21(ptr) FunctionParameter
|
||||
26: Label
|
||||
54: 20(fvec3) Load 23(inF0)
|
||||
57: 56(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 54
|
||||
58: 55(ivec3) CompositeExtract 57 1
|
||||
Store 24(inF1) 58
|
||||
59: 20(fvec3) CompositeExtract 57 0
|
||||
ReturnValue 61
|
||||
56: 20(fvec3) Load 23(inF0)
|
||||
59: 58(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 56
|
||||
60: 57(ivec3) CompositeExtract 59 1
|
||||
61: 20(fvec3) ConvertSToF 60
|
||||
Store 24(inF1) 61
|
||||
62: 20(fvec3) CompositeExtract 59 0
|
||||
ReturnValue 64
|
||||
FunctionEnd
|
||||
32(VertexShaderFunction4(vf4;vf4;): 27(fvec4) Function None 29
|
||||
30(inF0): 28(ptr) FunctionParameter
|
||||
31(inF1): 28(ptr) FunctionParameter
|
||||
33: Label
|
||||
64: 27(fvec4) Load 30(inF0)
|
||||
67: 66(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 64
|
||||
68: 65(ivec4) CompositeExtract 67 1
|
||||
Store 31(inF1) 68
|
||||
69: 27(fvec4) CompositeExtract 67 0
|
||||
ReturnValue 71
|
||||
67: 27(fvec4) Load 30(inF0)
|
||||
70: 69(ResType) ExtInst 1(GLSL.std.450) 52(FrexpStruct) 67
|
||||
71: 68(ivec4) CompositeExtract 70 1
|
||||
72: 27(fvec4) ConvertSToF 71
|
||||
Store 31(inF1) 72
|
||||
73: 27(fvec4) CompositeExtract 70 0
|
||||
ReturnValue 75
|
||||
FunctionEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue