Vulkan: Have desktop shaders respect precision qualifiers.
Sets highp defaults for the appropriate types, for all stages, and turns on precision qualifiers for non-ES shaders. Required fixing some qualifier orders for desktop built-in declarations for pre-420 shaders.
This commit is contained in:
parent
4d535640e4
commit
54571c2519
@ -63,6 +63,7 @@ Linked vertex stage:
|
||||
Decorate 55(sampb2) Binding 5
|
||||
Decorate 56(sampb4) DescriptorSet 0
|
||||
Decorate 56(sampb4) Binding 31
|
||||
MemberDecorate 59(S) 0 RelaxedPrecision
|
||||
Decorate 62(var) Flat
|
||||
Decorate 62(var) Location 0
|
||||
MemberDecorate 63(MS) 0 Location 17
|
||||
|
@ -64,6 +64,11 @@ Linked fragment stage:
|
||||
Decorate 66(ub2) BufferBlock
|
||||
Decorate 68(uName2) DescriptorSet 0
|
||||
Decorate 97(samp2D) DescriptorSet 0
|
||||
Decorate 101(coord) RelaxedPrecision
|
||||
Decorate 102 RelaxedPrecision
|
||||
Decorate 107 RelaxedPrecision
|
||||
Decorate 108 RelaxedPrecision
|
||||
Decorate 129 RelaxedPrecision
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
@ -18,7 +18,9 @@ Linked vertex stage:
|
||||
Name 8 "i"
|
||||
Name 18 "flag"
|
||||
Name 31 "r"
|
||||
Decorate 18(flag) RelaxedPrecision
|
||||
Decorate 18(flag) Location 0
|
||||
Decorate 19 RelaxedPrecision
|
||||
Decorate 31(r) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
@ -25,6 +25,26 @@ Linked fragment stage:
|
||||
Name 30 "gl_FragColor"
|
||||
Name 36 "d"
|
||||
Name 59 "bigColor"
|
||||
Decorate 10(unreachableReturn() RelaxedPrecision
|
||||
Decorate 16(foo(vf4;) RelaxedPrecision
|
||||
Decorate 15(bar) RelaxedPrecision
|
||||
Decorate 18(color) RelaxedPrecision
|
||||
Decorate 20(BaseColor) RelaxedPrecision
|
||||
Decorate 22 RelaxedPrecision
|
||||
Decorate 23 RelaxedPrecision
|
||||
Decorate 24 RelaxedPrecision
|
||||
Decorate 27(f) RelaxedPrecision
|
||||
Decorate 28 RelaxedPrecision
|
||||
Decorate 30(gl_FragColor) RelaxedPrecision
|
||||
Decorate 31 RelaxedPrecision
|
||||
Decorate 32 RelaxedPrecision
|
||||
Decorate 33 RelaxedPrecision
|
||||
Decorate 36(d) RelaxedPrecision
|
||||
Decorate 37 RelaxedPrecision
|
||||
Decorate 52 RelaxedPrecision
|
||||
Decorate 55 RelaxedPrecision
|
||||
Decorate 56 RelaxedPrecision
|
||||
Decorate 59(bigColor) RelaxedPrecision
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
|
@ -91,13 +91,17 @@ Linked vertex stage:
|
||||
Decorate 13 ArrayStride 32
|
||||
MemberDecorate 14(S) 0 Offset 0
|
||||
MemberDecorate 14(S) 1 ColMajor
|
||||
MemberDecorate 14(S) 1 RelaxedPrecision
|
||||
MemberDecorate 14(S) 1 Offset 16
|
||||
MemberDecorate 14(S) 1 MatrixStride 16
|
||||
MemberDecorate 14(S) 2 RelaxedPrecision
|
||||
MemberDecorate 14(S) 2 Offset 144
|
||||
Decorate 16 ArrayStride 160
|
||||
Decorate 18 ArrayStride 480
|
||||
MemberDecorate 19(Block140) 0 RelaxedPrecision
|
||||
MemberDecorate 19(Block140) 0 Offset 0
|
||||
MemberDecorate 19(Block140) 1 Offset 16
|
||||
MemberDecorate 19(Block140) 2 RelaxedPrecision
|
||||
MemberDecorate 19(Block140) 2 Offset 976
|
||||
Decorate 19(Block140) Block
|
||||
Decorate 21(inst140) DescriptorSet 0
|
||||
@ -105,17 +109,23 @@ Linked vertex stage:
|
||||
Decorate 22 ArrayStride 16
|
||||
MemberDecorate 23(S) 0 Offset 0
|
||||
MemberDecorate 23(S) 1 ColMajor
|
||||
MemberDecorate 23(S) 1 RelaxedPrecision
|
||||
MemberDecorate 23(S) 1 Offset 16
|
||||
MemberDecorate 23(S) 1 MatrixStride 8
|
||||
MemberDecorate 23(S) 2 RelaxedPrecision
|
||||
MemberDecorate 23(S) 2 Offset 80
|
||||
Decorate 24 ArrayStride 96
|
||||
Decorate 25 ArrayStride 288
|
||||
MemberDecorate 26(Block430) 0 RelaxedPrecision
|
||||
MemberDecorate 26(Block430) 0 Offset 0
|
||||
MemberDecorate 26(Block430) 1 Offset 16
|
||||
MemberDecorate 26(Block430) 2 RelaxedPrecision
|
||||
MemberDecorate 26(Block430) 2 Offset 592
|
||||
Decorate 26(Block430) BufferBlock
|
||||
Decorate 28(inst430) DescriptorSet 0
|
||||
Decorate 28(inst430) Binding 1
|
||||
MemberDecorate 29(S) 1 RelaxedPrecision
|
||||
MemberDecorate 29(S) 2 RelaxedPrecision
|
||||
MemberDecorate 35(T) 0 RowMajor
|
||||
MemberDecorate 35(T) 0 Offset 0
|
||||
MemberDecorate 35(T) 0 MatrixStride 16
|
||||
@ -164,7 +174,9 @@ Linked vertex stage:
|
||||
Decorate 60(bBtn3) Binding 0
|
||||
Decorate 62(sout) Flat
|
||||
MemberDecorate 63(S) 0 Invariant
|
||||
MemberDecorate 63(S) 1 RelaxedPrecision
|
||||
MemberDecorate 63(S) 1 Invariant
|
||||
MemberDecorate 63(S) 2 RelaxedPrecision
|
||||
MemberDecorate 63(S) 2 Invariant
|
||||
Decorate 65(soutinv) Invariant
|
||||
2: TypeVoid
|
||||
|
@ -34,6 +34,8 @@ Linked fragment stage:
|
||||
Name 44 "coord"
|
||||
Name 49 "foo"
|
||||
Decorate 40(samp2D) DescriptorSet 0
|
||||
Decorate 44(coord) RelaxedPrecision
|
||||
Decorate 45 RelaxedPrecision
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
@ -7,76 +7,76 @@ Shader version: 450
|
||||
0:7 Function Parameters:
|
||||
0:9 Sequence
|
||||
0:9 Convert float to bool (temp bool)
|
||||
0:9 'scf1' (specialization-constant const float)
|
||||
0:9 'scf1' (specialization-constant const highp float)
|
||||
0:9 1.000000
|
||||
0:10 Construct bool (specialization-constant const bool)
|
||||
0:10 'scbt' (specialization-constant const bool)
|
||||
0:10 true (const bool)
|
||||
0:11 Convert int to bool (specialization-constant const bool)
|
||||
0:11 'sci2' (specialization-constant const int)
|
||||
0:11 'sci2' (specialization-constant const highp int)
|
||||
0:11 2 (const int)
|
||||
0:13 Construct float (temp float)
|
||||
0:13 'scf1' (specialization-constant const float)
|
||||
0:13 'scf1' (specialization-constant const highp float)
|
||||
0:13 1.000000
|
||||
0:14 Convert bool to float (temp float)
|
||||
0:14 'scbt' (specialization-constant const bool)
|
||||
0:14 true (const bool)
|
||||
0:15 Convert int to float (temp float)
|
||||
0:15 'sci2' (specialization-constant const int)
|
||||
0:15 'sci2' (specialization-constant const highp int)
|
||||
0:15 2 (const int)
|
||||
0:17 Convert float to int (temp int)
|
||||
0:17 'scf1' (specialization-constant const float)
|
||||
0:17 'scf1' (specialization-constant const highp float)
|
||||
0:17 1.000000
|
||||
0:18 Convert bool to int (specialization-constant const int)
|
||||
0:18 'scbt' (specialization-constant const bool)
|
||||
0:18 true (const bool)
|
||||
0:19 Construct int (specialization-constant const int)
|
||||
0:19 'sci2' (specialization-constant const int)
|
||||
0:19 'sci2' (specialization-constant const highp int)
|
||||
0:19 2 (const int)
|
||||
0:21 component-wise multiply (temp float)
|
||||
0:21 'scf1' (specialization-constant const float)
|
||||
0:21 component-wise multiply (temp highp float)
|
||||
0:21 'scf1' (specialization-constant const highp float)
|
||||
0:21 1.000000
|
||||
0:21 'scf1' (specialization-constant const float)
|
||||
0:21 'scf1' (specialization-constant const highp float)
|
||||
0:21 1.000000
|
||||
0:22 logical-or (specialization-constant const bool)
|
||||
0:22 'scbt' (specialization-constant const bool)
|
||||
0:22 true (const bool)
|
||||
0:22 'scbt' (specialization-constant const bool)
|
||||
0:22 true (const bool)
|
||||
0:23 component-wise multiply (specialization-constant const int)
|
||||
0:23 'sci2' (specialization-constant const int)
|
||||
0:23 component-wise multiply (specialization-constant const highp int)
|
||||
0:23 'sci2' (specialization-constant const highp int)
|
||||
0:23 2 (const int)
|
||||
0:23 'sci2' (specialization-constant const int)
|
||||
0:23 'sci2' (specialization-constant const highp int)
|
||||
0:23 2 (const int)
|
||||
0:24 add (temp float)
|
||||
0:24 'scf1' (specialization-constant const float)
|
||||
0:24 add (temp highp float)
|
||||
0:24 'scf1' (specialization-constant const highp float)
|
||||
0:24 1.000000
|
||||
0:24 Convert int to float (temp float)
|
||||
0:24 'sci2' (specialization-constant const int)
|
||||
0:24 Convert int to float (temp highp float)
|
||||
0:24 'sci2' (specialization-constant const highp int)
|
||||
0:24 2 (const int)
|
||||
0:26 Negate value (temp float)
|
||||
0:26 'scf1' (specialization-constant const float)
|
||||
0:26 Negate value (temp highp float)
|
||||
0:26 'scf1' (specialization-constant const highp float)
|
||||
0:26 1.000000
|
||||
0:27 Negate conditional (specialization-constant const bool)
|
||||
0:27 'scbt' (specialization-constant const bool)
|
||||
0:27 true (const bool)
|
||||
0:28 Negate value (specialization-constant const int)
|
||||
0:28 'sci2' (specialization-constant const int)
|
||||
0:28 Negate value (specialization-constant const highp int)
|
||||
0:28 'sci2' (specialization-constant const highp int)
|
||||
0:28 2 (const int)
|
||||
0:30 Compare Greater Than (temp bool)
|
||||
0:30 'scf1' (specialization-constant const float)
|
||||
0:30 'scf1' (specialization-constant const highp float)
|
||||
0:30 1.000000
|
||||
0:30 'scf1' (specialization-constant const float)
|
||||
0:30 'scf1' (specialization-constant const highp float)
|
||||
0:30 1.000000
|
||||
0:31 Compare Greater Than (specialization-constant const bool)
|
||||
0:31 'sci2' (specialization-constant const int)
|
||||
0:31 'sci2' (specialization-constant const highp int)
|
||||
0:31 2 (const int)
|
||||
0:31 'sci2' (specialization-constant const int)
|
||||
0:31 'sci2' (specialization-constant const highp int)
|
||||
0:31 2 (const int)
|
||||
0:33 Compare Not Equal (temp bool)
|
||||
0:33 'scf1' (specialization-constant const float)
|
||||
0:33 'scf1' (specialization-constant const highp float)
|
||||
0:33 1.000000
|
||||
0:33 'scf1' (specialization-constant const float)
|
||||
0:33 'scf1' (specialization-constant const highp float)
|
||||
0:33 1.000000
|
||||
0:34 Compare Not Equal (specialization-constant const bool)
|
||||
0:34 'scbt' (specialization-constant const bool)
|
||||
@ -84,48 +84,48 @@ Shader version: 450
|
||||
0:34 'scbt' (specialization-constant const bool)
|
||||
0:34 true (const bool)
|
||||
0:35 Compare Not Equal (specialization-constant const bool)
|
||||
0:35 'sci2' (specialization-constant const int)
|
||||
0:35 'sci2' (specialization-constant const highp int)
|
||||
0:35 2 (const int)
|
||||
0:35 'sci2' (specialization-constant const int)
|
||||
0:35 'sci2' (specialization-constant const highp int)
|
||||
0:35 2 (const int)
|
||||
0:37 Construct ivec2 (specialization-constant const 2-component vector of int)
|
||||
0:37 'sci2' (specialization-constant const int)
|
||||
0:37 'sci2' (specialization-constant const highp int)
|
||||
0:37 2 (const int)
|
||||
0:37 'sci2' (specialization-constant const int)
|
||||
0:37 'sci2' (specialization-constant const highp int)
|
||||
0:37 2 (const int)
|
||||
0:38 Construct ivec2 (temp 2-element array of 2-component vector of int)
|
||||
0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:40 Construct vec2 (temp 2-component vector of float)
|
||||
0:40 'scf1' (specialization-constant const float)
|
||||
0:40 'scf1' (specialization-constant const highp float)
|
||||
0:40 1.000000
|
||||
0:40 'scf1' (specialization-constant const float)
|
||||
0:40 'scf1' (specialization-constant const highp float)
|
||||
0:40 1.000000
|
||||
0:41 Construct vec2 (temp 2-element array of 2-component vector of float)
|
||||
0:41 Construct vec2 (temp 2-component vector of float)
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:41 Construct vec2 (temp 2-component vector of float)
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'scf1' (specialization-constant const float)
|
||||
0:? 'scf1' (specialization-constant const highp float)
|
||||
0:? 1.000000
|
||||
0:? 'scbt' (specialization-constant const bool)
|
||||
0:? true (const bool)
|
||||
0:? 'sci2' (specialization-constant const int)
|
||||
0:? 'sci2' (specialization-constant const highp int)
|
||||
0:? 2 (const int)
|
||||
|
||||
|
||||
@ -138,76 +138,76 @@ Shader version: 450
|
||||
0:7 Function Parameters:
|
||||
0:9 Sequence
|
||||
0:9 Convert float to bool (temp bool)
|
||||
0:9 'scf1' (specialization-constant const float)
|
||||
0:9 'scf1' (specialization-constant const highp float)
|
||||
0:9 1.000000
|
||||
0:10 Construct bool (specialization-constant const bool)
|
||||
0:10 'scbt' (specialization-constant const bool)
|
||||
0:10 true (const bool)
|
||||
0:11 Convert int to bool (specialization-constant const bool)
|
||||
0:11 'sci2' (specialization-constant const int)
|
||||
0:11 'sci2' (specialization-constant const highp int)
|
||||
0:11 2 (const int)
|
||||
0:13 Construct float (temp float)
|
||||
0:13 'scf1' (specialization-constant const float)
|
||||
0:13 'scf1' (specialization-constant const highp float)
|
||||
0:13 1.000000
|
||||
0:14 Convert bool to float (temp float)
|
||||
0:14 'scbt' (specialization-constant const bool)
|
||||
0:14 true (const bool)
|
||||
0:15 Convert int to float (temp float)
|
||||
0:15 'sci2' (specialization-constant const int)
|
||||
0:15 'sci2' (specialization-constant const highp int)
|
||||
0:15 2 (const int)
|
||||
0:17 Convert float to int (temp int)
|
||||
0:17 'scf1' (specialization-constant const float)
|
||||
0:17 'scf1' (specialization-constant const highp float)
|
||||
0:17 1.000000
|
||||
0:18 Convert bool to int (specialization-constant const int)
|
||||
0:18 'scbt' (specialization-constant const bool)
|
||||
0:18 true (const bool)
|
||||
0:19 Construct int (specialization-constant const int)
|
||||
0:19 'sci2' (specialization-constant const int)
|
||||
0:19 'sci2' (specialization-constant const highp int)
|
||||
0:19 2 (const int)
|
||||
0:21 component-wise multiply (temp float)
|
||||
0:21 'scf1' (specialization-constant const float)
|
||||
0:21 component-wise multiply (temp highp float)
|
||||
0:21 'scf1' (specialization-constant const highp float)
|
||||
0:21 1.000000
|
||||
0:21 'scf1' (specialization-constant const float)
|
||||
0:21 'scf1' (specialization-constant const highp float)
|
||||
0:21 1.000000
|
||||
0:22 logical-or (specialization-constant const bool)
|
||||
0:22 'scbt' (specialization-constant const bool)
|
||||
0:22 true (const bool)
|
||||
0:22 'scbt' (specialization-constant const bool)
|
||||
0:22 true (const bool)
|
||||
0:23 component-wise multiply (specialization-constant const int)
|
||||
0:23 'sci2' (specialization-constant const int)
|
||||
0:23 component-wise multiply (specialization-constant const highp int)
|
||||
0:23 'sci2' (specialization-constant const highp int)
|
||||
0:23 2 (const int)
|
||||
0:23 'sci2' (specialization-constant const int)
|
||||
0:23 'sci2' (specialization-constant const highp int)
|
||||
0:23 2 (const int)
|
||||
0:24 add (temp float)
|
||||
0:24 'scf1' (specialization-constant const float)
|
||||
0:24 add (temp highp float)
|
||||
0:24 'scf1' (specialization-constant const highp float)
|
||||
0:24 1.000000
|
||||
0:24 Convert int to float (temp float)
|
||||
0:24 'sci2' (specialization-constant const int)
|
||||
0:24 Convert int to float (temp highp float)
|
||||
0:24 'sci2' (specialization-constant const highp int)
|
||||
0:24 2 (const int)
|
||||
0:26 Negate value (temp float)
|
||||
0:26 'scf1' (specialization-constant const float)
|
||||
0:26 Negate value (temp highp float)
|
||||
0:26 'scf1' (specialization-constant const highp float)
|
||||
0:26 1.000000
|
||||
0:27 Negate conditional (specialization-constant const bool)
|
||||
0:27 'scbt' (specialization-constant const bool)
|
||||
0:27 true (const bool)
|
||||
0:28 Negate value (specialization-constant const int)
|
||||
0:28 'sci2' (specialization-constant const int)
|
||||
0:28 Negate value (specialization-constant const highp int)
|
||||
0:28 'sci2' (specialization-constant const highp int)
|
||||
0:28 2 (const int)
|
||||
0:30 Compare Greater Than (temp bool)
|
||||
0:30 'scf1' (specialization-constant const float)
|
||||
0:30 'scf1' (specialization-constant const highp float)
|
||||
0:30 1.000000
|
||||
0:30 'scf1' (specialization-constant const float)
|
||||
0:30 'scf1' (specialization-constant const highp float)
|
||||
0:30 1.000000
|
||||
0:31 Compare Greater Than (specialization-constant const bool)
|
||||
0:31 'sci2' (specialization-constant const int)
|
||||
0:31 'sci2' (specialization-constant const highp int)
|
||||
0:31 2 (const int)
|
||||
0:31 'sci2' (specialization-constant const int)
|
||||
0:31 'sci2' (specialization-constant const highp int)
|
||||
0:31 2 (const int)
|
||||
0:33 Compare Not Equal (temp bool)
|
||||
0:33 'scf1' (specialization-constant const float)
|
||||
0:33 'scf1' (specialization-constant const highp float)
|
||||
0:33 1.000000
|
||||
0:33 'scf1' (specialization-constant const float)
|
||||
0:33 'scf1' (specialization-constant const highp float)
|
||||
0:33 1.000000
|
||||
0:34 Compare Not Equal (specialization-constant const bool)
|
||||
0:34 'scbt' (specialization-constant const bool)
|
||||
@ -215,48 +215,48 @@ Shader version: 450
|
||||
0:34 'scbt' (specialization-constant const bool)
|
||||
0:34 true (const bool)
|
||||
0:35 Compare Not Equal (specialization-constant const bool)
|
||||
0:35 'sci2' (specialization-constant const int)
|
||||
0:35 'sci2' (specialization-constant const highp int)
|
||||
0:35 2 (const int)
|
||||
0:35 'sci2' (specialization-constant const int)
|
||||
0:35 'sci2' (specialization-constant const highp int)
|
||||
0:35 2 (const int)
|
||||
0:37 Construct ivec2 (specialization-constant const 2-component vector of int)
|
||||
0:37 'sci2' (specialization-constant const int)
|
||||
0:37 'sci2' (specialization-constant const highp int)
|
||||
0:37 2 (const int)
|
||||
0:37 'sci2' (specialization-constant const int)
|
||||
0:37 'sci2' (specialization-constant const highp int)
|
||||
0:37 2 (const int)
|
||||
0:38 Construct ivec2 (temp 2-element array of 2-component vector of int)
|
||||
0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:38 Construct ivec2 (specialization-constant const 2-component vector of int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:38 'sci2' (specialization-constant const int)
|
||||
0:38 'sci2' (specialization-constant const highp int)
|
||||
0:38 2 (const int)
|
||||
0:40 Construct vec2 (temp 2-component vector of float)
|
||||
0:40 'scf1' (specialization-constant const float)
|
||||
0:40 'scf1' (specialization-constant const highp float)
|
||||
0:40 1.000000
|
||||
0:40 'scf1' (specialization-constant const float)
|
||||
0:40 'scf1' (specialization-constant const highp float)
|
||||
0:40 1.000000
|
||||
0:41 Construct vec2 (temp 2-element array of 2-component vector of float)
|
||||
0:41 Construct vec2 (temp 2-component vector of float)
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:41 Construct vec2 (temp 2-component vector of float)
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:41 'scf1' (specialization-constant const float)
|
||||
0:41 'scf1' (specialization-constant const highp float)
|
||||
0:41 1.000000
|
||||
0:? Linker Objects
|
||||
0:? 'scf1' (specialization-constant const float)
|
||||
0:? 'scf1' (specialization-constant const highp float)
|
||||
0:? 1.000000
|
||||
0:? 'scbt' (specialization-constant const bool)
|
||||
0:? true (const bool)
|
||||
0:? 'sci2' (specialization-constant const int)
|
||||
0:? 'sci2' (specialization-constant const highp int)
|
||||
0:? 2 (const int)
|
||||
|
||||
// Module Version 10000
|
||||
|
@ -14,7 +14,7 @@ ERROR: 0:25: 'sampler2DShadow' : sampler-constructor second argument presence of
|
||||
ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: s2D
|
||||
ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
|
||||
ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
|
||||
ERROR: 0:29: '=' : cannot convert from 'const float' to 'global 4-element array of sampler3D'
|
||||
ERROR: 0:29: '=' : cannot convert from 'const float' to 'global 4-element array of highp sampler3D'
|
||||
ERROR: 0:39: 'push_constant' : can only be used with a uniform
|
||||
ERROR: 0:43: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
|
||||
ERROR: 0:43: 'push_constant' : can only be used with a block
|
||||
|
@ -15,7 +15,7 @@ ERROR: 0:15: 'constant_id' : can only be applied to a scalar
|
||||
ERROR: 0:16: 'constant_id' : specialization-constant id already used
|
||||
ERROR: 0:16: 'constant_id' : cannot declare a default, can only be used on a scalar
|
||||
ERROR: 0:20: 'subpassLoad' : no matching overloaded function found
|
||||
ERROR: 0:20: 'assign' : cannot convert from 'const float' to 'smooth out 4-component vector of float'
|
||||
ERROR: 0:20: 'assign' : cannot convert from 'const float' to 'smooth out highp 4-component vector of float'
|
||||
ERROR: 0:23: 'atomic counter types' : not allowed when using GLSL for Vulkan
|
||||
ERROR: 0:24: 'shared' : not allowed when generating SPIR-V
|
||||
ERROR: 0:25: 'packed' : not allowed when generating SPIR-V
|
||||
|
@ -1460,15 +1460,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
"uvec3 usubBorrow(highp uvec3, highp uvec3, out lowp uvec3 borrow);"
|
||||
"uvec4 usubBorrow(highp uvec4, highp uvec4, out lowp uvec4 borrow);"
|
||||
|
||||
"void umulExtended(highp uint, highp uint, highp out uint, out highp uint lsb);"
|
||||
"void umulExtended(highp uvec2, highp uvec2, highp out uvec2, out highp uvec2 lsb);"
|
||||
"void umulExtended(highp uvec3, highp uvec3, highp out uvec3, out highp uvec3 lsb);"
|
||||
"void umulExtended(highp uvec4, highp uvec4, highp out uvec4, out highp uvec4 lsb);"
|
||||
"void umulExtended(highp uint, highp uint, out highp uint, out highp uint lsb);"
|
||||
"void umulExtended(highp uvec2, highp uvec2, out highp uvec2, out highp uvec2 lsb);"
|
||||
"void umulExtended(highp uvec3, highp uvec3, out highp uvec3, out highp uvec3 lsb);"
|
||||
"void umulExtended(highp uvec4, highp uvec4, out highp uvec4, out highp uvec4 lsb);"
|
||||
|
||||
"void imulExtended(highp int, highp int, highp out int, out highp int lsb);"
|
||||
"void imulExtended(highp ivec2, highp ivec2, highp out ivec2, out highp ivec2 lsb);"
|
||||
"void imulExtended(highp ivec3, highp ivec3, highp out ivec3, out highp ivec3 lsb);"
|
||||
"void imulExtended(highp ivec4, highp ivec4, highp out ivec4, out highp ivec4 lsb);"
|
||||
"void imulExtended(highp int, highp int, out highp int, out highp int lsb);"
|
||||
"void imulExtended(highp ivec2, highp ivec2, out highp ivec2, out highp ivec2 lsb);"
|
||||
"void imulExtended(highp ivec3, highp ivec3, out highp ivec3, out highp ivec3 lsb);"
|
||||
"void imulExtended(highp ivec4, highp ivec4, out highp ivec4, out highp ivec4 lsb);"
|
||||
|
||||
" int bitfieldReverse(highp int);"
|
||||
"ivec2 bitfieldReverse(highp ivec2);"
|
||||
@ -2638,10 +2638,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
||||
);
|
||||
|
||||
stageBuiltins[EShLangFragment].append( // GL_OES_sample_variables
|
||||
"flat lowp in int gl_SampleID;"
|
||||
" mediump in vec2 gl_SamplePosition;"
|
||||
"flat highp in int gl_SampleMaskIn[];"
|
||||
" highp out int gl_SampleMask[];"
|
||||
"flat in lowp int gl_SampleID;"
|
||||
" in mediump vec2 gl_SamplePosition;"
|
||||
"flat in highp int gl_SampleMaskIn[];"
|
||||
" out highp int gl_SampleMask[];"
|
||||
"uniform lowp int gl_NumSamples;"
|
||||
);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
|
||||
linkage = new TIntermAggregate;
|
||||
|
||||
// decide whether precision qualifiers should be ignored or respected
|
||||
obeyPrecisionQualifiers_ = profile == EEsProfile;
|
||||
obeyPrecisionQualifiers_ = profile == EEsProfile || spvVersion.vulkan > 0;
|
||||
setPrecisionDefaults();
|
||||
|
||||
globalUniformDefaults.clear();
|
||||
@ -98,8 +98,11 @@ TParseContext::~TParseContext()
|
||||
// Intended just as a TParseContext constructor helper.
|
||||
void TParseContext::setPrecisionDefaults()
|
||||
{
|
||||
// set all precision defaults to EpqNone, which is correct for all desktop types
|
||||
// and for ES types that don't have defaults (thus getting an error on use)
|
||||
// Set all precision defaults to EpqNone, which is correct for all types
|
||||
// when not obeying precision qualifiers, and correct for types that don't
|
||||
// have defaults (thus getting an error on use) when obeying precision
|
||||
// qualifiers.
|
||||
|
||||
for (int type = 0; type < EbtNumTypes; ++type)
|
||||
defaultPrecision[type] = EpqNone;
|
||||
|
||||
@ -108,30 +111,35 @@ void TParseContext::setPrecisionDefaults()
|
||||
|
||||
// replace with real precision defaults for those that have them
|
||||
if (obeyPrecisionQualifiers()) {
|
||||
TSampler sampler;
|
||||
sampler.set(EbtFloat, Esd2D);
|
||||
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
|
||||
sampler.set(EbtFloat, EsdCube);
|
||||
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
|
||||
sampler.set(EbtFloat, Esd2D);
|
||||
sampler.external = true;
|
||||
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
|
||||
if (profile == EEsProfile) {
|
||||
// Most don't have defaults, a few default to lowp.
|
||||
TSampler sampler;
|
||||
sampler.set(EbtFloat, Esd2D);
|
||||
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
|
||||
sampler.set(EbtFloat, EsdCube);
|
||||
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
|
||||
sampler.set(EbtFloat, Esd2D);
|
||||
sampler.external = true;
|
||||
defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow;
|
||||
} else {
|
||||
// Non-ES profile
|
||||
// All default to highp.
|
||||
for (int type = 0; type < maxSamplerIndex; ++type)
|
||||
defaultSamplerPrecision[type] = EpqHigh;
|
||||
}
|
||||
|
||||
// If we are parsing built-in computational variables/functions, it is meaningful to record
|
||||
// whether the built-in has no precision qualifier, as that ambiguity
|
||||
// is used to resolve the precision from the supplied arguments/operands instead.
|
||||
// So, we don't actually want to replace EpqNone with a default precision for built-ins.
|
||||
if (! parsingBuiltins) {
|
||||
switch (language) {
|
||||
case EShLangFragment:
|
||||
if (profile == EEsProfile && language == EShLangFragment) {
|
||||
defaultPrecision[EbtInt] = EpqMedium;
|
||||
defaultPrecision[EbtUint] = EpqMedium;
|
||||
break;
|
||||
default:
|
||||
} else {
|
||||
defaultPrecision[EbtInt] = EpqHigh;
|
||||
defaultPrecision[EbtUint] = EpqHigh;
|
||||
defaultPrecision[EbtFloat] = EpqHigh;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user