Commit 9000bd5e by John Kessenich

Front-end: Make ES floatBitsToInt/intBitsToFloat/etc. all be highp.

parent c51287d7
...@@ -136,24 +136,24 @@ ERROR: node is still EOpNull! ...@@ -136,24 +136,24 @@ ERROR: node is still EOpNull!
0:53 isinf (global 4-component vector of bool) 0:53 isinf (global 4-component vector of bool)
0:53 'v4' (global mediump 4-component vector of float) 0:53 'v4' (global mediump 4-component vector of float)
0:56 Sequence 0:56 Sequence
0:56 move second child to first child (temp mediump int) 0:56 move second child to first child (temp highp int)
0:56 'i' (temp mediump int) 0:56 'i' (temp mediump int)
0:56 floatBitsToInt (global mediump int) 0:56 floatBitsToInt (global highp int)
0:56 'f' (global mediump float) 0:56 'f' (global mediump float)
0:57 Sequence 0:57 Sequence
0:57 move second child to first child (temp mediump 4-component vector of uint) 0:57 move second child to first child (temp highp 4-component vector of uint)
0:57 'uv11' (temp mediump 4-component vector of uint) 0:57 'uv11' (temp mediump 4-component vector of uint)
0:57 floatBitsToUint (global mediump 4-component vector of uint) 0:57 floatBitsToUint (global highp 4-component vector of uint)
0:57 'v4' (global mediump 4-component vector of float) 0:57 'v4' (global mediump 4-component vector of float)
0:58 Sequence 0:58 Sequence
0:58 move second child to first child (temp mediump 4-component vector of float) 0:58 move second child to first child (temp highp 4-component vector of float)
0:58 'v14' (temp mediump 4-component vector of float) 0:58 'v14' (temp mediump 4-component vector of float)
0:58 intBitsToFloat (global mediump 4-component vector of float) 0:58 intBitsToFloat (global highp 4-component vector of float)
0:58 'iv4a' (global mediump 4-component vector of int) 0:58 'iv4a' (global mediump 4-component vector of int)
0:59 Sequence 0:59 Sequence
0:59 move second child to first child (temp mediump 2-component vector of float) 0:59 move second child to first child (temp highp 2-component vector of float)
0:59 'v15' (temp mediump 2-component vector of float) 0:59 'v15' (temp mediump 2-component vector of float)
0:59 uintBitsToFloat (global mediump 2-component vector of float) 0:59 uintBitsToFloat (global highp 2-component vector of float)
0:59 'uv2c' (global mediump 2-component vector of uint) 0:59 'uv2c' (global mediump 2-component vector of uint)
0:62 Sequence 0:62 Sequence
0:62 move second child to first child (temp highp uint) 0:62 move second child to first child (temp highp uint)
...@@ -343,24 +343,24 @@ ERROR: node is still EOpNull! ...@@ -343,24 +343,24 @@ ERROR: node is still EOpNull!
0:53 isinf (global 4-component vector of bool) 0:53 isinf (global 4-component vector of bool)
0:53 'v4' (global mediump 4-component vector of float) 0:53 'v4' (global mediump 4-component vector of float)
0:56 Sequence 0:56 Sequence
0:56 move second child to first child (temp mediump int) 0:56 move second child to first child (temp highp int)
0:56 'i' (temp mediump int) 0:56 'i' (temp mediump int)
0:56 floatBitsToInt (global mediump int) 0:56 floatBitsToInt (global highp int)
0:56 'f' (global mediump float) 0:56 'f' (global mediump float)
0:57 Sequence 0:57 Sequence
0:57 move second child to first child (temp mediump 4-component vector of uint) 0:57 move second child to first child (temp highp 4-component vector of uint)
0:57 'uv11' (temp mediump 4-component vector of uint) 0:57 'uv11' (temp mediump 4-component vector of uint)
0:57 floatBitsToUint (global mediump 4-component vector of uint) 0:57 floatBitsToUint (global highp 4-component vector of uint)
0:57 'v4' (global mediump 4-component vector of float) 0:57 'v4' (global mediump 4-component vector of float)
0:58 Sequence 0:58 Sequence
0:58 move second child to first child (temp mediump 4-component vector of float) 0:58 move second child to first child (temp highp 4-component vector of float)
0:58 'v14' (temp mediump 4-component vector of float) 0:58 'v14' (temp mediump 4-component vector of float)
0:58 intBitsToFloat (global mediump 4-component vector of float) 0:58 intBitsToFloat (global highp 4-component vector of float)
0:58 'iv4a' (global mediump 4-component vector of int) 0:58 'iv4a' (global mediump 4-component vector of int)
0:59 Sequence 0:59 Sequence
0:59 move second child to first child (temp mediump 2-component vector of float) 0:59 move second child to first child (temp highp 2-component vector of float)
0:59 'v15' (temp mediump 2-component vector of float) 0:59 'v15' (temp mediump 2-component vector of float)
0:59 uintBitsToFloat (global mediump 2-component vector of float) 0:59 uintBitsToFloat (global highp 2-component vector of float)
0:59 'uv2c' (global mediump 2-component vector of uint) 0:59 'uv2c' (global mediump 2-component vector of uint)
0:62 Sequence 0:62 Sequence
0:62 move second child to first child (temp highp uint) 0:62 move second child to first child (temp highp uint)
......
#version 310 es
flat in mediump int i1;
flat in lowp ivec2 i2;
flat in mediump ivec3 i3;
flat in highp ivec4 i4;
flat in mediump uint u1;
flat in lowp uvec2 u2;
flat in mediump uvec3 u3;
flat in highp uvec4 u4;
mediump in float f1;
lowp in vec2 f2;
mediump in vec3 f3;
highp in vec4 f4;
void main()
{
highp ivec4 idata = ivec4(0);
idata.x += floatBitsToInt(f1);
idata.xy += floatBitsToInt(f2);
idata.xyz += floatBitsToInt(f3);
idata += floatBitsToInt(f4);
highp uvec4 udata = uvec4(0);
udata.x += floatBitsToUint(f1);
udata.xy += floatBitsToUint(f2);
udata.xyz += floatBitsToUint(f3);
udata += floatBitsToUint(f4);
highp vec4 fdata = vec4(0.0);
fdata.x += intBitsToFloat(i1);
fdata.xy += intBitsToFloat(i2);
fdata.xyz += intBitsToFloat(i3);
fdata += intBitsToFloat(i4);
fdata.x += uintBitsToFloat(u1);
fdata.xy += uintBitsToFloat(u2);
fdata.xyz += uintBitsToFloat(u3);
fdata += uintBitsToFloat(u4);
}
\ No newline at end of file
...@@ -859,26 +859,26 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan) ...@@ -859,26 +859,26 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
if ((profile == EEsProfile && version >= 300) || if ((profile == EEsProfile && version >= 300) ||
(profile != EEsProfile && version >= 330)) { (profile != EEsProfile && version >= 330)) {
commonBuiltins.append( commonBuiltins.append(
"int floatBitsToInt(float value);" "highp int floatBitsToInt(highp float value);"
"ivec2 floatBitsToInt(vec2 value);" "highp ivec2 floatBitsToInt(highp vec2 value);"
"ivec3 floatBitsToInt(vec3 value);" "highp ivec3 floatBitsToInt(highp vec3 value);"
"ivec4 floatBitsToInt(vec4 value);" "highp ivec4 floatBitsToInt(highp vec4 value);"
"uint floatBitsToUint(float value);" "highp uint floatBitsToUint(highp float value);"
"uvec2 floatBitsToUint(vec2 value);" "highp uvec2 floatBitsToUint(highp vec2 value);"
"uvec3 floatBitsToUint(vec3 value);" "highp uvec3 floatBitsToUint(highp vec3 value);"
"uvec4 floatBitsToUint(vec4 value);" "highp uvec4 floatBitsToUint(highp vec4 value);"
"float intBitsToFloat(int value);" "highp float intBitsToFloat(highp int value);"
"vec2 intBitsToFloat(ivec2 value);" "highp vec2 intBitsToFloat(highp ivec2 value);"
"vec3 intBitsToFloat(ivec3 value);" "highp vec3 intBitsToFloat(highp ivec3 value);"
"vec4 intBitsToFloat(ivec4 value);" "highp vec4 intBitsToFloat(highp ivec4 value);"
"float uintBitsToFloat(uint value);" "highp float uintBitsToFloat(highp uint value);"
"vec2 uintBitsToFloat(uvec2 value);" "highp vec2 uintBitsToFloat(highp uvec2 value);"
"vec3 uintBitsToFloat(uvec3 value);" "highp vec3 uintBitsToFloat(highp uvec3 value);"
"vec4 uintBitsToFloat(uvec4 value);" "highp vec4 uintBitsToFloat(highp uvec4 value);"
"\n"); "\n");
} }
......
...@@ -100,6 +100,7 @@ INSTANTIATE_TEST_CASE_P( ...@@ -100,6 +100,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.300layout.vert", "spv.300layout.vert",
"spv.300layoutp.vert", "spv.300layoutp.vert",
"spv.310.comp", "spv.310.comp",
"spv.310.bitcast.frag",
"spv.330.geom", "spv.330.geom",
"spv.400.frag", "spv.400.frag",
"spv.400.tesc", "spv.400.tesc",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment