FP16 precision tests VK_KHR_shader_float16_int8
authorAlexander Galazin <alexander.galazin@arm.com>
Wed, 19 Jul 2017 08:57:20 +0000 (10:57 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 22 Nov 2018 10:35:21 +0000 (05:35 -0500)
Add tests:
 * dEQP-VK.glsl.builtin.precision_fp16*
 * dEQP-VK.glsl.builtin.precision*.comparison.*

Components: Vulkan, Framework

VK-GL-CTS issues: 1094

Change-Id: Iff0d1c4c144231128e5cd80bc7f72ef162ec22fa
(cherry picked from commit 6971843a108455bc7e411d704b491d0802022e0f)

17 files changed:
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.hpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.hpp
external/vulkancts/modules/vulkan/vktTestCase.cpp
external/vulkancts/mustpass/1.1.2/vk-default-no-waivers.txt
external/vulkancts/mustpass/1.1.2/vk-default.txt
framework/common/tcuFloatFormat.cpp
framework/common/tcuFloatFormat.hpp
framework/common/tcuMatrix.hpp
framework/delibs/debase/deMath.h
framework/opengl/gluShaderUtil.cpp
framework/opengl/gluShaderUtil.hpp
framework/opengl/gluVarType.cpp
modules/glshared/glsStateQueryUtil.hpp

index a9589af..b465d31 100755 (executable)
@@ -246643,6 +246643,14 @@ dEQP-VK.glsl.builtin.function.pack_unpack.packhalf2x16_geometry
 dEQP-VK.glsl.builtin.function.pack_unpack.packhalf2x16_compute
 dEQP-VK.glsl.builtin.function.pack_unpack.unpackhalf2x16_geometry
 dEQP-VK.glsl.builtin.function.pack_unpack.unpackhalf2x16_compute
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.scalar
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec2
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec3
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec4
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.scalar
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec2
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec3
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec4
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.scalar
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.vec2
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.vec3
@@ -247077,6 +247085,515 @@ dEQP-VK.glsl.builtin.precision.fma.highp_compute.scalar
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec2
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec3
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.modf.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cross.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.determinant.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inverse.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.modf.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cross.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.determinant.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inverse.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec4
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.sampler2d
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.samplercube
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.sampler2darray
index ded456c..6efb8fd 100644 (file)
@@ -2,7 +2,7 @@
  * Vulkan Conformance Tests
  * ------------------------
  *
- * Copyright (c) 2015 The Khronos Group Inc.
+ * Copyright (c) 2018 The Khronos Group Inc.
  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  * Copyright (c) 2016 The Android Open Source Project
  *
@@ -29,6 +29,7 @@
 
 #include "deMath.h"
 #include "deMemory.h"
+#include "deFloat16.h"
 #include "deDefs.hpp"
 #include "deRandom.hpp"
 #include "deSTLUtil.hpp"
 // set this to true to dump even passing results
 #define GLS_LOG_ALL_RESULTS false
 
+#define FLOAT16_1_0            0x3C00 //1.0 float16bit
+#define FLOAT16_180_0  0x59A0 //180.0 float16bit
+#define FLOAT16_2_0            0x4000 //2.0 float16bit
+#define FLOAT16_3_0            0x4200 //3.0 float16bit
+#define FLOAT16_0_5            0x3800 //0.5 float16bit
+#define FLOAT16_0_0            0x0000 //0.0 float16bit
+
+
+using tcu::Vector;
+typedef Vector<deFloat16, 1>   Vec1_16Bit;
+typedef Vector<deFloat16, 2>   Vec2_16Bit;
+typedef Vector<deFloat16, 3>   Vec3_16Bit;
+typedef Vector<deFloat16, 4>   Vec4_16Bit;
+
 enum
 {
        // Computing reference intervals can take a non-trivial amount of time, especially on
@@ -100,6 +115,40 @@ using glu::VarType;
 using glu::DataType;
 using glu::ShaderType;
 
+enum Extension16BitStorageFeatureBits
+{
+       EXT16BITSTORAGEFEATURES_NO_EXTENSION                    = 0u,
+       EXT16BITSTORAGEFEATURES_UNIFORM_BUFFER_BLOCK    = (1u << 1),
+       EXT16BITSTORAGEFEATURES_UNIFORM                                 = (1u << 2),
+       EXT16BITSTORAGEFEATURES_PUSH_CONSTANT                   = (1u << 3),
+       EXT16BITSTORAGEFEATURES_INPUT_OUTPUT                    = (1u << 4),
+       EXTSHADER_FLOAT16_INT8                                                  = (1u << 5),
+};
+typedef deUint32 Extension16BitStorageFeatures;
+
+
+void areFeaturesSupported (const Context& context, deUint32 toCheck)
+{
+       if (toCheck == EXT16BITSTORAGEFEATURES_NO_EXTENSION) return;
+
+       const vk::VkPhysicalDevice16BitStorageFeatures& extensionFeatures = context.get16BitStorageFeatures();
+
+       if ((toCheck & EXT16BITSTORAGEFEATURES_UNIFORM_BUFFER_BLOCK) != 0 && extensionFeatures.storageBuffer16BitAccess == VK_FALSE)
+               TCU_THROW(NotSupportedError, "Requested 16bit storage features not supported");
+
+       if ((toCheck & EXT16BITSTORAGEFEATURES_UNIFORM) != 0 && extensionFeatures.uniformAndStorageBuffer16BitAccess == VK_FALSE)
+               TCU_THROW(NotSupportedError, "Requested 16bit storage features not supported");
+
+       if ((toCheck & EXT16BITSTORAGEFEATURES_PUSH_CONSTANT) != 0 && extensionFeatures.storagePushConstant16 == VK_FALSE)
+               TCU_THROW(NotSupportedError, "Requested 16bit storage features not supported");
+
+       if ((toCheck & EXT16BITSTORAGEFEATURES_INPUT_OUTPUT) != 0 && extensionFeatures.storageInputOutput16 == VK_FALSE)
+               TCU_THROW(NotSupportedError, "Requested 16bit storage features not supported");
+
+       if (!context.getFloat16Int8Features().shaderFloat16)
+               TCU_THROW(NotSupportedError, "Requested 16-bit floats (halfs) are not supported in shader code");
+}
+
 /*--------------------------------------------------------------------*//*!
  * \brief Generic singleton creator.
  *
@@ -154,6 +203,12 @@ ostream& operator<< (ostream& os, Void) { return os << "()"; }
 template <typename T>  bool isTypeValid                (void)  { return true;  }
 template <>                            bool isTypeValid<Void>  (void)  { return false; }
 
+template <typename T>  bool isInteger                          (void)  { return false; }
+template <>                            bool isInteger<int>                     (void)  { return true;  }
+template <>                            bool isInteger<tcu::IVec2>      (void)  { return true;  }
+template <>                            bool isInteger<tcu::IVec3>      (void)  { return true; }
+template <>                            bool isInteger<tcu::IVec4>      (void)  { return true; }
+
 //! Utility function for getting the name of a data type.
 //! This is used in vector and matrix constructors.
 template <typename T>
@@ -169,13 +224,13 @@ const char* dataTypeNameOf<Void> (void)
        return DE_NULL;
 }
 
-//! A hack to get Void support for VarType.
 template <typename T>
 VarType getVarTypeOf (Precision prec = glu::PRECISION_LAST)
 {
        return glu::varTypeOf<T>(prec);
 }
 
+//! A hack to get Void support for VarType.
 template <>
 VarType getVarTypeOf<Void> (Precision)
 {
@@ -227,9 +282,9 @@ typename Traits<T>::IVal unionIVal (const typename Traits<T>::IVal& a,
 
 //! Returns true iff every element of `ival` contains the corresponding element of `value`.
 template <typename T>
-bool contains (const typename Traits<T>::IVal& ival, const T& value)
+bool contains (const typename Traits<T>::IVal& ival, const T& value, bool is16Bit = false)
 {
-       return Traits<T>::doContains(ival, value);
+       return Traits<T>::doContains(ival, value, is16Bit);
 }
 
 //! Print out an interval with the precision of `fmt`.
@@ -249,16 +304,121 @@ string intervalToString (const FloatFormat& fmt, const typename Traits<T>::IVal&
 
 //! Print out a value with the precision of `fmt`.
 template <typename T>
-void printValue (const FloatFormat& fmt, const T& value, ostream& os)
+void printValue16 (const FloatFormat& fmt, const T& value, ostream& os)
+{
+       Traits<T>::doPrintValue16(fmt, value, os);
+}
+
+template <typename T>
+string value16ToString(const FloatFormat& fmt, const T& val)
+{
+       ostringstream oss;
+       printValue16(fmt, val, oss);
+       return oss.str();
+}
+
+const std::string getComparisonOperation(const int ndx)
+{
+       const int operationCount = 10;
+       DE_ASSERT(de::inBounds(ndx, 0, operationCount));
+       const std::string operations[operationCount] =
+       {
+               "OpFOrdEqual\t\t\t",
+               "OpFOrdGreaterThan\t",
+               "OpFOrdLessThan\t\t",
+               "OpFOrdGreaterThanEqual",
+               "OpFOrdLessThanEqual\t",
+               "OpFUnordEqual\t\t",
+               "OpFUnordGreaterThan\t",
+               "OpFUnordLessThan\t",
+               "OpFUnordGreaterThanEqual",
+               "OpFUnordLessThanEqual"
+       };
+       return operations[ndx];
+}
+
+template <typename T>
+string comparisonMessage(const T& val)
+{
+       DE_UNREF(val);
+       return "";
+}
+
+template <>
+string comparisonMessage(const int& val)
+{
+       ostringstream oss;
+
+       int flags = val;
+       for(int ndx = 0; ndx < 10; ++ndx)
+       {
+               oss << getComparisonOperation(ndx) << "\t:\t" << ((flags & 1) == 1 ? "TRUE" : "FALSE") << "\n";
+               flags = flags >> 1;
+       }
+       return oss.str();
+}
+
+template <>
+string comparisonMessage(const tcu::IVec2& val)
+{
+       ostringstream oss;
+       tcu::IVec2 flags = val;
+       for (int ndx = 0; ndx < 10; ++ndx)
+       {
+               oss << getComparisonOperation(ndx) << "\t:\t" << ((flags.x() & 1) == 1 ? "TRUE" : "FALSE") << "\t" << ((flags.y() & 1) == 1 ? "TRUE" : "FALSE") << "\n";
+               flags.x() = flags.x() >> 1;
+               flags.y() = flags.y() >> 1;
+       }
+       return oss.str();
+}
+
+template <>
+string comparisonMessage(const tcu::IVec3& val)
+{
+       ostringstream oss;
+       tcu::IVec3 flags = val;
+       for (int ndx = 0; ndx < 10; ++ndx)
+       {
+               oss << getComparisonOperation(ndx) << "\t:\t" << ((flags.x() & 1) == 1 ? "TRUE" : "FALSE") << "\t"
+                                                               << ((flags.y() & 1) == 1 ? "TRUE" : "FALSE") << "\t"
+                                                               << ((flags.z() & 1) == 1 ? "TRUE" : "FALSE") << "\n";
+               flags.x() = flags.x() >> 1;
+               flags.y() = flags.y() >> 1;
+               flags.z() = flags.z() >> 1;
+       }
+       return oss.str();
+}
+
+template <>
+string comparisonMessage(const tcu::IVec4& val)
+{
+       ostringstream oss;
+       tcu::IVec4 flags = val;
+       for (int ndx = 0; ndx < 10; ++ndx)
+       {
+               oss << getComparisonOperation(ndx) << "\t:\t" << ((flags.x() & 1) == 1 ? "TRUE" : "FALSE") << "\t"
+                       << ((flags.y() & 1) == 1 ? "TRUE" : "FALSE") << "\t"
+                       << ((flags.z() & 1) == 1 ? "TRUE" : "FALSE") << "\t"
+                       << ((flags.w() & 1) == 1 ? "TRUE" : "FALSE") << "\n";
+               flags.x() = flags.x() >> 1;
+               flags.y() = flags.y() >> 1;
+               flags.z() = flags.z() >> 1;
+               flags.w() = flags.z() >> 1;
+       }
+       return oss.str();
+}
+//! Print out a value with the precision of `fmt`.
+template <typename T>
+void printValue32 (const FloatFormat& fmt, const T& value, ostream& os)
 {
-       Traits<T>::doPrintValue(fmt, value, os);
+       Traits<T>::doPrintValue32(fmt, value, os);
 }
 
 template <typename T>
-string valueToString (const FloatFormat& fmt, const T& val)
+string value32ToString (const FloatFormat& fmt, const T& val)
 {
        ostringstream oss;
-       printValue(fmt, val, oss);
+       printValue32(fmt, val, oss);
        return oss.str();
 }
 
@@ -306,12 +466,46 @@ struct ScalarTraits
                return fmt.convert(ival);
        }
 
+       static Interval         doConvert               (const FloatFormat& fmt, const IVal& ival, bool is16Bit)
+       {
+               DE_UNREF(is16Bit);
+               return fmt.convert(ival);
+       }
+
        static Interval         doRound                 (const FloatFormat& fmt, T value)
        {
                return fmt.roundOut(double(value), false);
        }
 };
 
+template <>
+struct ScalarTraits<deUint16>
+{
+       typedef                         Interval                IVal;
+
+       static Interval         doMakeIVal              (const deUint16& value)
+       {
+               // Thankfully all scalar types have a well-defined conversion to `double`,
+               // hence Interval can represent their ranges without problems.
+               return Interval(double(deFloat16To32(value)));
+       }
+
+       static Interval         doUnion                 (const Interval& a, const Interval& b)
+       {
+               return a | b;
+       }
+
+       static Interval         doConvert               (const FloatFormat& fmt, const IVal& ival)
+       {
+               return fmt.convert(ival);
+       }
+
+       static Interval         doRound                 (const FloatFormat& fmt, deUint16 value)
+       {
+               return fmt.roundOut(double(deFloat16To32(value)), false);
+       }
+};
+
 template<>
 struct Traits<float> : ScalarTraits<float>
 {
@@ -322,24 +516,86 @@ struct Traits<float> : ScalarTraits<float>
                os << fmt.intervalToHex(ival);
        }
 
-       static void                     doPrintValue    (const FloatFormat&     fmt,
+       static void                     doPrintValue16  (const FloatFormat&     fmt,
+                                                                                const float&           value,
+                                                                                ostream&                       os)
+       {
+               const deUint32 iRep = reinterpret_cast<const deUint32 & >(value);
+               float res0 = deFloat16To32((deFloat16)(iRep & 0xFFFF));
+               float res1 = deFloat16To32((deFloat16)(iRep >> 16));
+               os << fmt.floatToHex(res0) << " " << fmt.floatToHex(res1);
+       }
+
+       static void                     doPrintValue32  (const FloatFormat&     fmt,
                                                                                 const float&           value,
                                                                                 ostream&                       os)
        {
                os << fmt.floatToHex(value);
        }
+
+       static bool                     doContains              (const Interval& a, const float& value, bool is16Bit = false)
+       {
+               if(is16Bit)
+               {
+                       const deUint32 iRep = reinterpret_cast<const deUint32&>(value);
+                       float res0 = deFloat16To32((deFloat16)(iRep & 0xFFFF));
+                       float res1 = deFloat16To32((deFloat16)(iRep >> 16));
+                       return a.contains(double(res0)) && (res1 == -1.0);
+               }
+               return a.contains(value);
+       }
+};
+
+template<>
+struct Traits<deFloat16> : ScalarTraits<deFloat16>
+{
+       static void                     doPrintIVal             (const FloatFormat&     fmt,
+                                                                                const Interval&        ival,
+                                                                                ostream&                       os)
+       {
+               os << fmt.intervalToHex(ival);
+       }
+
+       static void                     doPrintValue16  (const FloatFormat&     fmt,
+                                                                                const deFloat16&       value,
+                                                                                ostream&                       os)
+       {
+               const float res0 = deFloat16To32(value);
+               os << fmt.floatToHex(static_cast<double>(res0));
+       }
+       static void                     doPrintValue32  (const FloatFormat&     fmt,
+                                                                                const deFloat16&       value,
+                                                                                ostream&                       os)
+       {
+               const float res0 = deFloat16To32(value);
+               os << fmt.floatToHex(static_cast<double>(res0));
+       }
+
+       static bool                     doContains              (const Interval& a, const deFloat16& value, bool is16Bit = false)
+       {
+               DE_UNREF(is16Bit);
+               float res0 = deFloat16To32(value);
+               return a.contains(double(res0));
+       }
 };
 
 template<>
 struct Traits<bool> : ScalarTraits<bool>
 {
-       static void                     doPrintValue    (const FloatFormat&,
+       static void                     doPrintValue16  (const FloatFormat&,
                                                                                 const float&           value,
                                                                                 ostream&                       os)
        {
                os << (value != 0.0f ? "true" : "false");
        }
 
+       static void             doPrintValue32  (const                  FloatFormat&,
+                                                                        const float&   value,
+                                                                        ostream&               os)
+       {
+               os << (value != 0.0f ? "true" : "false");
+       }
+
        static void                     doPrintIVal             (const FloatFormat&,
                                                                                 const Interval&        ival,
                                                                                 ostream&                       os)
@@ -358,7 +614,16 @@ struct Traits<bool> : ScalarTraits<bool>
 template<>
 struct Traits<int> : ScalarTraits<int>
 {
-       static void                     doPrintValue    (const FloatFormat&,
+       static void                     doPrintValue16  (const FloatFormat&,
+                                                                                const int&                     value,
+                                                                                ostream&                       os)
+       {
+               int res0 = value & 0xFFFF;
+               int res1 = value >> 16;
+               os << res0 << " " << res1;
+       }
+
+       static void             doPrintValue32          (const FloatFormat&,
                                                                                 const int&                     value,
                                                                                 ostream&                       os)
        {
@@ -371,6 +636,12 @@ struct Traits<int> : ScalarTraits<int>
        {
                os << "[" << int(ival.lo()) << ", " << int(ival.hi()) << "]";
        }
+
+       static bool                     doContains              (const Interval& a, const int& value, bool is16Bit)
+       {
+               DE_UNREF(is16Bit);
+               return a.contains(double(value));
+       }
 };
 
 //! Common traits for containers, i.e. vectors and matrices.
@@ -401,10 +672,10 @@ struct ContainerTraits
                return ret;
        }
 
-       static bool                     doContains              (const IVal& ival, const T& value)
+       static bool                     doContains              (const IVal& ival, const T& value, bool is16Bit = false)
        {
                for (int ndx = 0; ndx < T::SIZE; ++ndx)
-                       if (!contains(ival[ndx], value[ndx]))
+                       if (!contains(ival[ndx], value[ndx], is16Bit))
                                return false;
 
                return true;
@@ -425,7 +696,22 @@ struct ContainerTraits
                os << ")";
        }
 
-       static void                     doPrintValue    (const FloatFormat& fmt, const T& value, ostream& os)
+       static void                     doPrintValue16  (const FloatFormat& fmt, const T& value, ostream& os)
+       {
+               os << dataTypeNameOf<T>() << "(";
+
+               for (int ndx = 0; ndx < T::SIZE; ++ndx)
+               {
+                       if (ndx > 0)
+                               os << ", ";
+
+                       printValue16<Element>(fmt, value[ndx], os);
+               }
+
+               os << ")";
+       }
+
+       static void                     doPrintValue32  (const FloatFormat& fmt, const T& value, ostream& os)
        {
                os << dataTypeNameOf<T>() << "(";
 
@@ -434,7 +720,7 @@ struct ContainerTraits
                        if (ndx > 0)
                                os << ", ";
 
-                       printValue<Element>(fmt, value[ndx], os);
+                       printValue32<Element>(fmt, value[ndx], os);
                }
 
                os << ")";
@@ -480,13 +766,19 @@ struct Traits<Void>
 {
        typedef         Void                    IVal;
 
-       static Void     doMakeIVal              (const Void& value)                                             { return value; }
-       static Void     doUnion                 (const Void&, const Void&)                              { return Void(); }
-       static bool     doContains              (const Void&, Void)                                             { return true; }
-       static Void     doRound                 (const FloatFormat&, const Void& value) { return value; }
-       static Void     doConvert               (const FloatFormat&, const Void& value) { return value; }
+       static Void     doMakeIVal              (const Void& value)                                                                             { return value; }
+       static Void     doUnion                 (const Void&, const Void&)                                                              { return Void(); }
+       static bool     doContains              (const Void&, Void)                                                                             { return true; }
+       static bool     doContains              (const Void&, const Void& value, bool is16Bit)                  { DE_UNREF(value); DE_UNREF(is16Bit); return true; }
+       static Void     doRound                 (const FloatFormat&, const Void& value)                                 { return value; }
+       static Void     doConvert               (const FloatFormat&, const Void& value)                                 { return value; }
 
-       static void     doPrintValue    (const FloatFormat&, const Void&, ostream& os)
+       static void     doPrintValue16  (const FloatFormat&, const Void&, ostream& os)
+       {
+               os << "()";
+       }
+
+       static void     doPrintValue32  (const FloatFormat&, const Void&, ostream& os)
        {
                os << "()";
        }
@@ -510,6 +802,46 @@ template <>                                struct ElementOf<float> { typedef       void                            Element; };
 template <>                            struct ElementOf<bool>  { typedef       void                            Element; };
 template <>                            struct ElementOf<int>   { typedef       void                            Element; };
 
+template <typename T>
+string comparisonMessageInterval(const typename Traits<T>::IVal& val)
+{
+       DE_UNREF(val);
+       return "";
+}
+
+template <>
+string comparisonMessageInterval<int>(const Traits<int>::IVal& val)
+{
+       return comparisonMessage(static_cast<int>(val.lo()));
+}
+
+template <>
+string comparisonMessageInterval<float>(const Traits<float>::IVal& val)
+{
+       return comparisonMessage(static_cast<int>(val.lo()));
+}
+
+template <>
+string comparisonMessageInterval<tcu::Vector<int, 2> >(const tcu::Vector<tcu::Interval, 2> & val)
+{
+       tcu::IVec2 result(static_cast<int>(val[0].lo()), static_cast<int>(val[1].lo()));
+       return comparisonMessage(result);
+}
+
+template <>
+string comparisonMessageInterval<tcu::Vector<int, 3> >(const tcu::Vector<tcu::Interval, 3> & val)
+{
+       tcu::IVec3 result(static_cast<int>(val[0].lo()), static_cast<int>(val[1].lo()), static_cast<int>(val[2].lo()));
+       return comparisonMessage(result);
+}
+
+template <>
+string comparisonMessageInterval<tcu::Vector<int, 4> >(const tcu::Vector<tcu::Interval, 4> & val)
+{
+       tcu::IVec4 result(static_cast<int>(val[0].lo()), static_cast<int>(val[1].lo()), static_cast<int>(val[2].lo()), static_cast<int>(val[3].lo()));
+       return comparisonMessage(result);
+}
+
 /*--------------------------------------------------------------------*//*!
  *
  * \name Abstract syntax for expressions and statements.
@@ -589,16 +921,19 @@ struct EvalContext
        EvalContext (const FloatFormat& format_,
                                 Precision                      floatPrecision_,
                                 Environment&           env_,
-                                int                            callDepth_ = 0)
-               : format                        (format_)
-               , floatPrecision        (floatPrecision_)
-               , env                           (env_)
-               , callDepth                     (callDepth_) {}
+                                int                            callDepth_,
+                                bool                           isShaderFloat16Int8_ = false)
+               : format                                (format_)
+               , floatPrecision                (floatPrecision_)
+               , env                                   (env_)
+               , callDepth                             (callDepth_)
+               , isShaderFloat16Int8   (isShaderFloat16Int8_) {}
 
        FloatFormat             format;
        Precision               floatPrecision;
        Environment&    env;
        int                             callDepth;
+       bool                    isShaderFloat16Int8;
 };
 
 /*--------------------------------------------------------------------*//*!
@@ -666,11 +1001,13 @@ public:
        void                    print                   (ostream&               os)             const   { this->doPrint(os);                     }
        //! Add the functions used in this statement to `dst`.
        void                    getUsedFuncs    (FuncSet& dst)                  const   { this->doGetUsedFuncs(dst);     }
+       void                    failed                  (EvalContext& ctx)              const   { this->doFail(ctx);                     }
 
 protected:
        virtual void    doPrint                 (ostream& os)                   const   = 0;
        virtual void    doExecute               (EvalContext& ctx)              const   = 0;
        virtual void    doGetUsedFuncs  (FuncSet& dst)                  const   = 0;
+       virtual void    doFail                  (EvalContext& ctx)              const   { DE_UNREF(ctx); }
 };
 
 ostream& operator<<(ostream& os, const Statement& stmt)
@@ -717,7 +1054,8 @@ protected:
                else
                        os << m_variable->getName();
 
-               os << " = " << *m_value << ";\n";
+               os << " = ";
+               os<< *m_value << ";\n";
        }
 
        void                    doExecute                       (EvalContext& ctx)                                              const
@@ -733,6 +1071,14 @@ protected:
                m_value->getUsedFuncs(dst);
        }
 
+       virtual void    doFail                  (EvalContext& ctx)              const
+       {
+               if (m_isDeclaration)
+                       ctx.env.bind(*m_variable, m_value->fails(ctx));
+               else
+                       ctx.env.lookup(*m_variable) = m_value->fails(ctx);
+       }
+
        VariableP<T>    m_variable;
        ExprP<T>                m_value;
        bool                    m_isDeclaration;
@@ -829,9 +1175,11 @@ public:
        typedef typename        Traits<T>::IVal IVal;
 
        IVal                            evaluate                (const EvalContext&     ctx) const;
+       IVal                            fails                   (const EvalContext&     ctx) const      { return this->doFails(ctx); }
 
 protected:
        virtual IVal            doEvaluate              (const EvalContext&     ctx) const = 0;
+       virtual IVal            doFails                 (const EvalContext&     ctx) const {return doEvaluate(ctx);}
 };
 
 //! Evaluate an expression with the given context, optionally tracing the calls to stderr.
@@ -843,7 +1191,7 @@ typename Traits<T>::IVal Expr<T>::evaluate (const EvalContext& ctx) const
                                                                                         tcu::MAYBE,
                                                                                         tcu::YES,
                                                                                         tcu::MAYBE);
-       EvalContext                                     newCtx          (ctx.format, ctx.floatPrecision,
+       EvalContext                                     newCtx          (ctx.format, ctx.basicType,
                                                                                         ctx.env, ctx.callDepth + 1);
        const IVal                                      ret                     = this->doEvaluate(newCtx);
 
@@ -947,43 +1295,53 @@ public:
  * operands a and b, and so on.
  *
  *//*--------------------------------------------------------------------*/
-ExprP<float>                                           operator-(const ExprP<float>&                                           arg0);
-ExprP<float>                                           operator+(const ExprP<float>&                                           arg0,
-                                                                                         const ExprP<float>&                                           arg1);
-ExprP<float>                                           operator-(const ExprP<float>&                                           arg0,
-                                                                                         const ExprP<float>&                                           arg1);
-ExprP<float>                                           operator*(const ExprP<float>&                                           arg0,
-                                                                                         const ExprP<float>&                                           arg1);
-ExprP<float>                                           operator/(const ExprP<float>&                                           arg0,
+ExprP<float>                                           operator+ (const ExprP<float>&                                          arg0,
                                                                                          const ExprP<float>&                                           arg1);
-template<int Size>
-ExprP<Vector<float, Size> >                    operator-(const ExprP<Vector<float, Size> >&            arg0);
-template<int Size>
-ExprP<Vector<float, Size> >                    operator*(const ExprP<Vector<float, Size> >&            arg0,
+ExprP<deFloat16>                                       operator+ (const ExprP<deFloat16>&                                      arg0,
+                                                                                         const ExprP<deFloat16>&                                       arg1);
+template <typename T>
+ExprP<T>                                                       operator- (const ExprP<T>& arg0);
+template <typename T>
+ExprP<T>                                                       operator- (const ExprP<T>&                                                      arg0,
+                                                                                         const ExprP<T>&                                                       arg1);
+template<int Left, int Mid, int Right, typename T>
+ExprP<Matrix<T, Left, Right> >         operator* (const ExprP<Matrix<T, Left, Mid> >&          left,
+                                                                                          const ExprP<Matrix<T, Mid, Right> >&         right);
+ExprP<float>                                           operator* (const ExprP<float>&                                          arg0,
                                                                                          const ExprP<float>&                                           arg1);
-template<int Size>
-ExprP<Vector<float, Size> >                    operator*(const ExprP<Vector<float, Size> >&            arg0,
-                                                                                         const ExprP<Vector<float, Size> >&            arg1);
-template<int Size>
-ExprP<Vector<float, Size> >                    operator-(const ExprP<Vector<float, Size> >&            arg0,
-                                                                                         const ExprP<Vector<float, Size> >&            arg1);
-template<int Left, int Mid, int Right>
-ExprP<Matrix<float, Left, Right> >     operator* (const ExprP<Matrix<float, Left, Mid> >&      left,
-                                                                                          const ExprP<Matrix<float, Mid, Right> >&     right);
-template<int Rows, int Cols>
-ExprP<Vector<float, Rows> >                    operator* (const ExprP<Vector<float, Cols> >&           left,
-                                                                                          const ExprP<Matrix<float, Rows, Cols> >&     right);
-template<int Rows, int Cols>
-ExprP<Vector<float, Cols> >                    operator* (const ExprP<Matrix<float, Rows, Cols> >&     left,
-                                                                                          const ExprP<Vector<float, Rows> >&           right);
-template<int Rows, int Cols>
-ExprP<Matrix<float, Rows, Cols> >      operator* (const ExprP<Matrix<float, Rows, Cols> >&     left,
-                                                                                          const ExprP<float>&                                          right);
+ExprP<deFloat16>                                       operator* (const ExprP<deFloat16>&                                      arg0,
+                                                                                          const ExprP<deFloat16>&                                      arg1);
+template <typename T>
+ExprP<T>                                                       operator/ (const ExprP<T>&                                                      arg0,
+                                                                                         const ExprP<T>&                                                       arg1);
+template<typename T, int Size>
+ExprP<Vector<T, Size> >                                operator- (const ExprP<Vector<T, Size> >&                       arg0);
+template<typename T, int Size>
+ExprP<Vector<T, Size> >                                operator- (const ExprP<Vector<T, Size> >&                       arg0,
+                                                                                          const ExprP<Vector<T, Size> >&                       arg1);
+template<int Size, typename T>
+ExprP<Vector<T, Size> >                                operator* (const ExprP<Vector<T, Size> >&                       arg0,
+                                                                                          const ExprP<T>&                                                      arg1);
+template<typename T, int Size>
+ExprP<Vector<T, Size> >                                operator* (const ExprP<Vector<T, Size> >&                       arg0,
+                                                                                          const ExprP<Vector<T, Size> >&                       arg1);
+template<int Rows, int Cols, typename T>
+ExprP<Vector<T, Rows> >                                operator* (const ExprP<Vector<T, Cols> >&                       left,
+                                                                                          const ExprP<Matrix<T, Rows, Cols> >&         right);
+template<int Rows, int Cols, typename T>
+ExprP<Vector<T, Cols> >                                operator* (const ExprP<Matrix<T, Rows, Cols> >&         left,
+                                                                                          const ExprP<Vector<T, Rows> >&                       right);
+template<int Rows, int Cols, typename T>
+ExprP<Matrix<T, Rows, Cols> >          operator* (const ExprP<Matrix<T, Rows, Cols> >&         left,
+                                                                                          const ExprP<T>&                                                      right);
 template<int Rows, int Cols>
 ExprP<Matrix<float, Rows, Cols> >      operator+ (const ExprP<Matrix<float, Rows, Cols> >&     left,
                                                                                           const ExprP<Matrix<float, Rows, Cols> >&     right);
 template<int Rows, int Cols>
-ExprP<Matrix<float, Rows, Cols> >      operator- (const ExprP<Matrix<float, Rows, Cols> >&     mat);
+ExprP<Matrix<deFloat16, Rows, Cols> >  operator+ (const ExprP<Matrix<deFloat16, Rows, Cols> >& left,
+                                                                                                  const ExprP<Matrix<deFloat16, Rows, Cols> >& right);
+template<typename T, int Rows, int Cols>
+ExprP<Matrix<T, Rows, Cols> >  operator- (const ExprP<Matrix<T, Rows, Cols> >& mat);
 
 //! @}
 
@@ -1129,28 +1487,29 @@ typedef vector<const ExprBase*> BaseArgExprs;
 class FuncBase
 {
 public:
-       virtual                 ~FuncBase                               (void)                                  {}
-       virtual string  getName                                 (void)                                  const = 0;
+       virtual                         ~FuncBase                               (void)                                  {}
+       virtual string          getName                                 (void)                                  const = 0;
        //! Name of extension that this function requires, or empty.
-       virtual string  getRequiredExtension    (void)                                  const { return ""; }
-       virtual void    print                                   (ostream&,
-                                                                                        const BaseArgExprs&)   const = 0;
+       virtual string          getRequiredExtension    (void)                                  const { return ""; }
+       virtual Interval        getInputRange                   (const bool is16bit)    const {DE_UNREF(is16bit); return Interval(true, -TCU_INFINITY, TCU_INFINITY); }
+       virtual void            print                                   (ostream&,
+                                                                                                const BaseArgExprs&)   const = 0;
        //! Index of output parameter, or -1 if none of the parameters is output.
-       virtual int             getOutParamIndex                (void)                                  const { return -1; }
+       virtual int                     getOutParamIndex                (void)                                  const { return -1; }
 
-       void                    printDefinition                 (ostream& os)                   const
+       void                            printDefinition                 (ostream& os)                   const
        {
                doPrintDefinition(os);
        }
 
-       void                            getUsedFuncs            (FuncSet& dst) const
+       void                            getUsedFuncs                    (FuncSet& dst) const
        {
                this->doGetUsedFuncs(dst);
        }
 
 protected:
-       virtual void    doPrintDefinition               (ostream& os)                   const = 0;
-       virtual void    doGetUsedFuncs                  (FuncSet& dst)                  const = 0;
+       virtual void            doPrintDefinition               (ostream& os)                   const = 0;
+       virtual void            doGetUsedFuncs                  (FuncSet& dst)                  const = 0;
 };
 
 typedef Tuple4<string, string, string, string> ParamNames;
@@ -1198,6 +1557,15 @@ public:
        {
                return this->applyArgs(ctx, IArgs(arg0, arg1, arg2, arg3));
        }
+
+       IRet                            fail                    (const EvalContext&     ctx,
+                                                                                const IArg0&           arg0 = IArg0(),
+                                                                                const IArg1&           arg1 = IArg1(),
+                                                                                const IArg2&           arg2 = IArg2(),
+                                                                                const IArg3&           arg3 = IArg3())         const
+       {
+               return this->doFail(ctx, IArgs(arg0, arg1, arg2, arg3));
+       }
        IRet                            applyArgs               (const EvalContext&     ctx,
                                                                                 const IArgs&           args)                           const
        {
@@ -1216,6 +1584,11 @@ public:
 protected:
        virtual IRet            doApply                 (const EvalContext&,
                                                                                 const IArgs&)                                                  const = 0;
+       virtual IRet            doFail                  (const EvalContext&     ctx,
+                                                                                const IArgs&           args)                           const
+       {
+               return this->doApply(ctx, args);
+       }
        virtual void            doPrint                 (ostream& os, const BaseArgExprs& args) const
        {
                os << getName() << "(";
@@ -1408,6 +1781,17 @@ protected:
                                                                  ctx.env.lookup(var0), ctx.env.lookup(var1),
                                                                  ctx.env.lookup(var2), ctx.env.lookup(var3));
        }
+
+       IVal                            doFails         (const EvalContext& ctx) const
+       {
+               const Variable<Arg0>&   var0 = static_cast<const Variable<Arg0>&>(*this->m_args.a);
+               const Variable<Arg1>&   var1 = static_cast<const Variable<Arg1>&>(*this->m_args.b);
+               const Variable<Arg2>&   var2 = static_cast<const Variable<Arg2>&>(*this->m_args.c);
+               const Variable<Arg3>&   var3 = static_cast<const Variable<Arg3>&>(*this->m_args.d);
+               return this->m_func.fail(ctx,
+                                                                 ctx.env.lookup(var0), ctx.env.lookup(var1),
+                                                                 ctx.env.lookup(var2), ctx.env.lookup(var3));
+       }
 };
 
 template <typename Sig>
@@ -1477,7 +1861,7 @@ protected:
                funEnv.bind(*m_var3, args.d);
 
                {
-                       EvalContext     funCtx(ctx.format, ctx.floatPrecision, funEnv, ctx.callDepth);
+                       EvalContext     funCtx(ctx.format, ctx.floatPrecision, funEnv, ctx.callDepth, ctx.isShaderFloat16Int8);
 
                        for (size_t ndx = 0; ndx < m_body.size(); ++ndx)
                                m_body[ndx]->execute(funCtx);
@@ -1658,11 +2042,14 @@ ExprP<T> cond (const ExprP<bool>&       test,
  * @}
  *
  *//*--------------------------------------------------------------------*/
-
-class FloatFunc1 : public PrimitiveFunc<Signature<float, float> >
+//Proper parameters for template T
+//     Signature<float, float>         32bit tests
+//     Signature<float, deFloat16>     16bit tests
+template< class T>
+class FloatFunc1 : public PrimitiveFunc<T>
 {
 protected:
-       Interval                        doApply                 (const EvalContext& ctx, const IArgs& iargs) const
+               Interval                        doApply                 (const EvalContext& ctx, const Signature<float, float>::IArgs& iargs) const
        {
                return this->applyMonotone(ctx, iargs.a);
        }
@@ -1707,7 +2094,11 @@ protected:
        virtual double          precision               (const EvalContext& ctx, double, double) const = 0;
 };
 
-class CFloatFunc1 : public FloatFunc1
+/*Proper parameters for template T
+       Signature<float, float>         32bit tests
+       Signature<float, deFloat16>     16bit tests*/
+template <class T>
+class CFloatFunc1 : public FloatFunc1<T>
 {
 public:
                                                CFloatFunc1     (const string& name, tcu::DoubleFunc1& func)
@@ -1722,10 +2113,13 @@ protected:
        tcu::DoubleFunc1&       m_func;
 };
 
-class FloatFunc2 : public PrimitiveFunc<Signature<float, float, float> >
+//<Signature<float, deFloat16, deFloat16> >
+//<Signature<float, float, float> >
+template <class T>
+class FloatFunc2 : public PrimitiveFunc<T>
 {
 protected:
-       Interval                        doApply                 (const EvalContext&     ctx, const IArgs& iargs) const
+       Interval                        doApply                 (const EvalContext&     ctx, const Signature<float, float, float>::IArgs& iargs) const
        {
                return this->applyMonotone(ctx, iargs.a, iargs.b);
        }
@@ -1778,7 +2172,8 @@ protected:
                                                                                 double                         y) const = 0;
 };
 
-class CFloatFunc2 : public FloatFunc2
+template <class T>
+class CFloatFunc2 : public FloatFunc2<T>
 {
 public:
                                                CFloatFunc2     (const string&          name,
@@ -1797,7 +2192,35 @@ protected:
        tcu::DoubleFunc2&       m_func;
 };
 
-class InfixOperator : public FloatFunc2
+template <class T>
+class InfixOperator : public FloatFunc2<T>
+{
+protected:
+       virtual string  getSymbol               (void) const = 0;
+
+       void                    doPrint                 (ostream& os, const BaseArgExprs& args) const
+       {
+               os << "(" << *args[0] << " " << getSymbol() << " " << *args[1] << ")";
+       }
+
+       Interval                applyPoint              (const EvalContext&     ctx,
+                                                                        double                         x,
+                                                                        double                         y) const
+       {
+               const double exact      = this->applyExact(x, y);
+
+               // Allow either representable number on both sides of the exact value,
+               // but require exactly representable values to be preserved.
+               return ctx.format.roundOut(exact, !deIsInf(x) && !deIsInf(y));
+       }
+
+       double                  precision               (const EvalContext&, double, double, double) const
+       {
+               return 0.0;
+       }
+};
+
+class InfixOperator16Bit : public FloatFunc2 <Signature<float, deFloat16, deFloat16> >
 {
 protected:
        virtual string  getSymbol               (void) const = 0;
@@ -1824,10 +2247,11 @@ protected:
        }
 };
 
-class FloatFunc3 : public PrimitiveFunc<Signature<float, float, float, float> >
+template <class T>
+class FloatFunc3 : public PrimitiveFunc<T>
 {
 protected:
-       Interval                        doApply                 (const EvalContext&     ctx, const IArgs& iargs) const
+       Interval                        doApply                 (const EvalContext&     ctx, const Signature<float, float, float, float>::IArgs& iargs) const
        {
                return this->applyMonotone(ctx, iargs.a, iargs.b, iargs.c);
        }
@@ -1874,20 +2298,68 @@ namespace Functions
 
 using namespace tcu;
 
-class Add : public InfixOperator
+template <class T>
+class Comparison : public InfixOperator < T >
 {
 public:
-       string          getName         (void) const                                            { return "add"; }
-       string          getSymbol       (void) const                                            { return "+"; }
+       string          getName(void) const { return "comparison"; }
+       string          getSymbol(void) const { return ""; }
 
-       Interval        doApply         (const EvalContext&     ctx,
-                                                        const IArgs&           iargs) const
+       Interval        doApply(const EvalContext&      ctx,
+               const Signature<int, float, float>::IArgs&              iargs) const
        {
-               // Fast-path for common case
-               if (iargs.a.isOrdinary() && iargs.b.isOrdinary())
+               DE_UNREF(ctx);
+               if (iargs.a.hasNaN() || iargs.b.hasNaN())
                {
-                       Interval ret;
-                       TCU_SET_INTERVAL_BOUNDS(ret, sum,
+                       return 0x3E0; // one of the floats is NaN, constant result
+               }
+
+               int operationFlag = 1;
+               int result = 0;
+               const double a = iargs.a.midpoint();
+               const double b = iargs.b.midpoint();
+
+               for (int i = 0; i<2; ++i)
+               {
+                       if (a == b)
+                               result += operationFlag;
+                       operationFlag = operationFlag << 1;
+
+                       if (a > b)
+                               result += operationFlag;
+                       operationFlag = operationFlag << 1;
+
+                       if (a < b)
+                               result += operationFlag;
+                       operationFlag = operationFlag << 1;
+
+                       if (a >= b)
+                               result += operationFlag;
+                       operationFlag = operationFlag << 1;
+
+                       if (a <= b)
+                               result += operationFlag;
+                       operationFlag = operationFlag << 1;
+               }
+               return result;
+       }
+};
+
+template <class T>
+class Add : public InfixOperator < T >
+{
+public:
+       string          getName         (void) const                                            { return "add"; }
+       string          getSymbol       (void) const                                            { return "+"; }
+
+       Interval        doApply         (const EvalContext&     ctx,
+                                                        const Signature<float, float, float>::IArgs&           iargs) const
+       {
+               // Fast-path for common case
+               if (iargs.a.isOrdinary() && iargs.b.isOrdinary())
+               {
+                       Interval ret;
+                       TCU_SET_INTERVAL_BOUNDS(ret, sum,
                                                                        sum = iargs.a.lo() + iargs.b.lo(),
                                                                        sum = iargs.a.hi() + iargs.b.hi());
                        return ctx.format.convert(ctx.format.roundOut(ret, true));
@@ -1899,13 +2371,14 @@ protected:
        double          applyExact      (double x, double y) const                      { return x + y; }
 };
 
-class Mul : public InfixOperator
+template<class T>
+class Mul : public InfixOperator<T>
 {
 public:
        string          getName         (void) const                                                                    { return "mul"; }
        string          getSymbol       (void) const                                                                    { return "*"; }
 
-       Interval        doApply         (const EvalContext&     ctx, const IArgs& iargs) const
+       Interval        doApply         (const EvalContext&     ctx, const Signature<float, float, float>::IArgs& iargs) const
        {
                Interval a = iargs.a;
                Interval b = iargs.b;
@@ -1950,13 +2423,14 @@ protected:
        }
 };
 
-class Sub : public InfixOperator
+template<class T>
+class Sub : public InfixOperator <T>
 {
 public:
        string          getName         (void) const                            { return "sub"; }
        string          getSymbol       (void) const                            { return "-"; }
 
-       Interval        doApply         (const EvalContext&     ctx, const IArgs& iargs) const
+       Interval        doApply         (const EvalContext&     ctx, const Signature<float, float, float>::IArgs& iargs) const
        {
                // Fast-path for common case
                if (iargs.a.isOrdinary() && iargs.b.isOrdinary())
@@ -1979,7 +2453,8 @@ protected:
        double          applyExact      (double x, double y) const      { return x - y; }
 };
 
-class Negate : public FloatFunc1
+template <class T>
+class Negate : public FloatFunc1<T>
 {
 public:
        string  getName         (void) const                                                                    { return "_negate"; }
@@ -1990,7 +2465,8 @@ protected:
        double  applyExact      (double x) const                                                                { return -x; }
 };
 
-class Div : public InfixOperator
+template <class T>
+class Div : public InfixOperator<T>
 {
 public:
        string          getName                 (void) const                                            { return "div"; }
@@ -2020,7 +2496,7 @@ protected:
 
        Interval        applyPoint              (const EvalContext&     ctx, double x, double y) const
        {
-               Interval ret = FloatFunc2::applyPoint(ctx, x, y);
+               Interval ret = FloatFunc2<T>::applyPoint(ctx, x, y);
 
                if (!deIsInf(x) && !deIsInf(y) && y != 0.0)
                {
@@ -2051,7 +2527,8 @@ protected:
        }
 };
 
-class InverseSqrt : public FloatFunc1
+template <class T>
+class InverseSqrt : public FloatFunc1 <T>
 {
 public:
        string          getName         (void) const                                                    { return "inversesqrt"; }
@@ -2070,96 +2547,231 @@ protected:
        }
 };
 
-class ExpFunc : public CFloatFunc1
+template <class T>
+class ExpFunc : public CFloatFunc1<T>
 {
 public:
                                ExpFunc         (const string& name, DoubleFunc1& func)
-                                       : CFloatFunc1(name, func) {}
+                                       : CFloatFunc1<T> (name, func)
+                               {}
 protected:
-       double          precision       (const EvalContext& ctx, double ret, double x) const
-       {
-               switch (ctx.floatPrecision)
-               {
-                       case glu::PRECISION_HIGHP:
-                               return ctx.format.ulp(ret, 3.0 + 2.0 * deAbs(x));
-                       case glu::PRECISION_MEDIUMP:
-                               return ctx.format.ulp(ret, 2.0 + 2.0 * deAbs(x));
-                       case glu::PRECISION_LOWP:
-                               return ctx.format.ulp(ret, 2.0);
-                       default:
-                               DE_FATAL("Impossible");
-               }
-               return 0;
-       }
-
+       double          precision       (const EvalContext& ctx, double ret, double x) const;
        Interval        getCodomain     (void) const
        {
                return Interval(0.0, TCU_INFINITY);
        }
+private:
+       double precision_legacy(const EvalContext& ctx, double ret, double x) const;
 };
 
-class Exp2     : public ExpFunc        { public: Exp2 (void)   : ExpFunc("exp2", deExp2) {} };
-class Exp      : public ExpFunc        { public: Exp (void)    : ExpFunc("exp", deExp) {} };
+template <>
+double ExpFunc <Signature<float, float> >::precision_legacy(const EvalContext& ctx, double ret, double x) const
+{
+       switch (ctx.floatPrecision)
+       {
+       case glu::PRECISION_HIGHP:
+               return ctx.format.ulp(ret, 3.0 + 2.0 * deAbs(x));
+       case glu::PRECISION_MEDIUMP:
+               return ctx.format.ulp(ret, 2.0 + 2.0 * deAbs(x));
+       case glu::PRECISION_LOWP:
+               return ctx.format.ulp(ret, 2.0);
+       default:
+               DE_FATAL("Impossible");
+       }
+       return 0.0;
+}
+
+template <>
+double ExpFunc <Signature<deFloat16, deFloat16> >::precision_legacy(const EvalContext& ctx, double ret, double x) const
+{
+       DE_UNREF(ctx);
+       DE_UNREF(ret);
+       DE_UNREF(x);
+       DE_FATAL("Impossible");
+       return 0.0;
+}
+
+template <>
+double ExpFunc <Signature<float, float> >::precision (const EvalContext& ctx, double ret, double x) const
+{
+       if (!ctx.isShaderFloat16Int8)
+               return precision_legacy(ctx, ret, x);
+
+       switch (ctx.floatPrecision)
+       {
+       case glu::PRECISION_HIGHP:
+               return ctx.format.ulp(ret, 3.0 + 2.0 * deAbs(x));
+       case glu::PRECISION_MEDIUMP:
+       case glu::PRECISION_LOWP:
+       case glu::PRECISION_LAST:
+               return ctx.format.ulp(ret, 1.0 + 2.0 * deAbs(x));
+       default:
+               DE_FATAL("Impossible");
+       }
+
+       return 0.0;
+}
+
+template <>
+double ExpFunc <Signature<deFloat16, deFloat16> >::precision(const EvalContext& ctx, double ret, double x) const
+{
+       return ctx.format.ulp(ret, 1.0 + 2.0 * deAbs(x));
+}
+
+template <class T>
+class Exp2     : public ExpFunc<T>     { public: Exp2 (void)   : ExpFunc<T>("exp2", deExp2) {} };
+template <class T>
+class Exp      : public ExpFunc<T>     { public: Exp (void)    : ExpFunc<T>("exp", deExp) {} };
 
-ExprP<float> exp2      (const ExprP<float>& x) { return app<Exp2>(x); }
-ExprP<float> exp       (const ExprP<float>& x) { return app<Exp>(x); }
+template <typename T>
+ExprP<T> exp2  (const ExprP<T>& x)     { return app<Exp2< Signature<T, T> > >(x); }
+template <typename T>
+ExprP<T> exp   (const ExprP<T>& x)     { return app<Exp< Signature<T, T> > >(x); }
 
-class LogFunc : public CFloatFunc1
+//ExprP<deFloat16> exp2        (const ExprP<deFloat16>& x)     { return app<Exp2< Signature<deFloat16, deFloat16> > >(x); }
+//ExprP<deFloat16> exp (const ExprP<deFloat16>& x)     { return app<Exp< Signature<deFloat16, deFloat16> > >(x); }
+
+template <class T>
+class LogFunc : public CFloatFunc1<T>
 {
 public:
                                LogFunc         (const string& name, DoubleFunc1& func)
-                                       : CFloatFunc1(name, func) {}
+                                       : CFloatFunc1<T>(name, func) {}
 
 protected:
-       double          precision       (const EvalContext& ctx, double ret, double x) const
-       {
-               if (x <= 0)
-                       return TCU_NAN;
+       double          precision       (const EvalContext& ctx, double ret, double x) const;
+};
 
-               switch (ctx.floatPrecision)
-               {
-                       case glu::PRECISION_HIGHP:
-                               return (0.5 <= x && x <= 2.0) ? deLdExp(1.0, -21) : ctx.format.ulp(ret, 3.0);
-                       case glu::PRECISION_MEDIUMP:
-                               return (0.5 <= x && x <= 2.0) ? deLdExp(1.0, -7) : ctx.format.ulp(ret, 2.0);
-                       case glu::PRECISION_LOWP:
-                               return ctx.format.ulp(ret, 2.0);
-                       default:
-                               DE_FATAL("Impossible");
-               }
+template <>
+double LogFunc<Signature<float, float> >::precision(const EvalContext& ctx, double ret, double x) const
+{
+       if (x <= 0)
+               return TCU_NAN;
 
-               return 0;
+       switch (ctx.floatPrecision)
+       {
+       case glu::PRECISION_HIGHP:
+               return (0.5 <= x && x <= 2.0) ? deLdExp(1.0, -21) : ctx.format.ulp(ret, 3.0);
+       case glu::PRECISION_MEDIUMP:
+               return (0.5 <= x && x <= 2.0) ? deLdExp(1.0, -7) : ctx.format.ulp(ret, 2.0);
+       case glu::PRECISION_LOWP:
+               return ctx.format.ulp(ret, 2.0);
+       case glu::PRECISION_LAST:
+               return (0.5 <= x && x <= 2.0) ? deLdExp(1.0, -7) : ctx.format.ulp(ret, 3.0); // float16bit
+       default:
+               DE_FATAL("Impossible");
        }
-};
 
-class Log2     : public LogFunc                { public: Log2  (void) : LogFunc("log2", deLog2) {} };
-class Log      : public LogFunc                { public: Log   (void) : LogFunc("log", deLog) {} };
+       return 0;
+}
 
-ExprP<float> log2      (const ExprP<float>& x) { return app<Log2>(x); }
-ExprP<float> log       (const ExprP<float>& x) { return app<Log>(x); }
+template <>
+double LogFunc<Signature<deFloat16, deFloat16> >::precision(const EvalContext& ctx, double ret, double x) const
+{
+       if (x <= 0)
+               return TCU_NAN;
+       return (0.5 <= x && x <= 2.0) ? deLdExp(1.0, -7) : ctx.format.ulp(ret, 3.0);
+}
+
+template <class T>
+class Log2     : public LogFunc<T>             { public: Log2  (void) : LogFunc<T>("log2", deLog2) {} };
+template <class T>
+class Log      : public LogFunc<T>             { public: Log   (void) : LogFunc<T>("log", deLog) {} };
+
+ExprP<float> log2      (const ExprP<float>& x) { return app<Log2< Signature<float, float> > >(x); }
+ExprP<float> log       (const ExprP<float>& x) { return app<Log< Signature<float, float> > >(x); }
+
+ExprP<deFloat16> log2  (const ExprP<deFloat16>& x)     { return app<Log2< Signature<deFloat16, deFloat16> > >(x); }
+ExprP<deFloat16> log   (const ExprP<deFloat16>& x)     { return app<Log< Signature<deFloat16, deFloat16> > >(x); }
 
 #define DEFINE_CONSTRUCTOR1(CLASS, TRET, NAME, T0) \
 ExprP<TRET> NAME (const ExprP<T0>& arg0) { return app<CLASS>(arg0); }
 
-#define DEFINE_DERIVED1(CLASS, TRET, NAME, T0, ARG0, EXPANSION)                        \
-class CLASS : public DerivedFunc<Signature<TRET, T0> > /* NOLINT(CLASS) */ \
-{                                                                                                                                              \
-public:                                                                                                                                        \
-       string                  getName         (void) const            { return #NAME; }       \
-                                                                                                                                               \
-protected:                                                                                                                             \
-       ExprP<TRET>             doExpand                (ExpandContext&,                                        \
-                                                                        const CLASS::ArgExprs& args_) const \
-       {                                                                                                                                       \
+#define DEFINE_DERIVED1(CLASS, TRET, NAME, T0, ARG0, EXPANSION)                                \
+class CLASS : public DerivedFunc<Signature<TRET, T0> > /* NOLINT(CLASS) */     \
+{                                                                                                                                                      \
+public:                                                                                                                                                \
+       string                  getName         (void) const            { return #NAME; }               \
+                                                                                                                                                       \
+protected:                                                                                                                                     \
+       ExprP<TRET>             doExpand                (ExpandContext&,                                                \
+                                                                        const CLASS::ArgExprs& args_) const    \
+       {                                                                                                                                               \
                const ExprP<float>& ARG0 = args_.a;                                                             \
-               return EXPANSION;                                                                                               \
-       }                                                                                                                                       \
-};                                                                                                                                             \
+               return EXPANSION;                                                                                                       \
+       }                                                                                                                                               \
+};                                                                                                                                                     \
 DEFINE_CONSTRUCTOR1(CLASS, TRET, NAME, T0)
 
 #define DEFINE_DERIVED_FLOAT1(CLASS, NAME, ARG0, EXPANSION) \
        DEFINE_DERIVED1(CLASS, float, NAME, float, ARG0, EXPANSION)
 
+
+#define DEFINE_DERIVED1_INPUTRANGE(CLASS, TRET, NAME, T0, ARG0, EXPANSION, INTERVAL)   \
+class CLASS : public DerivedFunc<Signature<TRET, T0> > /* NOLINT(CLASS) */                             \
+{                                                                                                                                                                              \
+public:                                                                                                                                                                        \
+       string                  getName         (void) const            { return #NAME; }                                       \
+                                                                                                                                                                               \
+protected:                                                                                                                                                             \
+       ExprP<TRET>             doExpand                (ExpandContext&,                                                                        \
+                                                                        const CLASS::ArgExprs& args_) const                            \
+       {                                                                                                                                                                       \
+               const ExprP<float>& ARG0 = args_.a;                                                                                             \
+               return EXPANSION;                                                                                                                               \
+       }                                                                                                                                                                       \
+       Interval        getInputRange   (const bool /*is16bit*/) const                                                  \
+       {                                                                                                                                                                       \
+               return INTERVAL;                                                                                                                                \
+       }                                                                                                                                                                       \
+};                                                                                                                                                                             \
+DEFINE_CONSTRUCTOR1(CLASS, TRET, NAME, T0)
+
+#define DEFINE_DERIVED_FLOAT1_INPUTRANGE(CLASS, NAME, ARG0, EXPANSION, INTERVAL) \
+       DEFINE_DERIVED1_INPUTRANGE(CLASS, float, NAME, float, ARG0, EXPANSION, INTERVAL)
+
+#define DEFINE_DERIVED1_16BIT(CLASS, TRET, NAME, T0, ARG0, EXPANSION)          \
+class CLASS : public DerivedFunc<Signature<TRET, T0> > /* NOLINT(CLASS) */     \
+{                                                                                                                                                      \
+public:                                                                                                                                                \
+       string                  getName         (void) const            { return #NAME; }               \
+                                                                                                                                                       \
+protected:                                                                                                                                     \
+       ExprP<TRET>             doExpand                (ExpandContext&,                                                \
+                                                                        const CLASS::ArgExprs& args_) const    \
+       {                                                                                                                                               \
+               const ExprP<deFloat16>& ARG0 = args_.a;                                                 \
+               return EXPANSION;                                                                                                       \
+       }                                                                                                                                               \
+};                                                                                                                                                     \
+DEFINE_CONSTRUCTOR1(CLASS, TRET, NAME, T0)
+
+#define DEFINE_DERIVED1_INPUTRANGE_16BIT(CLASS, TRET, NAME, T0, ARG0, EXPANSION, INTERVAL)     \
+class CLASS : public DerivedFunc<Signature<TRET, T0> > /* NOLINT(CLASS) */     \
+{                                                                                                                                                      \
+public:                                                                                                                                                \
+       string                  getName         (void) const            { return #NAME; }               \
+                                                                                                                                                       \
+protected:                                                                                                                                     \
+       ExprP<TRET>             doExpand                (ExpandContext&,                                                \
+                                                                        const CLASS::ArgExprs& args_) const    \
+       {                                                                                                                                               \
+               const ExprP<deFloat16>& ARG0 = args_.a;                                                 \
+               return EXPANSION;                                                                                                       \
+       }                                                                                                                                               \
+       Interval        getInputRange   (const bool /*is16bit*/) const                          \
+       {                                                                                                                                               \
+               return INTERVAL;                                                                                                        \
+       }                                                                                                                                               \
+};                                                                                                                                                     \
+DEFINE_CONSTRUCTOR1(CLASS, TRET, NAME, T0)
+
+#define DEFINE_DERIVED_FLOAT1_16BIT(CLASS, NAME, ARG0, EXPANSION) \
+       DEFINE_DERIVED1_16BIT(CLASS, deFloat16, NAME, deFloat16, ARG0, EXPANSION)
+
+#define DEFINE_DERIVED_FLOAT1_INPUTRANGE_16BIT(CLASS, NAME, ARG0, EXPANSION, INTERVAL) \
+       DEFINE_DERIVED1_INPUTRANGE_16BIT(CLASS, deFloat16, NAME, deFloat16, ARG0, EXPANSION, INTERVAL)
+
 #define DEFINE_CONSTRUCTOR2(CLASS, TRET, NAME, T0, T1)                         \
 ExprP<TRET> NAME (const ExprP<T0>& arg0, const ExprP<T1>& arg1)                \
 {                                                                                                                                      \
@@ -2185,6 +2797,9 @@ DEFINE_CONSTRUCTOR2(CLASS, TRET, NAME, T0, T1)
 #define DEFINE_DERIVED_FLOAT2(CLASS, NAME, Arg0, Arg1, EXPANSION)              \
        DEFINE_DERIVED2(CLASS, float, NAME, float, Arg0, float, Arg1, EXPANSION)
 
+#define DEFINE_DERIVED_FLOAT2_16BIT(CLASS, NAME, Arg0, Arg1, EXPANSION)                \
+       DEFINE_DERIVED2(CLASS, deFloat16, NAME, deFloat16, Arg0, deFloat16, Arg1, EXPANSION)
+
 #define DEFINE_CONSTRUCTOR3(CLASS, TRET, NAME, T0, T1, T2)                             \
 ExprP<TRET> NAME (const ExprP<T0>& arg0, const ExprP<T1>& arg1, const ExprP<T2>& arg2) \
 {                                                                                                                                              \
@@ -2211,6 +2826,9 @@ DEFINE_CONSTRUCTOR3(CLASS, TRET, NAME, T0, T1, T2)
 #define DEFINE_DERIVED_FLOAT3(CLASS, NAME, ARG0, ARG1, ARG2, EXPANSION)                        \
        DEFINE_DERIVED3(CLASS, float, NAME, float, ARG0, float, ARG1, float, ARG2, EXPANSION)
 
+#define DEFINE_DERIVED_FLOAT3_16BIT(CLASS, NAME, ARG0, ARG1, ARG2, EXPANSION)                  \
+       DEFINE_DERIVED3(CLASS, deFloat16, NAME, deFloat16, ARG0, deFloat16, ARG1, deFloat16, ARG2, EXPANSION)
+
 #define DEFINE_CONSTRUCTOR4(CLASS, TRET, NAME, T0, T1, T2, T3)                 \
 ExprP<TRET> NAME (const ExprP<T0>& arg0, const ExprP<T1>& arg1,                        \
                                  const ExprP<T2>& arg2, const ExprP<T3>& arg3)                 \
@@ -2218,21 +2836,32 @@ ExprP<TRET> NAME (const ExprP<T0>& arg0, const ExprP<T1>& arg1,                 \
        return app<CLASS>(arg0, arg1, arg2, arg3);                                                      \
 }
 
-DEFINE_DERIVED_FLOAT1(Sqrt,            sqrt,           x,              constant(1.0f) / app<InverseSqrt>(x));
-DEFINE_DERIVED_FLOAT2(Pow,             pow,            x,      y,      exp2(y * log2(x)));
-DEFINE_DERIVED_FLOAT1(Radians, radians,        d,              (constant(DE_PI) / constant(180.0f)) * d);
-DEFINE_DERIVED_FLOAT1(Degrees, degrees,        r,              (constant(180.0f) / constant(DE_PI)) * r);
+typedef         InverseSqrt< Signature<deFloat16, deFloat16> > InverseSqrt16Bit;
+typedef         InverseSqrt< Signature<float, float> >                 InverseSqrt32Bit;
+
+DEFINE_DERIVED_FLOAT1(Sqrt,                            sqrt,           x,              constant(1.0f) / app<InverseSqrt32Bit>(x));
+DEFINE_DERIVED_FLOAT1_16BIT(Sqrt16Bit, sqrt,           x,              constant((deFloat16)FLOAT16_1_0) / app<InverseSqrt16Bit>(x));
+DEFINE_DERIVED_FLOAT2(Pow,                             pow,            x,      y,      exp2<float>(y * log2(x)));
+DEFINE_DERIVED_FLOAT2_16BIT(Pow16,             pow,            x,      y,      exp2<deFloat16>(y * log2(x)));
+DEFINE_DERIVED_FLOAT1(Radians,                 radians,        d,              (constant(DE_PI) / constant(180.0f)) * d);
+DEFINE_DERIVED_FLOAT1_16BIT(Radians16, radians,        d,              (constant((deFloat16)DE_PI_16BIT) / constant((deFloat16)FLOAT16_180_0)) * d);
+DEFINE_DERIVED_FLOAT1(Degrees,                 degrees,        r,              (constant(180.0f) / constant(DE_PI)) * r);
+DEFINE_DERIVED_FLOAT1_16BIT(Degrees16, degrees,        r,              (constant((deFloat16)FLOAT16_180_0) / constant((deFloat16)DE_PI_16BIT)) * r);
 
-class TrigFunc : public CFloatFunc1
+/*Proper parameters for template T
+       Signature<float, float>         32bit tests
+       Signature<float, deFloat16>     16bit tests*/
+template<class T>
+class TrigFunc : public CFloatFunc1<T>
 {
 public:
                                        TrigFunc                (const string&          name,
                                                                         DoubleFunc1&           func,
                                                                         const Interval&        loEx,
                                                                         const Interval&        hiEx)
-                                               : CFloatFunc1   (name, func)
-                                               , m_loExtremum  (loEx)
-                                               , m_hiExtremum  (hiEx) {}
+                                               : CFloatFunc1<T>        (name, func)
+                                               , m_loExtremum          (loEx)
+                                               , m_hiExtremum          (hiEx) {}
 
 protected:
        Interval                innerExtrema    (const EvalContext&, const Interval& angle) const
@@ -2260,7 +2889,7 @@ protected:
                        return m_loExtremum;
                }
                else if (loSlope == hiSlope &&
-                                deIntSign(applyExact(hi) - applyExact(lo)) * loSlope == -1)
+                                deIntSign(CFloatFunc1<T>::applyExact(hi) - CFloatFunc1<T>::applyExact(lo)) * loSlope == -1)
                {
                        // The slope has changed twice between the endpoints, so both extrema are included.
                        return m_hiExtremum | m_loExtremum;
@@ -2269,164 +2898,272 @@ protected:
                return Interval();
        }
 
-       Interval        getCodomain                     (void) const
+       Interval        getCodomain                             (void) const
        {
                // Ensure that result is always within [-1, 1], or NaN (for +-inf)
                return Interval(-1.0, 1.0) | TCU_NAN;
        }
 
-       double          precision                       (const EvalContext& ctx, double ret, double arg) const
+       double          precision                               (const EvalContext& ctx, double ret, double arg) const;
+
+       Interval        getInputRange                   (const bool is16bit) const;
+       virtual int     doGetSlope                              (double angle) const = 0;
+
+       Interval                m_loExtremum;
+       Interval                m_hiExtremum;
+private:
+       double precision_legacy(const EvalContext& ctx, double ret, double arg) const;
+};
+
+//Only -DE_PI_DOUBLE, DE_PI_DOUBLE input range
+template<>
+Interval TrigFunc<Signature<float, float> >::getInputRange(const bool is16bit) const
+{
+       DE_UNREF(is16bit);
+       return Interval(false, -DE_PI_DOUBLE, DE_PI_DOUBLE);
+}
+
+//Only -DE_PI_DOUBLE, DE_PI_DOUBLE input range
+template<>
+Interval TrigFunc<Signature<deFloat16, deFloat16> >::getInputRange(const bool is16bit) const
+{
+       DE_UNREF(is16bit);
+       return Interval(false, -DE_PI_DOUBLE, DE_PI_DOUBLE);
+}
+
+/*
+* Old tests without changes.
+*/
+template<>
+double TrigFunc<Signature<float, float> >::precision_legacy(const EvalContext& ctx, double ret, double arg) const
+{
+       if (ctx.floatPrecision == glu::PRECISION_HIGHP)
        {
-               if (ctx.floatPrecision == glu::PRECISION_HIGHP)
+               // Use precision from OpenCL fast relaxed math
+               if (-DE_PI_DOUBLE <= arg && arg <= DE_PI_DOUBLE)
                {
-                       // Use precision from OpenCL fast relaxed math
-                       if (-DE_PI_DOUBLE <= arg && arg <= DE_PI_DOUBLE)
-                       {
-                               return deLdExp(1.0, -11);
-                       }
-                       else
-                       {
-                               // "larger otherwise", let's pick |x| * 2^-12 , which is slightly over
-                               // 2^-11 at x == pi.
-                               return deLdExp(deAbs(arg), -12);
-                       }
+                       return deLdExp(1.0, -11);
                }
-               else if (ctx.floatPrecision == glu::PRECISION_MEDIUMP)
+               else
                {
-                       if (-DE_PI_DOUBLE <= arg && arg <= DE_PI_DOUBLE)
-                       {
-                               // from OpenCL half-float extension specification
-                               return ctx.format.ulp(ret, 2.0);
-                       }
-                       else
-                       {
-                               // |x| * 2^-10, slightly larger than 2 ULP at x == pi
-                               return deLdExp(deAbs(arg), -10);
-                       }
+                       // "larger otherwise", let's pick |x| * 2^-12 , which is slightly over
+                       // 2^-11 at x == pi.
+                       return deLdExp(deAbs(arg), -12);
                }
-               else
+       }
+       else if (ctx.floatPrecision == glu::PRECISION_MEDIUMP)
+       {
+               if (-DE_PI_DOUBLE <= arg && arg <= DE_PI_DOUBLE)
                {
-                       DE_ASSERT(ctx.floatPrecision == glu::PRECISION_LOWP);
-
                        // from OpenCL half-float extension specification
                        return ctx.format.ulp(ret, 2.0);
                }
+               else
+               {
+                       // |x| * 2^-10, slightly larger than 2 ULP at x == pi
+                       return deLdExp(deAbs(arg), -10);
+               }
        }
+       else
+       {
+               DE_ASSERT(ctx.floatPrecision == glu::PRECISION_LOWP);
 
-       virtual int             doGetSlope              (double angle) const = 0;
+               // from OpenCL half-float extension specification
+               return ctx.format.ulp(ret, 2.0);
+       }
+}
 
-       Interval                m_loExtremum;
-       Interval                m_hiExtremum;
-};
+template<>
+double TrigFunc<Signature<deFloat16, deFloat16> >::precision_legacy(const EvalContext& ctx, double ret, double arg) const
+{
+       DE_UNREF(ctx);
+       DE_UNREF(ret);
+       DE_UNREF(arg);
+       DE_FATAL("Impossible");
+       return 0.0;
+}
+
+template<>
+double TrigFunc<Signature<float, float> >::precision(const EvalContext& ctx, double ret, double arg) const
+{
+       if (!ctx.isShaderFloat16Int8)
+               return precision_legacy(ctx, ret, arg);
+
+       DE_ASSERT(-DE_PI_DOUBLE <= arg && arg <= DE_PI_DOUBLE);
+       if (ctx.floatPrecision == glu::PRECISION_HIGHP)
+       {
+               return deLdExp(1.0, -11);
+       }
+       else
+       {
+               return deLdExp(1.0, -7);
+       }
+       return 0.0;
+}
+//
+/*
+ * Half tests
+ * From Spec:
+ * Absolute error 2^{-7} inside the range [-pi, pi].
+*/
+template<>
+double TrigFunc<Signature<deFloat16, deFloat16> >::precision(const EvalContext& ctx, double ret, double arg) const
+{
+       DE_UNREF(ctx);
+       DE_UNREF(ret);
+       DE_UNREF(arg);
+       DE_ASSERT(-DE_PI_DOUBLE <= arg && arg <= DE_PI_DOUBLE && ctx.floatPrecision == glu::PRECISION_LAST);
+       return deLdExp(1.0, -7);
+}
 
-class Sin : public TrigFunc
+/*Proper parameters for template T
+       Signature<float, float>         32bit tests
+       Signature<float, deFloat16>     16bit tests*/
+template <class T>
+class Sin : public TrigFunc<T>
 {
 public:
-                               Sin                     (void) : TrigFunc("sin", deSin, -1.0, 1.0) {}
+                               Sin                     (void) : TrigFunc<T>("sin", deSin, -1.0, 1.0) {}
 
 protected:
        int                     doGetSlope      (double angle) const { return deIntSign(deCos(angle)); }
 };
 
-ExprP<float> sin (const ExprP<float>& x) { return app<Sin>(x); }
+ExprP<float> sin (const ExprP<float>& x) { return app<Sin<Signature<float, float> > >(x); }
+ExprP<deFloat16> sin (const ExprP<deFloat16>& x) { return app<Sin<Signature<deFloat16, deFloat16> > >(x); }
 
-class Cos : public TrigFunc
+template <class T>
+class Cos : public TrigFunc<T>
 {
 public:
-                               Cos                     (void) : TrigFunc("cos", deCos, -1.0, 1.0) {}
+                               Cos                     (void) : TrigFunc<T> ("cos", deCos, -1.0, 1.0) {}
 
 protected:
        int                     doGetSlope      (double angle) const { return -deIntSign(deSin(angle)); }
 };
 
-ExprP<float> cos (const ExprP<float>& x) { return app<Cos>(x); }
+ExprP<float> cos (const ExprP<float>& x) { return app<Cos<Signature<float, float> > >(x); }
+ExprP<deFloat16> cos (const ExprP<deFloat16>& x) { return app<Cos<Signature<deFloat16, deFloat16> > >(x); }
 
-DEFINE_DERIVED_FLOAT1(Tan, tan, x, sin(x) * (constant(1.0f) / cos(x)));
+DEFINE_DERIVED_FLOAT1_INPUTRANGE(Tan, tan, x, sin(x) * (constant(1.0f) / cos(x)), Interval(false, -DE_PI_DOUBLE, DE_PI_DOUBLE));
+DEFINE_DERIVED_FLOAT1_INPUTRANGE_16BIT(Tan16Bit, tan, x, sin(x) * (constant((deFloat16)FLOAT16_1_0) / cos(x)), Interval(false, -DE_PI_DOUBLE, DE_PI_DOUBLE));
 
-class ASin : public CFloatFunc1
+template <class T>
+class ArcTrigFunc : public CFloatFunc1<T>
 {
 public:
-                                       ASin            (void) : CFloatFunc1("asin", deAsin) {}
+                                       ArcTrigFunc     (const string&          name,
+                                                                DoubleFunc1&           func,
+                                                                double                         precisionULPs,
+                                                                const Interval&        domain,
+                                                                const Interval&        codomain)
+                                               : CFloatFunc1<T>        (name, func)
+                                               , m_precision           (precisionULPs)
+                                               , m_domain                      (domain)
+                                               , m_codomain            (codomain) {}
 
 protected:
-       double                  precision       (const EvalContext& ctx, double, double x) const
-       {
-               if (!de::inBounds(x, -1.0, 1.0))
-                       return TCU_NAN;
+       double                  precision       (const EvalContext& ctx, double ret, double x) const;
+
+       // We could implement getCodomain with m_codomain, but choose not to,
+       // because it seems too strict with trascendental constants like pi.
+
+       const double    m_precision;
+       const Interval  m_domain;
+       const Interval  m_codomain;
+};
+
+template<> //half precision
+double ArcTrigFunc<Signature<deFloat16, deFloat16> >::precision (const EvalContext& ctx, double ret, double x) const
+{
+       if (!m_domain.contains(x))
+               return TCU_NAN;
 
+       // Form the spec 5 ULP.
+       return ctx.format.ulp(ret, 5.0);
+}
+
+template<>
+double ArcTrigFunc<Signature<float, float> >::precision(const EvalContext& ctx, double ret, double x) const
+{
+       if (!m_domain.contains(x))
+               return TCU_NAN;
+
+       //precision_with_extension
+       if (ctx.isShaderFloat16Int8)
+       {
                if (ctx.floatPrecision == glu::PRECISION_HIGHP)
                {
-                       // Absolute error of 2^-11
-                       return deLdExp(1.0, -11);
+                       return ctx.format.ulp(ret, 4096.0);
                }
                else
                {
-                       // Absolute error of 2^-8
-                       return deLdExp(1.0, -8);
+                       return ctx.format.ulp(ret, 5.0);
                }
-
        }
-};
+       // precision legacy
+       else
+       {
+               if (ctx.floatPrecision == glu::PRECISION_HIGHP)
+               {
+                       // Use OpenCL's fast relaxed math precision
+                       return ctx.format.ulp(ret, m_precision);
+               }
+               else
+               {
+                       // Use OpenCL half-float spec
+                       return ctx.format.ulp(ret, 2.0);
+               }
+       }
+}
 
-class ArcTrigFunc : public CFloatFunc1
+class ASin : public CFloatFunc1<Signature<float, float> >
 {
 public:
-                                       ArcTrigFunc     (const string&          name,
-                                                                DoubleFunc1&           func,
-                                                                double                         precisionULPs,
-                                                                const Interval&        domain,
-                                                                const Interval&        codomain)
-                                               : CFloatFunc1           (name, func)
-                                               , m_precision           (precisionULPs)
-                                               , m_domain                      (domain)
-                                               , m_codomain            (codomain) {}
+       ASin(void) : CFloatFunc1<Signature<float, float> >("asin", deAsin) {}
 
 protected:
-       double                  precision       (const EvalContext& ctx, double ret, double x) const
+       double                  precision(const EvalContext& ctx, double ret, double x) const
        {
-               if (!m_domain.contains(x))
+               DE_UNREF(ret);
+               if (!de::inBounds(x, -1.0, 1.0))
                        return TCU_NAN;
 
                if (ctx.floatPrecision == glu::PRECISION_HIGHP)
                {
-                       // Use OpenCL's fast relaxed math precision
-                       return ctx.format.ulp(ret, m_precision);
+                       // Absolute error of 2^-11
+                       return deLdExp(1.0, -11);
                }
                else
                {
-                       // Use OpenCL half-float spec
-                       return ctx.format.ulp(ret, 2.0);
+                       // Absolute error of 2^-8
+                       return deLdExp(1.0, -8);
                }
        }
-
-       // We could implement getCodomain with m_codomain, but choose not to,
-       // because it seems too strict with trascendental constants like pi.
-
-       const double    m_precision;
-       const Interval  m_domain;
-       const Interval  m_codomain;
 };
 
-class ACos : public ArcTrigFunc
+class ACos : public ArcTrigFunc<Signature<float, float> >
 {
 public:
-       ACos (void) : ArcTrigFunc("acos", deAcos, 4096.0,
-                                                         Interval(-1.0, 1.0),
-                                                         Interval(0.0, DE_PI_DOUBLE)) {}
+       ACos (void) : ArcTrigFunc<Signature<float, float> > ("acos", deAcos, 4096.0,
+                                                                 Interval(-1.0, 1.0),
+                                                                 Interval(0.0, DE_PI_DOUBLE)) {}
 };
 
-class ATan : public ArcTrigFunc
+template <class T>
+class ATan : public ArcTrigFunc<T>
 {
 public:
-       ATan (void) : ArcTrigFunc("atan", deAtanOver, 4096.0,
-                                                         Interval::unbounded(),
-                                                         Interval(-DE_PI_DOUBLE * 0.5, DE_PI_DOUBLE * 0.5)) {}
+       ATan (void) : ArcTrigFunc<T>("atan", deAtanOver, 4096.0,
+                                                                 Interval::unbounded(),
+                                                                 Interval(-DE_PI_DOUBLE * 0.5, DE_PI_DOUBLE * 0.5)) {}
 };
 
-class ATan2 : public CFloatFunc2
+template <class T>
+class ATan2 : public CFloatFunc2<T>
 {
 public:
-                               ATan2                   (void) : CFloatFunc2 ("atan", deAtan2) {}
+                               ATan2                   (void) : CFloatFunc2<T> ("atan", deAtan2) {}
 
 protected:
        Interval        innerExtrema    (const EvalContext&             ctx,
@@ -2463,18 +3200,37 @@ protected:
        // Codomain could be [-pi, pi], but that would probably be too strict.
 };
 
-DEFINE_DERIVED_FLOAT1(Sinh, sinh, x, (exp(x) - exp(-x)) / constant(2.0f));
-DEFINE_DERIVED_FLOAT1(Cosh, cosh, x, (exp(x) + exp(-x)) / constant(2.0f));
+ExprP<float> atan2     (const ExprP<float>& x, const ExprP<float>& y)  { return app<ATan2<Signature<float, float, float> > >(x, y); }
+
+ExprP<deFloat16> atan2 (const ExprP<deFloat16>& x, const ExprP<deFloat16>& y)  { return app<ATan2<Signature<deFloat16, deFloat16, deFloat16> > >(x, y); }
+
+
+DEFINE_DERIVED_FLOAT1(Sinh, sinh, x, (exp<float>(x) - exp<float>(-x)) / constant(2.0f));
+DEFINE_DERIVED_FLOAT1(Cosh, cosh, x, (exp<float>(x) + exp<float>(-x)) / constant(2.0f));
 DEFINE_DERIVED_FLOAT1(Tanh, tanh, x, sinh(x) / cosh(x));
 
+DEFINE_DERIVED_FLOAT1_16BIT(Sinh16Bit, sinh, x, (exp(x) - exp(-x)) / constant((deFloat16)FLOAT16_2_0));
+DEFINE_DERIVED_FLOAT1_16BIT(Cosh16Bit, cosh, x, (exp(x) + exp(-x)) / constant((deFloat16)FLOAT16_2_0));
+DEFINE_DERIVED_FLOAT1_16BIT(Tanh16Bit, tanh, x, sinh(x) / cosh(x));
+
 // These are not defined as derived forms in the GLSL ES spec, but
 // that gives us a reasonable precision.
+DEFINE_DERIVED_FLOAT1(ASin16BitInOut32b, asin, x, atan2(x, sqrt(constant(1.0f) - pow(x, constant(2.0f)))));
+DEFINE_DERIVED_FLOAT1(ACos16BitInOut32b, acos, x, atan2(sqrt(constant(1.0f) - pow(x, constant(2.0f))), x));
 DEFINE_DERIVED_FLOAT1(ASinh, asinh, x, log(x + sqrt(x * x + constant(1.0f))));
 DEFINE_DERIVED_FLOAT1(ACosh, acosh, x, log(x + sqrt(alternatives((x + constant(1.0f)) * (x - constant(1.0f)),
-                                                                                                                                (x*x - constant(1.0f))))));
+                                                                                                                                (x * x - constant(1.0f))))));
 DEFINE_DERIVED_FLOAT1(ATanh, atanh, x, constant(0.5f) * log((constant(1.0f) + x) /
                                                                                                                        (constant(1.0f) - x)));
 
+DEFINE_DERIVED_FLOAT1_16BIT(ASin16Bit, asin, x, atan2(x, sqrt(constant((deFloat16)FLOAT16_1_0) - pow(x, constant((deFloat16)FLOAT16_2_0)))));
+DEFINE_DERIVED_FLOAT1_16BIT(ACos16Bit, acos, x, atan2(sqrt(constant((deFloat16)FLOAT16_1_0) - pow(x, constant((deFloat16)FLOAT16_2_0))), x));
+DEFINE_DERIVED_FLOAT1_16BIT(ASinh16Bit, asinh, x, log(x + sqrt(x * x + constant((deFloat16)FLOAT16_1_0))));
+DEFINE_DERIVED_FLOAT1_16BIT(ACosh16Bit, acosh, x, log(x + sqrt(alternatives((x + constant((deFloat16)FLOAT16_1_0)) * (x - constant((deFloat16)FLOAT16_1_0)),
+                                                                                                                                (x * x - constant((deFloat16)FLOAT16_1_0))))));
+DEFINE_DERIVED_FLOAT1_16BIT(ATanh16Bit, atanh, x, constant((deFloat16)FLOAT16_0_5) * log((constant((deFloat16)FLOAT16_1_0) + x) /
+                                                                                                                       (constant((deFloat16)FLOAT16_1_0) - x)));
+
 template <typename T>
 class GetComponent : public PrimitiveFunc<Signature<typename T::Element, T, int> >
 {
@@ -2515,6 +3271,7 @@ ExprP<typename T::Element> getComponent (const ExprP<T>& container, int ndx)
 
 template <typename T>  string  vecNamePrefix                   (void);
 template <>                            string  vecNamePrefix<float>    (void) { return ""; }
+template <>                            string  vecNamePrefix<deFloat16>(void) { return ""; }
 template <>                            string  vecNamePrefix<int>              (void) { return "i"; }
 template <>                            string  vecNamePrefix<bool>             (void) { return "b"; }
 
@@ -2593,8 +3350,6 @@ protected:
        }
 };
 
-
-
 template <typename T, int Rows, int Columns>
 class GenMat;
 
@@ -2700,10 +3455,9 @@ ExprP<Matrix<T, Rows, 4> > mat4 (const ExprP<Vector<T, Rows> >& arg0,
        return app<GenMat<T, Rows, 4> >(arg0, arg1, arg2, arg3);
 }
 
-
-template <int Rows, int Cols>
-class MatNeg : public PrimitiveFunc<Signature<Matrix<float, Rows, Cols>,
-                                                                                         Matrix<float, Rows, Cols> > >
+template <typename T, int Rows, int Cols>
+class MatNeg : public PrimitiveFunc<Signature<Matrix<T, Rows, Cols>,
+                                                                                         Matrix<T, Rows, Cols> > >
 {
 public:
        typedef typename MatNeg::IRet           IRet;
@@ -2755,10 +3509,10 @@ protected:
        const ScalarFunc&       doGetScalarFunc (void)                                                                  const = 0;
 };
 
-template <int Rows, int Cols>
-class CompMatFuncBase : public CompWiseFunc<float, Signature<Matrix<float, Rows, Cols>,
-                                                                                                                        Matrix<float, Rows, Cols>,
-                                                                                                                        Matrix<float, Rows, Cols> > >
+template <typename T, int Rows, int Cols>
+class CompMatFuncBase : public CompWiseFunc<T, Signature<Matrix<T, Rows, Cols>,
+                                                                                                                Matrix<T, Rows, Cols>,
+                                                                                                                Matrix<T, Rows, Cols> > >
 {
 public:
        typedef typename CompMatFuncBase::IRet          IRet;
@@ -2782,8 +3536,8 @@ protected:
        }
 };
 
-template <typename F, int Rows, int Cols>
-class CompMatFunc : public CompMatFuncBase<Rows, Cols>
+template <typename F, typename T, int Rows, int Cols>
+class CompMatFunc : public CompMatFuncBase<T, Rows, Cols>
 {
 protected:
        const typename CompMatFunc::ScalarFunc& doGetScalarFunc (void) const
@@ -2792,9 +3546,11 @@ protected:
        }
 };
 
-class ScalarMatrixCompMult : public Mul
+template <class T>
+class ScalarMatrixCompMult : public Mul< Signature<T, T, T> >
 {
 public:
+
        string  getName (void) const
        {
                return "matrixCompMult";
@@ -2802,12 +3558,12 @@ public:
 
        void    doPrint (ostream& os, const BaseArgExprs& args) const
        {
-               Func<Sig>::doPrint(os, args);
+               Func<Signature<T, T, T> >::doPrint(os, args);
        }
 };
 
-template <int Rows, int Cols>
-class MatrixCompMult : public CompMatFunc<ScalarMatrixCompMult, Rows, Cols>
+template <int Rows, int Cols, class T>
+class MatrixCompMult : public CompMatFunc<ScalarMatrixCompMult<T>, T, Rows, Cols>
 {
 };
 
@@ -2892,14 +3648,66 @@ ExprP<typename ContainerOf<T, Size>::Container> genXType (const ExprP<T>& x)
 typedef GenVec<float, 2> FloatVec2;
 DEFINE_CONSTRUCTOR2(FloatVec2, Vec2, vec2, float, float)
 
+typedef GenVec<deFloat16, 2> FloatVec1_16bit;
+DEFINE_CONSTRUCTOR2(FloatVec1_16bit, Vec2_16Bit, vec2, deFloat16, deFloat16)
+
 typedef GenVec<float, 3> FloatVec3;
 DEFINE_CONSTRUCTOR3(FloatVec3, Vec3, vec3, float, float, float)
 
+typedef GenVec<deFloat16, 3> FloatVec3_16bit;
+DEFINE_CONSTRUCTOR3(FloatVec3_16bit, Vec3_16Bit, vec3, deFloat16, deFloat16, deFloat16)
+
 typedef GenVec<float, 4> FloatVec4;
 DEFINE_CONSTRUCTOR4(FloatVec4, Vec4, vec4, float, float, float, float)
 
-template <int Size>
-class Dot : public DerivedFunc<Signature<float, Vector<float, Size>, Vector<float, Size> > >
+typedef GenVec<deFloat16, 4> FloatVec4_16bit;
+DEFINE_CONSTRUCTOR4(FloatVec4_16bit, Vec4_16Bit, vec4, deFloat16, deFloat16, deFloat16, deFloat16)
+
+template <class T>
+const ExprP<T> getConstZero(void);
+template <class T>
+const ExprP<T> getConstOne(void);
+template <class T>
+const ExprP<T> getConstTwo(void);
+
+template <>
+const ExprP<float> getConstZero<float>(void)
+{
+       return constant(0.0f);
+}
+
+template <>
+const ExprP<deFloat16> getConstZero<deFloat16>(void)
+{
+       return constant((deFloat16)FLOAT16_0_0);
+}
+
+template <>
+const ExprP<float> getConstOne<float>(void)
+{
+       return constant(1.0f);
+}
+
+template <>
+const ExprP<deFloat16> getConstOne<deFloat16>(void)
+{
+       return constant((deFloat16)FLOAT16_1_0);
+}
+
+template <>
+const ExprP<float> getConstTwo<float>(void)
+{
+       return constant(2.0f);
+}
+
+template <>
+const ExprP<deFloat16> getConstTwo<deFloat16>(void)
+{
+       return constant((deFloat16)FLOAT16_2_0);
+}
+
+template <int Size, class T>
+class Dot : public DerivedFunc<Signature<T, Vector<T, Size>, Vector<T, Size> > >
 {
 public:
        typedef typename Dot::ArgExprs ArgExprs;
@@ -2910,9 +3718,9 @@ public:
        }
 
 protected:
-       ExprP<float>    doExpand        (ExpandContext&, const ArgExprs& args) const
+       ExprP<T>        doExpand        (ExpandContext&, const ArgExprs& args) const
        {
-               ExprP<float> op[Size];
+               ExprP<T> op[Size];
                // Precompute all products.
                for (int ndx = 0; ndx < Size; ++ndx)
                        op[ndx] = args.a[ndx] * args.b[ndx];
@@ -2922,7 +3730,7 @@ protected:
                for (int ndx = 0; ndx < Size; ++ndx)
                        idx[ndx] = ndx;
 
-               ExprP<float> res = op[0];
+               ExprP<T> res = op[0];
                // Compute the first dot alternative: SUM(a[i]*b[i]), i = 0 .. Size-1
                for (int ndx = 1; ndx < Size; ++ndx)
                        res = res + op[ndx];
@@ -2931,7 +3739,7 @@ protected:
                // using a permutation compute a dot alternative.
                // Generates all possible variants fo summation of products in the dot product expansion expression.
                do {
-                       ExprP<float> alt = constant(0.0f);
+                       ExprP<T> alt = getConstZero<T>();
                        for (int ndx = 0; ndx < Size; ++ndx)
                                alt = alt + op[idx[ndx]];
                        res = alternatives(res, alt);
@@ -2941,35 +3749,48 @@ protected:
        }
 };
 
-template <>
-class Dot<1> : public DerivedFunc<Signature<float, float, float> >
+template <class T>
+class Dot<1, T> : public DerivedFunc<Signature<T, T, T> >
 {
 public:
+       typedef typename DerivedFunc<Signature<T, T, T> >::ArgExprs     TArgExprs;
+
        string                  getName         (void) const
        {
                return "dot";
        }
 
-       ExprP<float>    doExpand        (ExpandContext&, const ArgExprs& args) const
-       {
-               return args.a * args.b;
-       }
-};
+       ExprP<T>        doExpand        (ExpandContext&, const TArgExprs& args) const
+       {
+               return args.a * args.b;
+       }
+};
+
+template <int Size>
+ExprP<deFloat16> dot (const ExprP<Vector<deFloat16, Size> >& x, const ExprP<Vector<deFloat16, Size> >& y)
+{
+       return app<Dot<Size, deFloat16> >(x, y);
+}
+
+ExprP<deFloat16> dot (const ExprP<deFloat16>& x, const ExprP<deFloat16>& y)
+{
+       return app<Dot<1, deFloat16> >(x, y);
+}
 
 template <int Size>
 ExprP<float> dot (const ExprP<Vector<float, Size> >& x, const ExprP<Vector<float, Size> >& y)
 {
-       return app<Dot<Size> >(x, y);
+       return app<Dot<Size, float> >(x, y);
 }
 
 ExprP<float> dot (const ExprP<float>& x, const ExprP<float>& y)
 {
-       return app<Dot<1> >(x, y);
+       return app<Dot<1, float> >(x, y);
 }
 
-template <int Size>
+template <int Size, class T>
 class Length : public DerivedFunc<
-       Signature<float, typename ContainerOf<float, Size>::Container> >
+       Signature<T, typename ContainerOf<T, Size>::Container> >
 {
 public:
        typedef typename Length::ArgExprs ArgExprs;
@@ -2980,23 +3801,30 @@ public:
        }
 
 protected:
-       ExprP<float>    doExpand        (ExpandContext&, const ArgExprs& args) const
+       ExprP<T>                doExpand        (ExpandContext&, const ArgExprs& args) const
        {
                return sqrt(dot(args.a, args.a));
        }
 };
 
-template <int Size>
-ExprP<float> length (const ExprP<typename ContainerOf<float, Size>::Container>& x)
+
+template <class T, class TRet>
+ExprP<TRet> length (const ExprP<T>& x)
 {
-       return app<Length<Size> >(x);
+       return app<Length<1, T> >(x);
 }
 
-template <int Size>
+template <int Size, class T, class TRet>
+ExprP<TRet> length (const ExprP<typename ContainerOf<T, Size>::Container>& x)
+{
+       return app<Length<Size, T> >(x);
+}
+
+template <int Size, class T>
 class Distance : public DerivedFunc<
-       Signature<float,
-                         typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container> >
+       Signature<T,
+                         typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container> >
 {
 public:
        typedef typename        Distance::Ret           Ret;
@@ -3010,7 +3838,7 @@ public:
 protected:
        ExprP<Ret>      doExpand        (ExpandContext&, const ArgExprs& args) const
        {
-               return length<Size>(args.a - args.b);
+               return length<Size, T, Ret>(args.a - args.b);
        }
 };
 
@@ -3033,12 +3861,30 @@ protected:
        }
 };
 
+class Cross16Bit : public DerivedFunc<Signature<Vec3_16Bit, Vec3_16Bit, Vec3_16Bit> >
+{
+public:
+       string                  getName         (void) const
+       {
+               return "cross";
+       }
+
+protected:
+       ExprP<Vec3_16Bit>               doExpand        (ExpandContext&, const ArgExprs& x) const
+       {
+               return vec3(x.a[1] * x.b[2] - x.b[1] * x.a[2],
+                                       x.a[2] * x.b[0] - x.b[2] * x.a[0],
+                                       x.a[0] * x.b[1] - x.b[0] * x.a[1]);
+       }
+};
+
 DEFINE_CONSTRUCTOR2(Cross, Vec3, cross, Vec3, Vec3)
+DEFINE_CONSTRUCTOR2(Cross16Bit, Vec3_16Bit, cross, Vec3_16Bit, Vec3_16Bit)
 
-template<int Size>
+template<int Size, class T>
 class Normalize : public DerivedFunc<
-       Signature<typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container> >
+       Signature<typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container> >
 {
 public:
        typedef typename        Normalize::Ret          Ret;
@@ -3052,16 +3898,16 @@ public:
 protected:
        ExprP<Ret>      doExpand        (ExpandContext&, const ArgExprs& args) const
        {
-               return args.a / length<Size>(args.a);
+               return args.a / length<Size, T, T>(args.a);
        }
 };
 
-template <int Size>
+template <int Size, class T>
 class FaceForward : public DerivedFunc<
-       Signature<typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container> >
+       Signature<typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container> >
 {
 public:
        typedef typename        FaceForward::Ret                Ret;
@@ -3073,19 +3919,17 @@ public:
        }
 
 protected:
-
-
        ExprP<Ret>      doExpand        (ExpandContext&, const ArgExprs& args) const
        {
-               return cond(dot(args.c, args.b) < constant(0.0f), args.a, -args.a);
+               return cond(dot(args.c, args.b) < getConstZero<T>(), args.a, -args.a);
        }
 };
 
-template <int Size>
+template <int Size, class T>
 class Reflect : public DerivedFunc<
-       Signature<typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container> >
+       Signature<typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container> >
 {
 public:
        typedef typename        Reflect::Ret            Ret;
@@ -3103,26 +3947,30 @@ protected:
        {
                const ExprP<Arg0>&      i               = args.a;
                const ExprP<Arg1>&      n               = args.b;
-               const ExprP<float>      dotNI   = bindExpression("dotNI", ctx, dot(n, i));
+               const ExprP<T>  dotNI   = bindExpression("dotNI", ctx, dot(n, i));
 
-               return i - alternatives((n * dotNI) * constant(2.0f),
-                                                               alternatives(n * (dotNI * constant(2.0f)),
-                                                                                        alternatives(n * dot(i * constant(2.0f), n),
-                                                                                                                 n * dot(i, n * constant(2.0f)))));
+               return i - alternatives((n * dotNI) * getConstTwo<T>(),
+                                                                  alternatives( n * (dotNI * getConstTwo<T>()),
+                                                                                               alternatives(n * dot(i * getConstTwo<T>(), n),
+                                                                                                                        n * dot(i, n * getConstTwo<T>())
+                                                                                               )
+                                                                       )
+                                                               );
        }
 };
 
-template <int Size>
+template <int Size, class T>
 class Refract : public DerivedFunc<
-       Signature<typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container,
-                         typename ContainerOf<float, Size>::Container,
-                         float> >
+       Signature<typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container,
+                         typename ContainerOf<T, Size>::Container,
+                         T> >
 {
 public:
        typedef typename        Refract::Ret            Ret;
        typedef typename        Refract::Arg0           Arg0;
        typedef typename        Refract::Arg1           Arg1;
+       typedef typename        Refract::Arg2           Arg2;
        typedef typename        Refract::ArgExprs       ArgExprs;
 
        string          getName         (void) const
@@ -3135,50 +3983,55 @@ protected:
        {
                const ExprP<Arg0>&      i               = args.a;
                const ExprP<Arg1>&      n               = args.b;
-               const ExprP<float>&     eta             = args.c;
-               const ExprP<float>      dotNI   = bindExpression("dotNI", ctx, dot(n, i));
-               const ExprP<float>      k               = bindExpression("k", ctx, constant(1.0f) - eta * eta *
-                                                                                                (constant(1.0f) - dotNI * dotNI));
-
-               return cond(k < constant(0.0f),
-                                       genXType<float, Size>(constant(0.0f)),
+               const ExprP<Arg2>&      eta             = args.c;
+               const ExprP<T>  dotNI   = bindExpression("dotNI", ctx, dot(n, i));
+               const ExprP<T>  k               = bindExpression("k", ctx, getConstOne<T>() - eta * eta *
+                                                                                                (getConstOne<T>() - dotNI * dotNI));
+               return cond(k < getConstZero<T>(),
+                                       genXType<T, Size>(getConstZero<T>()),
                                        i * eta - n * (eta * dotNI + sqrt(k)));
        }
 };
 
-class PreciseFunc1 : public CFloatFunc1
+template <class T>
+class PreciseFunc1 : public CFloatFunc1<T>
 {
 public:
-                       PreciseFunc1    (const string& name, DoubleFunc1& func) : CFloatFunc1(name, func) {}
+                       PreciseFunc1    (const string& name, DoubleFunc1& func) : CFloatFunc1<T> (name, func) {}
 protected:
        double  precision               (const EvalContext&, double, double) const      { return 0.0; }
 };
 
-class Abs : public PreciseFunc1
+template <class T>
+class Abs : public PreciseFunc1<T>
 {
 public:
-       Abs (void) : PreciseFunc1("abs", deAbs) {}
+       Abs (void) : PreciseFunc1<T> ("abs", deAbs) {}
 };
 
-class Sign : public PreciseFunc1
+template <class T>
+class Sign : public PreciseFunc1<T>
 {
 public:
-       Sign (void) : PreciseFunc1("sign", deSign) {}
+       Sign (void) : PreciseFunc1<T> ("sign", deSign) {}
 };
 
-class Floor : public PreciseFunc1
+template <class T>
+class Floor : public PreciseFunc1<T>
 {
 public:
-       Floor (void) : PreciseFunc1("floor", deFloor) {}
+       Floor (void) : PreciseFunc1<T> ("floor", deFloor) {}
 };
 
-class Trunc : public PreciseFunc1
+template <class T>
+class Trunc : public PreciseFunc1<T>
 {
 public:
-       Trunc (void) : PreciseFunc1("trunc", deTrunc) {}
+       Trunc (void) : PreciseFunc1<T> ("trunc", deTrunc) {}
 };
 
-class Round : public FloatFunc1
+template <class T>
+class Round : public FloatFunc1<T>
 {
 public:
        string          getName         (void) const                                                            { return "round"; }
@@ -3201,40 +4054,186 @@ protected:
        double          precision       (const EvalContext&, double, double) const      { return 0.0; }
 };
 
-class RoundEven : public PreciseFunc1
+template <class T>
+class RoundEven : public PreciseFunc1<T>
 {
 public:
-       RoundEven (void) : PreciseFunc1("roundEven", deRoundEven) {}
+       RoundEven (void) : PreciseFunc1<T> ("roundEven", deRoundEven) {}
 };
 
-class Ceil : public PreciseFunc1
+template <class T>
+class Ceil : public PreciseFunc1<T>
 {
 public:
-       Ceil (void) : PreciseFunc1("ceil", deCeil) {}
+       Ceil (void) : PreciseFunc1<T> ("ceil", deCeil) {}
 };
 
-DEFINE_DERIVED_FLOAT1(Fract, fract, x, x - app<Floor>(x));
+typedef Floor< Signature<float, float> > Floor32Bit;
+typedef Floor< Signature<deFloat16, deFloat16> > Floor16Bit;
+
+DEFINE_DERIVED_FLOAT1(Fract, fract, x, x - app<Floor32Bit>(x));
+DEFINE_DERIVED_FLOAT1_16BIT(Fract16Bit, fract, x, x - app<Floor16Bit>(x));
 
-class PreciseFunc2 : public CFloatFunc2
+template <class T>
+class PreciseFunc2 : public CFloatFunc2<T>
 {
 public:
-                       PreciseFunc2    (const string& name, DoubleFunc2& func) : CFloatFunc2(name, func) {}
+                       PreciseFunc2    (const string& name, DoubleFunc2& func) : CFloatFunc2<T> (name, func) {}
 protected:
        double  precision               (const EvalContext&, double, double, double) const { return 0.0; }
 };
 
-DEFINE_DERIVED_FLOAT2(Mod, mod, x, y, x - y * app<Floor>(x / y));
+DEFINE_DERIVED_FLOAT2(Mod, mod, x, y, x - y * app<Floor32Bit>(x / y));
+
+#ifdef MODULO_OPERATION
+// \todo Zanin: Due to this is a disjoint function a special care required for values results near b
+template <class T>
+class Mod : public DerivedFunc<T>
+{
+public:
+       typedef typename DerivedFunc<T>::ArgExprs       ArgExprs;
+       typedef typename DerivedFunc<T>::IRet           IRet;
+       typedef typename DerivedFunc<T>::IArgs          IArgs;
+       typedef typename DerivedFunc<T>::Ret            Ret;
+       typedef typename DerivedFunc<T>::Arg0           Arg0;
+       typedef typename DerivedFunc<T>::Arg1           Arg1;
+       typedef typename DerivedFunc<T>::Arg2           Arg2;
+       typedef typename DerivedFunc<T>::Arg3           Arg3;
+       typedef typename DerivedFunc<T>::IArg0          IArg0;
+       typedef typename DerivedFunc<T>::IArg1          IArg1;
+       typedef typename DerivedFunc<T>::IArg2          IArg2;
+       typedef typename DerivedFunc<T>::IArg3          IArg3;
+       typedef Floor< Signature<Ret, Ret> >            FloorMod;
+       string                  getName         (void) const { return "mod"; }
+protected:
+       ExprP<Ret>      doExpand        (ExpandContext&, const ArgExprs& args_) const
+       {
+               const ExprP<Ret>& x = args_.a;
+               const ExprP<Ret>& y = args_.b;
+               return x - y * app<FloorMod>(x / y);
+       }
+       IRet                    doApply         (const EvalContext& ctx, const IArgs& args) const
+       {
+               Environment     funEnv;
+               IArgs&          mutArgs         = const_cast<IArgs&>(args);
+               IRet            ret;
+
+               initialize();
+
+               funEnv.bind(*this->DerivedFunc<T>::m_var0, args.a);
+               funEnv.bind(*this->DerivedFunc<T>::m_var1, args.b);
+               funEnv.bind(*this->DerivedFunc<T>::m_var2, args.c);
+               funEnv.bind(*this->DerivedFunc<T>::m_var3, args.d);
+
+               {
+                       EvalContext     funCtx(ctx.format, ctx.floatPrecision, funEnv, ctx.callDepth, ctx.isShaderFloat16Int8);
+
+                       for (size_t ndx = 0; ndx < this->DerivedFunc<T>::m_body.size(); ++ndx)
+                               this->DerivedFunc<T>::m_body[ndx]->execute(funCtx);
+
+                       ret = this->DerivedFunc<T>::m_ret->evaluate(funCtx);
+
+                       double lo = ret.lo();
+                       double hi = ret.hi();
+                       bool loWasChange = false;
+
+                       ret =  Interval(ret.hasNaN(), deMin(lo,hi), deMax(lo,hi));
+               }
+
+               // \todo [lauri] Store references instead of values in environment
+               const_cast<IArg0&>(mutArgs.a) = funEnv.lookup(*this->DerivedFunc<T>::m_var0);
+               const_cast<IArg1&>(mutArgs.b) = funEnv.lookup(*this->DerivedFunc<T>::m_var1);
+               const_cast<IArg2&>(mutArgs.c) = funEnv.lookup(*this->DerivedFunc<T>::m_var2);
+               const_cast<IArg3&>(mutArgs.d) = funEnv.lookup(*this->DerivedFunc<T>::m_var3);
+
+               return ret;
+       }
+       IRet                    doFail          (const EvalContext& ctx, const IArgs& args) const
+       {
+               Environment     funEnv;
+               IArgs&          mutArgs         = const_cast<IArgs&>(args);
+               IRet            ret                     = this->doApply ( ctx,args);
+
+               funEnv.bind(*this->DerivedFunc<T>::m_var0, args.a);
+               funEnv.bind(*this->DerivedFunc<T>::m_var1, args.b);
+               funEnv.bind(*this->DerivedFunc<T>::m_var2, args.c);
+               funEnv.bind(*this->DerivedFunc<T>::m_var3, args.d);
+
+               {
+                       double lo = ret.lo();
+                       double hi = ret.hi();
+
+                       if (!ret.isFinite() && (ret.lo()!=-TCU_INFINITY || ret.hi() != TCU_INFINITY))
+                       {
+                               if (lo == -TCU_INFINITY && (args.b.lo() > 0.0))
+                               {
+                                       lo = hi * (-1.0);
+                                       hi = TCU_INFINITY;
+                               }
+                               if (hi == TCU_INFINITY && (args.b.hi() < 0.0))
+                               {
+                                       hi = lo * (-1.0);
+                                       lo = -TCU_INFINITY;
+                               }
+                       }
+
+                       if (ret.isFinite() && !ret.contains(Interval(ret.hasNaN(), 0.0, 0.0)) && (deAbs(args.b.hi()) <= deAbs(hi) || deAbs(args.b.hi()) <= deAbs(lo)))
+                       {
+                               const double precision = ctx.format.ulp(0.0, 2.5); // from the spec
+                               lo = args.b.hi() > 0.0 ? 0.0 : -precision;
+                               hi = args.b.hi() > 0.0 ? precision : 0.0;
+                       }
+                       ret =  Interval(ret.hasNaN(), deMin(lo,hi), deMax(lo,hi));
+               }
+
+               // \todo [lauri] Store references instead of values in environment
+               const_cast<IArg0&>(mutArgs.a) = funEnv.lookup(*this->DerivedFunc<T>::m_var0);
+               const_cast<IArg1&>(mutArgs.b) = funEnv.lookup(*this->DerivedFunc<T>::m_var1);
+               const_cast<IArg2&>(mutArgs.c) = funEnv.lookup(*this->DerivedFunc<T>::m_var2);
+               const_cast<IArg3&>(mutArgs.d) = funEnv.lookup(*this->DerivedFunc<T>::m_var3);
+
+               return ret;
+       }
+private:
+       void                    initialize      (void)  const
+       {
+               if (!this->DerivedFunc<T>::m_ret)
+               {
+                       const ParamNames&       paramNames      = this->getParamNames();
+                       Counter                         symCounter;
+                       ExpandContext           ctx                     (symCounter);
+                       ArgExprs                        args;
+
+                       args.a  = this->DerivedFunc<T>::m_var0 = variable<Arg0>(paramNames.a);
+                       args.b  = this->DerivedFunc<T>::m_var1 = variable<Arg1>(paramNames.b);
+                       args.c  = this->DerivedFunc<T>::m_var2 = variable<Arg2>(paramNames.c);
+                       args.d  = this->DerivedFunc<T>::m_var3 = variable<Arg3>(paramNames.d);
+
+                       this->DerivedFunc<T>::m_ret     = this->doExpand(ctx, args);
+                       this->DerivedFunc<T>::m_body    = ctx.getStatements();
+               }
+       }
+};
+
+ExprP<deFloat16> mod (const ExprP<deFloat16>& arg0, const ExprP<deFloat16>& arg1)
+{
+       return app<Mod<Signature<deFloat16, deFloat16, deFloat16> > >(arg0, arg1);
+};
+#endif
 
-class Modf : public PrimitiveFunc<Signature<float, float, float> >
+template <class T>
+class Modf : public PrimitiveFunc<T>
 {
 public:
+       typedef typename Modf<T>::IArgs TIArgs;
+       typedef typename Modf<T>::IRet  TIRet;
        string  getName                         (void) const
        {
                return "modf";
        }
 
 protected:
-       IRet    doApply                         (const EvalContext&, const IArgs& iargs) const
+       TIRet   doApply                         (const EvalContext&, const TIArgs& iargs) const
        {
                Interval        fracIV;
                Interval&       wholeIV         = const_cast<Interval&>(iargs.b);
@@ -3259,11 +4258,16 @@ protected:
                return 1;
        }
 };
+typedef Modf< Signature<float, float, float> >                         Modf32Bit;
+typedef Modf< Signature<deFloat16, deFloat16, deFloat16> >     Modf16Bit;
 
-class Min : public PreciseFunc2 { public: Min (void) : PreciseFunc2("min", deMin) {} };
-class Max : public PreciseFunc2 { public: Max (void) : PreciseFunc2("max", deMax) {} };
+template <class T>
+class Min : public PreciseFunc2<T> { public: Min (void) : PreciseFunc2<T> ("min", deMin) {} };
+template <class T>
+class Max : public PreciseFunc2<T> { public: Max (void) : PreciseFunc2<T> ("max", deMax) {} };
 
-class Clamp : public FloatFunc3
+template <class T>
+class Clamp : public FloatFunc3<T>
 {
 public:
        string  getName         (void) const { return "clamp"; }
@@ -3279,24 +4283,35 @@ public:
        }
 };
 
-ExprP<float> clamp(const ExprP<float>& x, const ExprP<float>& minVal, const ExprP<float>& maxVal)
+ExprP<deFloat16> clamp(const ExprP<deFloat16>& x, const ExprP<deFloat16>& minVal, const ExprP<deFloat16>& maxVal)
 {
-       return app<Clamp>(x, minVal, maxVal);
+       return app<Clamp< Signature<deFloat16, deFloat16, deFloat16, deFloat16> > >(x, minVal, maxVal);
 }
 
+ExprP<float> clamp(const ExprP<float>& x, const ExprP<float>& minVal, const ExprP<float>& maxVal)
+{
+       return app<Clamp< Signature<float, float, float, float> > >(x, minVal, maxVal);
+}
 DEFINE_DERIVED_FLOAT3(Mix, mix, x, y, a, alternatives((x * (constant(1.0f) - a)) + y * a,
                                                                                                          x + (y - x) * a));
 
+DEFINE_DERIVED_FLOAT3_16BIT(Mix16Bit, mix, x, y, a, alternatives((x * (constant((deFloat16)FLOAT16_1_0) - a)) + y * a,
+                                                                                                         x + (y - x) * a));
+
 static double step (double edge, double x)
 {
        return x < edge ? 0.0 : 1.0;
 }
 
-class Step : public PreciseFunc2 { public: Step (void) : PreciseFunc2("step", step) {} };
+template <class T>
+class Step : public PreciseFunc2<T> { public: Step (void) : PreciseFunc2<T> ("step", step) {} };
 
-class SmoothStep : public DerivedFunc<Signature<float, float, float, float> >
+template <class T>
+class SmoothStep : public DerivedFunc<T>
 {
 public:
+       typedef typename SmoothStep<T>::ArgExprs        TArgExprs;
+       typedef typename SmoothStep<T>::Ret                     TRet;
        string          getName         (void) const
        {
                return "smoothstep";
@@ -3304,20 +4319,39 @@ public:
 
 protected:
 
-       ExprP<Ret>      doExpand        (ExpandContext& ctx, const ArgExprs& args) const
-       {
-               const ExprP<float>&             edge0   = args.a;
-               const ExprP<float>&             edge1   = args.b;
-               const ExprP<float>&             x               = args.c;
-               const ExprP<float>              tExpr   = clamp((x - edge0) / (edge1 - edge0),
-                                                                                       constant(0.0f), constant(1.0f));
-               const ExprP<float>              t               = bindExpression("t", ctx, tExpr);
-
-               return (t * t * (constant(3.0f) - constant(2.0f) * t));
-       }
+       ExprP<TRet>     doExpand        (ExpandContext& ctx, const TArgExprs& args) const;
 };
 
-class FrExp : public PrimitiveFunc<Signature<float, float, int> >
+template<>
+ExprP<SmoothStep< Signature<float, float, float, float> >::Ret>        SmoothStep< Signature<float, float, float, float> >::doExpand (ExpandContext& ctx, const SmoothStep< Signature<float, float, float, float> >::ArgExprs& args) const
+{
+       const ExprP<float>&             edge0   = args.a;
+       const ExprP<float>&             edge1   = args.b;
+       const ExprP<float>&             x               = args.c;
+       const ExprP<float>                      tExpr   = clamp((x - edge0) / (edge1 - edge0),
+                                                                               constant(0.0f), constant(1.0f));
+       const ExprP<float>                      t               = bindExpression("t", ctx, tExpr);
+
+       return (t * t * (constant(3.0f) - constant(2.0f) * t));
+}
+
+template<>
+ExprP<SmoothStep< Signature<deFloat16, deFloat16, deFloat16, deFloat16> >::TRet>       SmoothStep< Signature<deFloat16, deFloat16, deFloat16, deFloat16> >::doExpand (ExpandContext& ctx, const TArgExprs& args) const
+{
+       const ExprP<deFloat16>&         edge0   = args.a;
+       const ExprP<deFloat16>&         edge1   = args.b;
+       const ExprP<deFloat16>&         x               = args.c;
+       const ExprP<deFloat16>          tExpr   = clamp(( x - edge0 ) / ( edge1 - edge0 ),
+                                                                                       constant((deFloat16)FLOAT16_0_0), constant((deFloat16)FLOAT16_1_0));
+       const ExprP<deFloat16>          t               = bindExpression("t", ctx, tExpr);
+
+       return (t * t * (constant((deFloat16)FLOAT16_3_0) - constant((deFloat16)FLOAT16_2_0) * t));
+}
+
+//Signature<float, float, int>
+//Signature<float, deFloat16, int>
+template <class T>
+class FrExp : public PrimitiveFunc<T>
 {
 public:
        string  getName                 (void) const
@@ -3325,6 +4359,11 @@ public:
                return "frexp";
        }
 
+       typedef typename        FrExp::IRet             IRet;
+       typedef typename        FrExp::IArgs    IArgs;
+       typedef typename        FrExp::IArg0    IArg0;
+       typedef typename        FrExp::IArg1    IArg1;
+
 protected:
        IRet    doApply                 (const EvalContext&, const IArgs& iargs) const
        {
@@ -3374,9 +4413,15 @@ protected:
        }
 };
 
-class LdExp : public PrimitiveFunc<Signature<float, float, int> >
+//Signature<float, float, int>
+//Signature<float, deFloat16, int>
+template <class T>
+class LdExp : public PrimitiveFunc<T >
 {
 public:
+       typedef typename        LdExp::IRet             IRet;
+       typedef typename        LdExp::IArgs    IArgs;
+
        string          getName                 (void) const
        {
                return "ldexp";
@@ -3385,20 +4430,20 @@ public:
 protected:
        Interval        doApply                 (const EvalContext& ctx, const IArgs& iargs) const
        {
-               Interval        ret = call<Exp2>(ctx, iargs.b);
+               Interval        ret = call<Exp2<Signature<float, float> > >(ctx, iargs.b);
                // Khronos bug 11180 consensus: if exp2(exponent) cannot be represented,
                // the result is undefined.
 
                if (ret.contains(TCU_INFINITY) | ret.contains(-TCU_INFINITY))
                        ret |= TCU_NAN;
 
-               return call<Mul>(ctx, iargs.a, ret);
+               return call<Mul< Signature<float, float, float> > >(ctx, iargs.a, ret);
        }
 };
 
-template<int Rows, int Columns>
-class Transpose : public PrimitiveFunc<Signature<Matrix<float, Rows, Columns>,
-                                                                                                Matrix<float, Columns, Rows> > >
+template<int Rows, int Columns, class T>
+class Transpose : public PrimitiveFunc<Signature<Matrix<T, Rows, Columns>,
+                                                                                                Matrix<T, Columns, Rows> > >
 {
 public:
        typedef typename Transpose::IRet        IRet;
@@ -3437,10 +4482,10 @@ protected:
        }
 };
 
-template<int LeftRows, int Middle, int RightCols>
-class MatMul : public MulFunc<Matrix<float, LeftRows, RightCols>,
-                                                         Matrix<float, LeftRows, Middle>,
-                                                         Matrix<float, Middle, RightCols> >
+template<typename T, int LeftRows, int Middle, int RightCols>
+class MatMul : public MulFunc<Matrix<T, LeftRows, RightCols>,
+                                                         Matrix<T, LeftRows, Middle>,
+                                                         Matrix<T, Middle, RightCols> >
 {
 protected:
        typedef typename MatMul::IRet   IRet;
@@ -3461,8 +4506,8 @@ protected:
                                Interval        element (0.0);
 
                                for (int ndx = 0; ndx < Middle; ++ndx)
-                                       element = call<Add>(ctx, element,
-                                                                               call<Mul>(ctx, left[ndx][row], right[col][ndx]));
+                                       element = call<Add< Signature<T, T, T> > >(ctx, element,
+                                                                               call<Mul< Signature<T, T, T> > >(ctx, left[ndx][row], right[col][ndx]));
 
                                ret[col][row] = element;
                        }
@@ -3472,10 +4517,10 @@ protected:
        }
 };
 
-template<int Rows, int Cols>
-class VecMatMul : public MulFunc<Vector<float, Cols>,
-                                                                Vector<float, Rows>,
-                                                                Matrix<float, Rows, Cols> >
+template<typename T, int Rows, int Cols>
+class VecMatMul : public MulFunc<Vector<T, Cols>,
+                                                                Vector<T, Rows>,
+                                                                Matrix<T, Rows, Cols> >
 {
 public:
        typedef typename VecMatMul::IRet        IRet;
@@ -3495,7 +4540,7 @@ protected:
                        Interval        element (0.0);
 
                        for (int row = 0; row < Rows; ++row)
-                               element = call<Add>(ctx, element, call<Mul>(ctx, left[row], right[col][row]));
+                               element = call<Add< Signature<T, T, T> > >(ctx, element, call<Mul< Signature<T, T, T> > >(ctx, left[row], right[col][row]));
 
                        ret[col] = element;
                }
@@ -3504,10 +4549,10 @@ protected:
        }
 };
 
-template<int Rows, int Cols>
-class MatVecMul : public MulFunc<Vector<float, Rows>,
-                                                                Matrix<float, Rows, Cols>,
-                                                                Vector<float, Cols> >
+template<int Rows, int Cols, class T>
+class MatVecMul : public MulFunc<Vector<T, Rows>,
+                                                                Matrix<T, Rows, Cols>,
+                                                                Vector<T, Cols> >
 {
 public:
        typedef typename MatVecMul::IRet        IRet;
@@ -3521,15 +4566,15 @@ protected:
                const IArg0&    left    = iargs.a;
                const IArg1&    right   = iargs.b;
 
-               return call<VecMatMul<Cols, Rows> >(ctx, right,
-                                                                                       call<Transpose<Rows, Cols> >(ctx, left));
+               return call<VecMatMul<T, Cols, Rows> >(ctx, right,
+                                                                                       call<Transpose<Rows, Cols, T> >(ctx, left));
        }
 };
 
-template<int Rows, int Cols>
-class OuterProduct : public PrimitiveFunc<Signature<Matrix<float, Rows, Cols>,
-                                                                                                       Vector<float, Rows>,
-                                                                                                       Vector<float, Cols> > >
+template<int Rows, int Cols, class T>
+class OuterProduct : public PrimitiveFunc<Signature<Matrix<T, Rows, Cols>,
+                                                                                                       Vector<T, Rows>,
+                                                                                                       Vector<T, Cols> > >
 {
 public:
        typedef typename OuterProduct::IRet             IRet;
@@ -3548,29 +4593,29 @@ protected:
                for (int row = 0; row < Rows; ++row)
                {
                        for (int col = 0; col < Cols; ++col)
-                               ret[col][row] = call<Mul>(ctx, iargs.a[row], iargs.b[col]);
+                               ret[col][row] = call<Mul< Signature<T, T, T> > >(ctx, iargs.a[row], iargs.b[col]);
                }
 
                return ret;
        }
 };
 
-template<int Rows, int Cols>
-ExprP<Matrix<float, Rows, Cols> > outerProduct (const ExprP<Vector<float, Rows> >& left,
-                                                                                               const ExprP<Vector<float, Cols> >& right)
+template<int Rows, int Cols, class T>
+ExprP<Matrix<T, Rows, Cols> > outerProduct (const ExprP<Vector<T, Rows> >& left,
+                                                                                               const ExprP<Vector<T, Cols> >& right)
 {
-       return app<OuterProduct<Rows, Cols> >(left, right);
+       return app<OuterProduct<Rows, Cols, T> >(left, right);
 }
 
-template<int Size>
-class DeterminantBase : public DerivedFunc<Signature<float, Matrix<float, Size, Size> > >
+template<class T>
+class DeterminantBase : public DerivedFunc<T>
 {
 public:
        string  getName (void) const { return "determinant"; }
 };
 
-template<int Size>
-class Determinant;
+template<int Size> class Determinant;
+template<int Size> class Determinant16bit;
 
 template<int Size>
 ExprP<float> determinant (ExprP<Matrix<float, Size, Size> > mat)
@@ -3578,8 +4623,14 @@ ExprP<float> determinant (ExprP<Matrix<float, Size, Size> > mat)
        return app<Determinant<Size> >(mat);
 }
 
+template<int Size>
+ExprP<deFloat16> determinant (ExprP<Matrix<deFloat16, Size, Size> > mat)
+{
+       return app<Determinant16bit<Size> >(mat);
+}
+
 template<>
-class Determinant<2> : public DeterminantBase<2>
+class Determinant<2> : public DeterminantBase<Signature<float, Matrix<float, 2, 2> > >
 {
 protected:
        ExprP<Ret>      doExpand (ExpandContext&, const ArgExprs& args) const
@@ -3591,7 +4642,7 @@ protected:
 };
 
 template<>
-class Determinant<3> : public DeterminantBase<3>
+class Determinant<3> : public DeterminantBase<Signature<float, Matrix<float, 3, 3> > >
 {
 protected:
        ExprP<Ret> doExpand (ExpandContext&, const ArgExprs& args) const
@@ -3605,7 +4656,7 @@ protected:
 };
 
 template<>
-class Determinant<4> : public DeterminantBase<4>
+class Determinant<4> : public DeterminantBase<Signature<float, Matrix<float, 4, 4> > >
 {
 protected:
         ExprP<Ret>     doExpand        (ExpandContext& ctx, const ArgExprs& args) const
@@ -3637,6 +4688,65 @@ protected:
        }
 };
 
+template<>
+class Determinant16bit<2> : public DeterminantBase<Signature<deFloat16, Matrix<deFloat16, 2, 2> > >
+{
+protected:
+       ExprP<Ret>      doExpand (ExpandContext&, const ArgExprs& args) const
+       {
+               ExprP<Mat2_16b> mat     = args.a;
+
+               return mat[0][0] * mat[1][1] - mat[1][0] * mat[0][1];
+       }
+};
+
+template<>
+class Determinant16bit<3> : public DeterminantBase<Signature<deFloat16, Matrix<deFloat16, 3, 3> > >
+{
+protected:
+       ExprP<Ret> doExpand(ExpandContext&, const ArgExprs& args) const
+       {
+               ExprP<Mat3_16b> mat = args.a;
+
+               return (mat[0][0] * (mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1]) +
+                       mat[0][1] * (mat[1][2] * mat[2][0] - mat[1][0] * mat[2][2]) +
+                       mat[0][2] * (mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0]));
+       }
+};
+
+template<>
+class Determinant16bit<4> : public DeterminantBase<Signature<deFloat16, Matrix<deFloat16, 4, 4> > >
+{
+protected:
+       ExprP<Ret>      doExpand(ExpandContext& ctx, const ArgExprs& args) const
+       {
+               ExprP<Mat4_16b> mat = args.a;
+               ExprP<Mat3_16b> minors[4];
+
+               for (int ndx = 0; ndx < 4; ++ndx)
+               {
+                       ExprP<Vec4_16Bit>               minorColumns[3];
+                       ExprP<Vec3_16Bit>               columns[3];
+
+                       for (int col = 0; col < 3; ++col)
+                               minorColumns[col] = mat[col < ndx ? col : col + 1];
+
+                       for (int col = 0; col < 3; ++col)
+                               columns[col] = vec3(minorColumns[0][col + 1],
+                                       minorColumns[1][col + 1],
+                                       minorColumns[2][col + 1]);
+
+                       minors[ndx] = bindExpression("minor", ctx,
+                               mat3(columns[0], columns[1], columns[2]));
+               }
+
+               return (mat[0][0] * determinant(minors[0]) -
+                       mat[1][0] * determinant(minors[1]) +
+                       mat[2][0] * determinant(minors[2]) -
+                       mat[3][0] * determinant(minors[3]));
+       }
+};
+
 template<int Size> class Inverse;
 
 template <int Size>
@@ -3645,6 +4755,14 @@ ExprP<Matrix<float, Size, Size> > inverse (ExprP<Matrix<float, Size, Size> > mat
        return app<Inverse<Size> >(mat);
 }
 
+template<int Size> class Inverse16bit;
+
+template <int Size>
+ExprP<Matrix<deFloat16, Size, Size> > inverse (ExprP<Matrix<deFloat16, Size, Size> > mat)
+{
+       return app<Inverse16bit<Size> >(mat);
+}
+
 template<>
 class Inverse<2> : public DerivedFunc<Signature<Mat2, Mat2> >
 {
@@ -3746,21 +4864,123 @@ protected:
        }
 };
 
-class Fma : public DerivedFunc<Signature<float, float, float, float> >
+template<>
+class Inverse16bit<2> : public DerivedFunc<Signature<Mat2_16b, Mat2_16b> >
 {
 public:
-       string                  getName                                 (void) const
+       string          getName (void) const
        {
-               return "fma";
+               return "inverse";
+       }
+
+protected:
+       ExprP<Ret>      doExpand (ExpandContext& ctx, const ArgExprs& args) const
+       {
+               ExprP<Mat2_16b>         mat = args.a;
+               ExprP<deFloat16>        det     = bindExpression("det", ctx, determinant(mat));
+
+               return mat2(vec2((mat[1][1] / det), (-mat[0][1] / det)),
+                                       vec2((-mat[1][0] / det), (mat[0][0] / det)));
+       }
+};
+
+template<>
+class Inverse16bit<3> : public DerivedFunc<Signature<Mat3_16b, Mat3_16b> >
+{
+public:
+       string          getName(void) const
+       {
+               return "inverse";
+       }
+
+protected:
+       ExprP<Ret>      doExpand(ExpandContext& ctx, const ArgExprs& args)                      const
+       {
+               ExprP<Mat3_16b>         mat = args.a;
+               ExprP<Mat2_16b>         invA = bindExpression("invA", ctx,
+                       inverse(mat2(vec2(mat[0][0], mat[0][1]),
+                               vec2(mat[1][0], mat[1][1]))));
+
+               ExprP<Vec2_16Bit>               matB = bindExpression("matB", ctx, vec2(mat[2][0], mat[2][1]));
+               ExprP<Vec2_16Bit>               matC = bindExpression("matC", ctx, vec2(mat[0][2], mat[1][2]));
+               ExprP<Mat3_16b::Scalar> matD = bindExpression("matD", ctx, mat[2][2]);
+
+               ExprP<Mat3_16b::Scalar> schur = bindExpression("schur", ctx,
+                       constant((deFloat16)FLOAT16_1_0) /
+                       (matD - dot(matC * invA, matB)));
+
+               ExprP<Vec2_16Bit>               t1 = invA * matB;
+               ExprP<Vec2_16Bit>               t2 = t1 * schur;
+               ExprP<Mat2_16b>         t3 = outerProduct(t2, matC);
+               ExprP<Mat2_16b>         t4 = t3 * invA;
+               ExprP<Mat2_16b>         t5 = invA + t4;
+               ExprP<Mat2_16b>         blockA = bindExpression("blockA", ctx, t5);
+               ExprP<Vec2_16Bit>               blockB = bindExpression("blockB", ctx,
+                       (invA * matB) * -schur);
+               ExprP<Vec2_16Bit>               blockC = bindExpression("blockC", ctx,
+                       (matC * invA) * -schur);
+
+               return mat3(vec3(blockA[0][0], blockA[0][1], blockC[0]),
+                       vec3(blockA[1][0], blockA[1][1], blockC[1]),
+                       vec3(blockB[0], blockB[1], schur));
+       }
+};
+
+template<>
+class Inverse16bit<4> : public DerivedFunc<Signature<Mat4_16b, Mat4_16b> >
+{
+public:
+       string          getName(void) const { return "inverse"; }
+
+protected:
+       ExprP<Ret>                      doExpand(ExpandContext&         ctx,
+               const ArgExprs& args)                   const
+       {
+               ExprP<Mat4_16b> mat = args.a;
+               ExprP<Mat2_16b> invA = bindExpression("invA", ctx,
+                       inverse(mat2(vec2(mat[0][0], mat[0][1]),
+                               vec2(mat[1][0], mat[1][1]))));
+               ExprP<Mat2_16b> matB = bindExpression("matB", ctx,
+                       mat2(vec2(mat[2][0], mat[2][1]),
+                               vec2(mat[3][0], mat[3][1])));
+               ExprP<Mat2_16b> matC = bindExpression("matC", ctx,
+                       mat2(vec2(mat[0][2], mat[0][3]),
+                               vec2(mat[1][2], mat[1][3])));
+               ExprP<Mat2_16b> matD = bindExpression("matD", ctx,
+                       mat2(vec2(mat[2][2], mat[2][3]),
+                               vec2(mat[3][2], mat[3][3])));
+               ExprP<Mat2_16b> schur = bindExpression("schur", ctx,
+                       inverse(matD + -(matC * invA * matB)));
+               ExprP<Mat2_16b> blockA = bindExpression("blockA", ctx,
+                       invA + (invA * matB * schur * matC * invA));
+               ExprP<Mat2_16b> blockB = bindExpression("blockB", ctx,
+                       (-invA) * matB * schur);
+               ExprP<Mat2_16b> blockC = bindExpression("blockC", ctx,
+                       (-schur) * matC * invA);
+
+               return mat4(vec4(blockA[0][0], blockA[0][1], blockC[0][0], blockC[0][1]),
+                       vec4(blockA[1][0], blockA[1][1], blockC[1][0], blockC[1][1]),
+                       vec4(blockB[0][0], blockB[0][1], schur[0][0], schur[0][1]),
+                       vec4(blockB[1][0], blockB[1][1], schur[1][0], schur[1][1]));
        }
+};
+
+//Signature<float, float, float, float>
+//Signature<deFloat16, deFloat16, deFloat16, deFloat16>
+template <class T>
+class Fma : public DerivedFunc<T>
+{
+public:
+       typedef typename        Fma::ArgExprs           ArgExprs;
+       typedef typename        Fma::Ret                        Ret;
 
-       string                  getRequiredExtension    (void) const
+       string                  getName                                 (void) const
        {
-               return "GL_EXT_gpu_shader5";
+               return "fma";
        }
 
 protected:
-       ExprP<float>    doExpand                                (ExpandContext&, const ArgExprs& x) const
+       ExprP<Ret>      doExpand                                (ExpandContext&, const ArgExprs& x) const
        {
                return x.a * x.b + x.c;
        }
@@ -3778,29 +4998,43 @@ ExprP<typename T::Element> ContainerExprPBase<T>::operator[] (int i) const
 
 ExprP<float> operator+ (const ExprP<float>& arg0, const ExprP<float>& arg1)
 {
-       return app<Add>(arg0, arg1);
+       return app<Add< Signature<float, float, float> > >(arg0, arg1);
+}
+
+ExprP<deFloat16> operator+ (const ExprP<deFloat16>& arg0, const ExprP<deFloat16>& arg1)
+{
+       return app<Add< Signature<deFloat16, deFloat16, deFloat16> > >(arg0, arg1);
 }
 
-ExprP<float> operator- (const ExprP<float>& arg0, const ExprP<float>& arg1)
+template <typename T>
+ExprP<T> operator- (const ExprP<T>& arg0, const ExprP<T>& arg1)
 {
-       return app<Sub>(arg0, arg1);
+       return app<Sub <Signature <T,T,T> > >(arg0, arg1);
 }
 
-ExprP<float> operator- (const ExprP<float>& arg0)
+template <typename T>
+ExprP<T> operator- (const ExprP<T>& arg0)
 {
-       return app<Negate>(arg0);
+       return app<Negate< Signature<T, T> > >(arg0);
 }
 
 ExprP<float> operator* (const ExprP<float>& arg0, const ExprP<float>& arg1)
 {
-       return app<Mul>(arg0, arg1);
+       return app<Mul< Signature<float, float, float> > >(arg0, arg1);
 }
 
-ExprP<float> operator/ (const ExprP<float>& arg0, const ExprP<float>& arg1)
+ExprP<deFloat16> operator* (const ExprP<deFloat16>& arg0, const ExprP<deFloat16>& arg1)
+{
+       return app<Mul< Signature<deFloat16, deFloat16, deFloat16> > >(arg0, arg1);
+}
+
+template <typename T>
+ExprP<T> operator/ (const ExprP<T>& arg0, const ExprP<T>& arg1)
 {
-       return app<Div>(arg0, arg1);
+       return app<Div< Signature<T, T, T> > >(arg0, arg1);
 }
 
+
 template <typename Sig_, int Size>
 class GenFunc : public PrimitiveFunc<Signature<
        typename ContainerOf<typename Sig_::Ret, Size>::Container,
@@ -3813,30 +5047,35 @@ public:
        typedef typename GenFunc::IArgs         IArgs;
        typedef typename GenFunc::IRet          IRet;
 
-                       GenFunc                                 (const Func<Sig_>&      scalarFunc) : m_func (scalarFunc) {}
+                               GenFunc                                 (const Func<Sig_>&      scalarFunc) : m_func (scalarFunc) {}
 
-       string  getName                                 (void) const
+       string          getName                                 (void) const
        {
                return m_func.getName();
        }
 
-       int             getOutParamIndex                (void) const
+       int                     getOutParamIndex                (void) const
        {
                return m_func.getOutParamIndex();
        }
 
-       string  getRequiredExtension    (void) const
+       string          getRequiredExtension    (void) const
        {
                return m_func.getRequiredExtension();
        }
 
+       Interval        getInputRange                   (const bool is16bit) const
+       {
+               return m_func.getInputRange(is16bit);
+       }
+
 protected:
-       void    doPrint                                 (ostream& os, const BaseArgExprs& args) const
+       void            doPrint                                 (ostream& os, const BaseArgExprs& args) const
        {
                m_func.print(os, args);
        }
 
-       IRet    doApply                                 (const EvalContext& ctx, const IArgs& iargs) const
+       IRet            doApply                                 (const EvalContext& ctx, const IArgs& iargs) const
        {
                IRet ret;
 
@@ -3849,7 +5088,20 @@ protected:
                return ret;
        }
 
-       void    doGetUsedFuncs                  (FuncSet& dst) const
+       IRet            doFail                                  (const EvalContext& ctx, const IArgs& iargs) const
+       {
+               IRet ret;
+
+               for (int ndx = 0; ndx < Size; ++ndx)
+               {
+                       ret[ndx] =
+                               m_func.fail(ctx, iargs.a[ndx], iargs.b[ndx], iargs.c[ndx], iargs.d[ndx]);
+               }
+
+               return ret;
+       }
+
+       void            doGetUsedFuncs                  (FuncSet& dst) const
        {
                m_func.getUsedFuncs(dst);
        }
@@ -3864,8 +5116,6 @@ public:
        VectorizedFunc  (void) : GenFunc<typename F::Sig, Size>(instance<F>()) {}
 };
 
-
-
 template <typename Sig_, int Size>
 class FixedGenFunc : public PrimitiveFunc <Signature<
        typename ContainerOf<typename Sig_::Ret, Size>::Container,
@@ -3939,103 +5189,111 @@ GenFuncs<typename F::Sig> makeVectorizedFuncs (void)
                                                                         instance<VectorizedFunc<F, 4> >());
 }
 
-template<int Size>
-ExprP<Vector<float, Size> > operator*(const ExprP<Vector<float, Size> >& arg0,
-                                                                         const ExprP<Vector<float, Size> >& arg1)
+template<typename T, int Size>
+ExprP<Vector<T, Size> > operator/(const ExprP<Vector<T, Size> >&       arg0,
+                                                                         const ExprP<T>&                                       arg1)
 {
-       return app<VectorizedFunc<Mul, Size> >(arg0, arg1);
+       return app<FixedVecFunc<Div< Signature<T, T, T> >, Size> >(arg0, arg1);
 }
 
-template<int Size>
-ExprP<Vector<float, Size> > operator*(const ExprP<Vector<float, Size> >&       arg0,
-                                                                         const ExprP<float>&                                   arg1)
+template<typename T, int Size>
+ExprP<Vector<T, Size> > operator-(const ExprP<Vector<T, Size> >& arg0)
 {
-       return app<FixedVecFunc<Mul, Size> >(arg0, arg1);
+       return app<VectorizedFunc<Negate< Signature<T, T> >, Size> >(arg0);
 }
 
-template<int Size>
-ExprP<Vector<float, Size> > operator/(const ExprP<Vector<float, Size> >&       arg0,
-                                                                         const ExprP<float>&                                   arg1)
+template<typename T, int Size>
+ExprP<Vector<T, Size> > operator-(const ExprP<Vector<T, Size> >& arg0,
+                                                                         const ExprP<Vector<T, Size> >& arg1)
 {
-       return app<FixedVecFunc<Div, Size> >(arg0, arg1);
+       return app<VectorizedFunc<Sub<Signature<T, T, T> >, Size> >(arg0, arg1);
 }
 
-template<int Size>
-ExprP<Vector<float, Size> > operator-(const ExprP<Vector<float, Size> >& arg0)
+template<int Size, typename T>
+ExprP<Vector<T, Size> > operator*(const ExprP<Vector<T, Size> >&       arg0,
+                                                                 const ExprP<T>&                                       arg1)
 {
-       return app<VectorizedFunc<Negate, Size> >(arg0);
+       return app<FixedVecFunc<Mul< Signature<T, T, T> >, Size> >(arg0, arg1);
 }
 
-template<int Size>
-ExprP<Vector<float, Size> > operator-(const ExprP<Vector<float, Size> >& arg0,
-                                                                         const ExprP<Vector<float, Size> >& arg1)
+template<typename T, int Size>
+ExprP<Vector<T, Size> > operator*(const ExprP<Vector<T, Size> >& arg0,
+                                                                 const ExprP<Vector<T, Size> >& arg1)
 {
-       return app<VectorizedFunc<Sub, Size> >(arg0, arg1);
+       return app<VectorizedFunc<Mul< Signature<T, T, T> >, Size> >(arg0, arg1);
 }
 
-template<int LeftRows, int Middle, int RightCols>
-ExprP<Matrix<float, LeftRows, RightCols> >
-operator* (const ExprP<Matrix<float, LeftRows, Middle> >&      left,
-                  const ExprP<Matrix<float, Middle, RightCols> >&      right)
+template<int LeftRows, int Middle, int RightCols, typename T>
+ExprP<Matrix<T, LeftRows, RightCols> >
+operator* (const ExprP<Matrix<T, LeftRows, Middle> >&  left,
+                  const ExprP<Matrix<T, Middle, RightCols> >&  right)
 {
-       return app<MatMul<LeftRows, Middle, RightCols> >(left, right);
+       return app<MatMul<T, LeftRows, Middle, RightCols> >(left, right);
 }
 
-template<int Rows, int Cols>
-ExprP<Vector<float, Rows> > operator* (const ExprP<Vector<float, Cols> >&              left,
-                                                                          const ExprP<Matrix<float, Rows, Cols> >&     right)
+template<int Rows, int Cols, typename T>
+ExprP<Vector<T, Rows> > operator* (const ExprP<Vector<T, Cols> >&              left,
+                                                                  const ExprP<Matrix<T, Rows, Cols> >& right)
 {
-       return app<VecMatMul<Rows, Cols> >(left, right);
+       return app<VecMatMul<T, Rows, Cols> >(left, right);
 }
 
-template<int Rows, int Cols>
-ExprP<Vector<float, Cols> > operator* (const ExprP<Matrix<float, Rows, Cols> >&        left,
-                                                                          const ExprP<Vector<float, Rows> >&           right)
+template<int Rows, int Cols, class T>
+ExprP<Vector<T, Cols> > operator* (const ExprP<Matrix<T, Rows, Cols> >&        left,
+                                                                  const ExprP<Vector<T, Rows> >&               right)
 {
-       return app<MatVecMul<Rows, Cols> >(left, right);
+       return app<MatVecMul<Rows, Cols, T> >(left, right);
 }
 
-template<int Rows, int Cols>
-ExprP<Matrix<float, Rows, Cols> > operator* (const ExprP<Matrix<float, Rows, Cols> >&  left,
-                                                                                        const ExprP<float>&                                            right)
+template<int Rows, int Cols, typename T>
+ExprP<Matrix<T, Rows, Cols> > operator* (const ExprP<Matrix<T, Rows, Cols> >&  left,
+                                                                                const ExprP<T>&                                                right)
 {
-       return app<ScalarMatFunc<Mul, Rows, Cols> >(left, right);
+       return app<ScalarMatFunc<Mul< Signature<T, T, T> >, Rows, Cols> >(left, right);
 }
 
 template<int Rows, int Cols>
 ExprP<Matrix<float, Rows, Cols> > operator+ (const ExprP<Matrix<float, Rows, Cols> >&  left,
                                                                                         const ExprP<Matrix<float, Rows, Cols> >&       right)
 {
-       return app<CompMatFunc<Add, Rows, Cols> >(left, right);
+       return app<CompMatFunc<Add< Signature<float, float, float> >,float, Rows, Cols> >(left, right);
+}
+
+template<int Rows, int Cols>
+ExprP<Matrix<deFloat16, Rows, Cols> > operator+ (const ExprP<Matrix<deFloat16, Rows, Cols> >&  left,
+                                                                                                const ExprP<Matrix<deFloat16, Rows, Cols> >&   right)
+{
+       return app<CompMatFunc<Add< Signature<deFloat16, deFloat16, deFloat16> >, deFloat16, Rows, Cols> >(left, right);
 }
 
-template<int Rows, int Cols>
-ExprP<Matrix<float, Rows, Cols> > operator- (const ExprP<Matrix<float, Rows, Cols> >&  mat)
+template<typename T, int Rows, int Cols>
+ExprP<Matrix<T, Rows, Cols> > operator- (const ExprP<Matrix<T, Rows, Cols> >&  mat)
 {
-       return app<MatNeg<Rows, Cols> >(mat);
+       return app<MatNeg<T, Rows, Cols> >(mat);
 }
 
 template <typename T>
 class Sampling
 {
 public:
-       virtual void    genFixeds       (const FloatFormat&, vector<T>&)                        const {}
-       virtual T               genRandom       (const FloatFormat&, Precision, Random&)        const { return T(); }
-       virtual double  getWeight       (void)                                                                          const { return 0.0; }
+       virtual void    genFixeds                       (const FloatFormat&, const Precision, vector<T>&, const Interval&)      const {}
+       virtual T               genRandom                       (const FloatFormat&,const Precision, Random&, const Interval&)          const { return T(); }
+       virtual void    removeNotInRange        (vector<T>&, const Interval&, const Precision)                                  const {};
+       virtual double  getWeight                       (void)                                                                                                                          const { return 0.0; }
 };
 
 template <>
 class DefaultSampling<Void> : public Sampling<Void>
 {
 public:
-       void    genFixeds       (const FloatFormat&, vector<Void>& dst) const { dst.push_back(Void()); }
+       void    genFixeds       (const FloatFormat&, const Precision, vector<Void>& dst, const Interval&) const { dst.push_back(Void()); }
 };
 
 template <>
 class DefaultSampling<bool> : public Sampling<bool>
 {
 public:
-       void    genFixeds       (const FloatFormat&, vector<bool>& dst) const
+       void    genFixeds       (const FloatFormat&, const Precision, vector<bool>& dst, const Interval&) const
        {
                dst.push_back(true);
                dst.push_back(false);
@@ -4046,7 +5304,7 @@ template <>
 class DefaultSampling<int> : public Sampling<int>
 {
 public:
-       int             genRandom       (const FloatFormat&, Precision prec, Random& rnd) const
+       int             genRandom       (const FloatFormat&, const Precision prec, Random& rnd, const Interval&) const
        {
                const int       exp             = rnd.getInt(0, getNumBits(prec)-2);
                const int       sign    = rnd.getBool() ? -1 : 1;
@@ -4054,7 +5312,7 @@ public:
                return sign * rnd.getInt(0, (deInt32)1 << exp);
        }
 
-       void    genFixeds       (const FloatFormat&, vector<int>& dst) const
+       void    genFixeds       (const FloatFormat&, const Precision, vector<int>& dst, const Interval&) const
        {
                dst.push_back(0);
                dst.push_back(-1);
@@ -4068,6 +5326,7 @@ private:
                switch (prec)
                {
                        case glu::PRECISION_LOWP:               return 8;
+                       case glu::PRECISION_LAST:
                        case glu::PRECISION_MEDIUMP:    return 16;
                        case glu::PRECISION_HIGHP:              return 32;
                        default:
@@ -4081,15 +5340,17 @@ template <>
 class DefaultSampling<float> : public Sampling<float>
 {
 public:
-       float   genRandom       (const FloatFormat& format, Precision prec, Random& rnd) const;
-       void    genFixeds       (const FloatFormat& format, vector<float>& dst) const;
-       double  getWeight       (void) const { return 1.0; }
+       float   genRandom                       (const FloatFormat& format, const Precision prec, Random& rnd, const Interval& inputRange)                      const;
+       void    genFixeds                       (const FloatFormat& format, const Precision prec, vector<float>& dst, const Interval& inputRange)       const;
+       void    removeNotInRange        (vector<float>& dst, const Interval& inputRange, const Precision prec)                                                          const;
+       double  getWeight                       (void) const { return 1.0; }
 };
 
 //! Generate a random float from a reasonable general-purpose distribution.
-float DefaultSampling<float>::genRandom (const FloatFormat& format,
-                                                                                Precision,
-                                                                                Random&                        rnd) const
+float DefaultSampling<float>::genRandom (const FloatFormat&    format,
+                                                                                Precision                      prec,
+                                                                                Random&                        rnd,
+                                                                                const Interval&        inputRange) const
 {
        const int               minExp                  = format.getMinExp();
        const int               maxExp                  = format.getMaxExp();
@@ -4105,32 +5366,166 @@ float DefaultSampling<float>::genRandom (const FloatFormat& format,
        float                   base                    = 0.0f; // integral power of two
        float                   quantum                 = 0.0f; // smallest representable difference in the binade
        float                   significand             = 0.0f; // Significand.
-
+       float                   value                   = -1.0f;
        DE_ASSERT(fractionBits < std::numeric_limits<float>::digits);
 
        // Generate some occasional special numbers
        switch (rnd.getInt(0, 64))
        {
-               case 0:         return 0;
-               case 1:         return TCU_INFINITY;
-               case 2:         return -TCU_INFINITY;
-               case 3:         return TCU_NAN;
+               case 0:         value = inputRange.contains(0) ? 0 : static_cast<float>(inputRange.midpoint()); break;
+               case 1:         value = inputRange.contains(TCU_INFINITY) ? TCU_INFINITY : static_cast<float>(inputRange.midpoint()); break;
+               case 2:         value = inputRange.contains(-TCU_INFINITY) ? -TCU_INFINITY : static_cast<float>(inputRange.midpoint()); break;
+               case 3:         value = inputRange.contains(TCU_NAN) ? TCU_NAN : static_cast<float>(inputRange.midpoint()); break;
                default:        break;
        }
 
-       if (exp >= minExp)
+       if(value != -1.0f)
        {
                // Normal number
                base = deFloatLdExp(1.0f, exp);
                quantum = deFloatLdExp(1.0f, exp - fractionBits);
+
+               switch (rnd.getInt(0, 16))
+               {
+                       case 0: // The highest number in this binade, significand is all bits one.
+                               significand = base - quantum;
+                               break;
+                       case 1: // Significand is one.
+                               significand = quantum;
+                               break;
+                       case 2: // Significand is zero.
+                               significand = 0.0;
+                               break;
+                       default: // Random (evenly distributed) significand.
+                       {
+                               deUint64 intFraction = rnd.getUint64() & ((1 << fractionBits) - 1);
+                               significand = float(intFraction) * quantum;
+                       }
+               }
+
+               // Produce positive numbers more often than negative.
+               value = (rnd.getInt(0, 3) == 0 ? -1.0f : 1.0f) * (base + significand);
        }
-       else
+
+       value = inputRange.contains(static_cast<double>(value)) ? value : static_cast<float>(inputRange.midpoint());
+
+       //not denormalized values
+       {
+               DE_ASSERT(sizeof(float) == sizeof(deUint32));
+
+               const deUint32 mantissa = 0x007fffff;
+               const deUint32 exponent = 0x7f800000;
+               deUint32 valueInt               = 0u;
+               deMemcpy(&valueInt, &value, sizeof(deUint32));
+
+               if((exponent & valueInt) == 0 && (mantissa & valueInt) != 0)
+               {
+                       deUint32 toReturn = 0x00800000 | valueInt;
+                       deMemcpy(&value, &toReturn, sizeof(float));
+               }
+
+               //Remove denormalized for 16bit float
+               if (glu::PRECISION_LAST == prec && (1.0 - deAbs(static_cast<double>(value)) >= 0.999939))
+                       value = value + 1.0099f;
+       }
+       return value;
+}
+
+//! Generate a standard set of floats that should always be tested.
+void DefaultSampling<float>::genFixeds (const FloatFormat& format, const Precision prec, vector<float>& dst, const Interval& inputRange) const
+{
+       const int                       minExp                  = format.getMinExp();
+       const int                       maxExp                  = format.getMaxExp();
+       const int                       fractionBits    = format.getFractionBits();
+       const float                     minQuantum              = deFloatLdExp(1.0f, minExp - fractionBits);
+       const float                     minNormalized   = deFloatLdExp(1.0f, minExp);
+       const float                     maxQuantum              = deFloatLdExp(1.0f, maxExp - fractionBits);
+
+       // NaN
+       dst.push_back(TCU_NAN);
+       // Zero
+       dst.push_back(0.0f);
+
+       for (int sign = -1; sign <= 1; sign += 2)
+       {
+               // Smallest normalized
+               dst.push_back((float)sign * minNormalized);
+
+               // Next smallest normalized
+               dst.push_back((float)sign * (minNormalized + minQuantum));
+
+               dst.push_back((float)sign * 0.5f);
+               dst.push_back((float)sign * 1.0f);
+               dst.push_back((float)sign * 2.0f);
+
+               // Largest number
+               dst.push_back((float)sign * (deFloatLdExp(1.0f, maxExp) +
+                                                                       (deFloatLdExp(1.0f, maxExp) - maxQuantum)));
+
+               dst.push_back((float)sign * TCU_INFINITY);
+       }
+       removeNotInRange(dst, inputRange, prec);
+}
+
+void DefaultSampling<float>::removeNotInRange (vector<float>& dst, const Interval& inputRange, const Precision prec) const
+{
+       for (vector<float>::iterator it = dst.begin(); it < dst.end();)
+       {
+               if ( !inputRange.contains(static_cast<double>(*it)) || (glu::PRECISION_LAST == prec && (1.0 - deAbs(static_cast<double>(*it)) >= 0.999939)))
+                       it = dst.erase(it);
+               else
+                       ++it;
+       }
+}
+
+template <>
+class DefaultSampling<deFloat16> : public Sampling<deFloat16>
+{
+public:
+       deFloat16       genRandom                       (const FloatFormat& format, const Precision prec, Random& rnd, const Interval& inputRange) const;
+       void            genFixeds                       (const FloatFormat& format, const Precision prec, vector<deFloat16>& dst, const Interval& inputRange) const;
+       double          getWeight                       (void) const { return 1.0; }
+private:
+       void            removeNotInRange(vector<deFloat16>& dst, const Interval& inputRange, const Precision prec) const;
+};
+
+//! Generate a random float from a reasonable general-purpose distribution.
+deFloat16 DefaultSampling<deFloat16>::genRandom (const FloatFormat& format, const Precision prec,
+                                                                                               Random& rnd, const Interval& inputRange) const
+{
+       DE_UNREF(prec);
+       const int               minExp                  = format.getMinExp();
+       const int               maxExp                  = format.getMaxExp();
+       const bool              haveSubnormal   = format.hasSubnormal() != tcu::NO;
+       const deUint16  midpoint                = deFloat32To16Round(static_cast<float>(inputRange.midpoint()), DE_ROUNDINGMODE_TO_NEAREST_EVEN);
+
+       // Choose exponent so that the cumulative distribution is cubic.
+       // This makes the probability distribution quadratic, with the peak centered on zero.
+       const double    minRoot                 = deCbrt(minExp - 0.5 - (haveSubnormal ? 1.0 : 0.0));
+       const double    maxRoot                 = deCbrt(maxExp + 0.5);
+       const int               fractionBits    = format.getFractionBits();
+       const int               exp                             = int(deRoundEven(dePow(rnd.getDouble(minRoot, maxRoot),
+                                                                                                                       3.0)));
+       float                   base                    = 0.0f; // integral power of two
+       float                   quantum                 = 0.0f; // smallest representable difference in the binade
+       float                   significand             = 0.0f; // Significand.
+
+       DE_ASSERT(fractionBits < std::numeric_limits<float>::digits);
+
+       // Generate some occasional special numbers
+       switch (rnd.getInt(0, 64))
        {
-               // Subnormal
-               base = 0.0f;
-               quantum = deFloatLdExp(1.0f, minExp - fractionBits);
+               case 0:         return inputRange.contains(static_cast<double>(deFloat16To32(0))) ? 0 : midpoint;
+               case 1:         return inputRange.contains(static_cast<double>(deFloat16To32(deUint16(0x7c00)))) ? deUint16(0x7c00) : midpoint; //INFINITY
+               case 2:         return inputRange.contains(static_cast<double>(deFloat16To32(deUint16(0xfcf0)))) ? deUint16(0xfcf0) : midpoint; //INFINITY
+               case 3:         return inputRange.contains(static_cast<double>(deFloat16To32(deUint16(0xfc0f)))) ? deUint16(0xfc0f) : midpoint; //NaN
+               default:        break;
        }
 
+       // Normal number
+       base = deFloatLdExp(1.0f, exp);
+       quantum = deFloatLdExp(1.0f, exp - fractionBits);
+
        switch (rnd.getInt(0, 16))
        {
                case 0: // The highest number in this binade, significand is all bits one.
@@ -4145,17 +5540,51 @@ float DefaultSampling<float>::genRandom (const FloatFormat& format,
                default: // Random (evenly distributed) significand.
                {
                        deUint64 intFraction = rnd.getUint64() & ((1 << fractionBits) - 1);
-                       significand = float(intFraction) * quantum;
+                       significand = deFloat16(intFraction) * quantum;
                }
        }
 
        // Produce positive numbers more often than negative.
-       return (rnd.getInt(0,3) == 0 ? -1.0f : 1.0f) * (base + significand);
+       float value                     = (rnd.getInt(0, 3) == 0 ? -1.0f : 1.0f) * (base + significand);
+       deFloat16 value16b      = deFloat32To16Round(value, DE_ROUNDINGMODE_TO_NEAREST_EVEN);
+
+       //not denormalized values
+       {
+               const deUint16 mantissa = 0x03FF;
+               const deUint16 exponent = 0x7C00;
+               if ((exponent & value16b) == 0 && (mantissa & value16b) != 0)
+               {
+                       value16b = 0x4000 | value16b;
+               }
+       }
+       return inputRange.contains(static_cast<double>(value16b)) ? value16b : midpoint;
 }
 
 //! Generate a standard set of floats that should always be tested.
-void DefaultSampling<float>::genFixeds (const FloatFormat& format, vector<float>& dst) const
+void DefaultSampling<deFloat16>::genFixeds (const FloatFormat& format, const Precision prec, vector<deFloat16>& dst, const Interval& inputRange) const
 {
+       dst.push_back(deUint16(0x3E00)); //1.5
+       dst.push_back(deUint16(0x3D00)); //1.25
+       dst.push_back(deUint16(0x3F00)); //1.75
+       // Zero
+       dst.push_back(deUint16(0x0000));
+       dst.push_back(deUint16(0x8000));
+       // Infinity
+       dst.push_back(deUint16(0x7c00));
+       dst.push_back(deUint16(0xfc00));
+       // SNaN
+       dst.push_back(deUint16(0x7c0f));
+       dst.push_back(deUint16(0xfc0f));
+       // QNaN
+       dst.push_back(deUint16(0x7cf0));
+       dst.push_back(deUint16(0xfcf0));
+       // Normalized
+       dst.push_back(deUint16(0x0401));
+       dst.push_back(deUint16(0x8401));
+       // Some normal number
+       dst.push_back(deUint16(0x14cb));
+       dst.push_back(deUint16(0x94cb));
+
        const int                       minExp                  = format.getMinExp();
        const int                       maxExp                  = format.getMaxExp();
        const int                       fractionBits    = format.getFractionBits();
@@ -4163,34 +5592,35 @@ void DefaultSampling<float>::genFixeds (const FloatFormat& format, vector<float>
        const float                     minNormalized   = deFloatLdExp(1.0f, minExp);
        const float                     maxQuantum              = deFloatLdExp(1.0f, maxExp - fractionBits);
 
-       // NaN
-       dst.push_back(TCU_NAN);
-       // Zero
-       dst.push_back(0.0f);
-
-       for (int sign = -1; sign <= 1; sign += 2)
+       for (float sign = -1.0; sign <= 1.0f; sign += 2.0f)
        {
-               // Smallest subnormal
-               dst.push_back((float)sign * minQuantum);
-
-               // Largest subnormal
-               dst.push_back((float)sign * (minNormalized - minQuantum));
-
                // Smallest normalized
-               dst.push_back((float)sign * minNormalized);
+               dst.push_back(deFloat32To16Round(sign * minNormalized, DE_ROUNDINGMODE_TO_NEAREST_EVEN));
 
                // Next smallest normalized
-               dst.push_back((float)sign * (minNormalized + minQuantum));
+               dst.push_back(deFloat32To16Round(sign * (minNormalized + minQuantum), DE_ROUNDINGMODE_TO_NEAREST_EVEN));
 
-               dst.push_back((float)sign * 0.5f);
-               dst.push_back((float)sign * 1.0f);
-               dst.push_back((float)sign * 2.0f);
+               dst.push_back(deFloat32To16Round(sign * 0.5f, DE_ROUNDINGMODE_TO_NEAREST_EVEN));
+               dst.push_back(deFloat32To16Round(sign * 1.0f, DE_ROUNDINGMODE_TO_NEAREST_EVEN));
+               dst.push_back(deFloat32To16Round(sign * 2.0f, DE_ROUNDINGMODE_TO_NEAREST_EVEN));
 
                // Largest number
-               dst.push_back((float)sign * (deFloatLdExp(1.0f, maxExp) +
-                                                                       (deFloatLdExp(1.0f, maxExp) - maxQuantum)));
+               dst.push_back(deFloat32To16Round(sign * (deFloatLdExp(1.0f, maxExp) +
+                                                                       (deFloatLdExp(1.0f, maxExp) - maxQuantum)), DE_ROUNDINGMODE_TO_NEAREST_EVEN));
 
-               dst.push_back((float)sign * TCU_INFINITY);
+               dst.push_back(deFloat32To16Round(sign * TCU_INFINITY, DE_ROUNDINGMODE_TO_NEAREST_EVEN));
+       }
+       removeNotInRange(dst, inputRange, prec);
+}
+
+void DefaultSampling<deFloat16>::removeNotInRange(vector<deFloat16>& dst, const Interval& inputRange, const Precision) const
+{
+       for (vector<deFloat16>::iterator it = dst.begin(); it < dst.end();)
+       {
+               if (inputRange.contains(static_cast<double>(*it)))
+                       ++it;
+               else
+                       it = dst.erase(it);
        }
 }
 
@@ -4200,21 +5630,21 @@ class DefaultSampling<Vector<T, Size> > : public Sampling<Vector<T, Size> >
 public:
        typedef Vector<T, Size>         Value;
 
-       Value   genRandom       (const FloatFormat& fmt, Precision prec, Random& rnd) const
+       Value   genRandom       (const FloatFormat& fmt, const Precision prec, Random& rnd, const Interval& inputRange) const
        {
                Value ret;
 
                for (int ndx = 0; ndx < Size; ++ndx)
-                       ret[ndx] = instance<DefaultSampling<T> >().genRandom(fmt, prec, rnd);
+                       ret[ndx] = instance<DefaultSampling<T> >().genRandom(fmt, prec, rnd, inputRange);
 
                return ret;
        }
 
-       void    genFixeds       (const FloatFormat& fmt, vector<Value>& dst) const
+       void    genFixeds       (const FloatFormat& fmt, const Precision prec, vector<Value>& dst, const Interval& inputRange) const
        {
                vector<T> scalars;
 
-               instance<DefaultSampling<T> >().genFixeds(fmt, scalars);
+               instance<DefaultSampling<T> >().genFixeds(fmt, prec, scalars, inputRange);
 
                for (size_t scalarNdx = 0; scalarNdx < scalars.size(); ++scalarNdx)
                        dst.push_back(Value(scalars[scalarNdx]));
@@ -4232,35 +5662,35 @@ class DefaultSampling<Matrix<T, Rows, Columns> > : public Sampling<Matrix<T, Row
 public:
        typedef Matrix<T, Rows, Columns>                Value;
 
-       Value   genRandom       (const FloatFormat& fmt, Precision prec, Random& rnd) const
+       Value   genRandom       (const FloatFormat& fmt, const Precision prec, Random& rnd, const Interval& inputRange) const
        {
                Value ret;
 
                for (int rowNdx = 0; rowNdx < Rows; ++rowNdx)
                        for (int colNdx = 0; colNdx < Columns; ++colNdx)
-                               ret(rowNdx, colNdx) = instance<DefaultSampling<T> >().genRandom(fmt, prec, rnd);
+                               ret(rowNdx, colNdx) = instance<DefaultSampling<T> >().genRandom(fmt, prec, rnd, inputRange);
 
                return ret;
        }
 
-       void    genFixeds       (const FloatFormat& fmt, vector<Value>& dst) const
+       void    genFixeds       (const FloatFormat& fmt, const Precision prec, vector<Value>& dst, const Interval& inputRange) const
        {
                vector<T> scalars;
 
-               instance<DefaultSampling<T> >().genFixeds(fmt, scalars);
+               instance<DefaultSampling<T> >().genFixeds(fmt, prec, scalars, inputRange);
 
                for (size_t scalarNdx = 0; scalarNdx < scalars.size(); ++scalarNdx)
                        dst.push_back(Value(scalars[scalarNdx]));
 
                if (Columns == Rows)
                {
-                       Value   mat     (0.0);
+                       Value   mat     (T(0.0));
                        T               x       = T(1.0f);
                        mat[0][0] = x;
                        for (int ndx = 0; ndx < Columns; ++ndx)
                        {
                                mat[Columns-1-ndx][ndx] = x;
-                               x *= T(2.0f);
+                               x = static_cast<T>(x * static_cast<T>(2.0f));
                        }
                        dst.push_back(mat);
                }
@@ -4274,28 +5704,37 @@ public:
 
 struct CaseContext
 {
-                                       CaseContext             (const string&          name_,
-                                                                        TestContext&           testContext_,
-                                                                        const FloatFormat&     floatFormat_,
-                                                                        const FloatFormat&     highpFormat_,
-                                                                        Precision                      precision_,
-                                                                        ShaderType                     shaderType_,
-                                                                        size_t                         numRandoms_)
-                                               : name                          (name_)
-                                               , testContext           (testContext_)
-                                               , floatFormat           (floatFormat_)
-                                               , highpFormat           (highpFormat_)
-                                               , precision                     (precision_)
-                                               , shaderType            (shaderType_)
-                                               , numRandoms            (numRandoms_) {}
-
-       string                  name;
-       TestContext&    testContext;
-       FloatFormat             floatFormat;
-       FloatFormat             highpFormat;
-       Precision               precision;
-       ShaderType              shaderType;
-       size_t                  numRandoms;
+                                       CaseContext             (const string&                                                  name_,
+                                                                        TestContext&                                                   testContext_,
+                                                                        const FloatFormat&                                             floatFormat_,
+                                                                        const FloatFormat&                                             highpFormat_,
+                                                                        const Precision                                                precision_,
+                                                                        const ShaderType                                               shaderType_,
+                                                                        const size_t                                                   numRandoms_,
+                                                                        const Extension16BitStorageFeatures    extension16BitStorage_ = EXT16BITSTORAGEFEATURES_NO_EXTENSION,
+                                                                        const bool                                                             isPackFloat16b_ = false)
+                                               : name                                          (name_)
+                                               , testContext                           (testContext_)
+                                               , floatFormat                           (floatFormat_)
+                                               , highpFormat                           (highpFormat_)
+                                               , precision                                     (precision_)
+                                               , shaderType                            (shaderType_)
+                                               , numRandoms                            (numRandoms_)
+                                               , inputRange                            (-TCU_INFINITY, TCU_INFINITY)
+                                               , extension16BitStorage         (extension16BitStorage_)
+                                               , isPackFloat16b                        (isPackFloat16b_)
+                                       {}
+
+       string                                                  name;
+       TestContext&                                    testContext;
+       FloatFormat                                             floatFormat;
+       FloatFormat                                             highpFormat;
+       Precision                                               precision;
+       ShaderType                                              shaderType;
+       size_t                                                  numRandoms;
+       Interval                                                inputRange;
+       Extension16BitStorageFeatures   extension16BitStorage;
+       bool                                                    isPackFloat16b;
 };
 
 template<typename In0_ = Void, typename In1_ = Void, typename In2_ = Void, typename In3_ = Void>
@@ -4424,7 +5863,8 @@ tcu::TestStatus BuiltinPrecisionCaseTestInstance<In, Out>::iterate (void)
        typedef typename        Out::Out0       Out0;
        typedef typename        Out::Out1       Out1;
 
-       Inputs<In>                      inputs          = generateInputs(m_samplings, m_caseCtx.floatFormat, m_caseCtx.precision, m_caseCtx.numRandoms, 0xdeadbeefu + m_caseCtx.testContext.getCommandLine().getBaseSeed());
+       areFeaturesSupported(m_context, m_caseCtx.extension16BitStorage);
+       Inputs<In>                      inputs          = generateInputs(m_samplings, m_caseCtx.floatFormat, m_caseCtx.precision, m_caseCtx.numRandoms, 0xdeadbeefu + m_caseCtx.testContext.getCommandLine().getBaseSeed(), m_caseCtx.inputRange);
        const FloatFormat&      fmt                     = m_caseCtx.floatFormat;
        const int                       inCount         = numInputs<In>();
        const int                       outCount        = numOutputs<Out>();
@@ -4461,7 +5901,6 @@ tcu::TestStatus BuiltinPrecisionCaseTestInstance<In, Out>::iterate (void)
                        testLog << TestLog::Message << "Reference definitions:\n" << oss.str()
                                  << TestLog::EndMessage;
        }
-
        switch (inCount)
        {
                case 4:
@@ -4503,7 +5942,8 @@ tcu::TestStatus BuiltinPrecisionCaseTestInstance<In, Out>::iterate (void)
        // shader output to the reference.
        for (size_t valueNdx = 0; valueNdx < numValues; valueNdx++)
        {
-               bool                                            result          = true;
+               bool                                            result                  = true;
+               const bool                                      isInput16Bit    = m_executor->areInputs16Bit();
                typename Traits<Out0>::IVal     reference0;
                typename Traits<Out1>::IVal     reference1;
 
@@ -4516,27 +5956,30 @@ tcu::TestStatus BuiltinPrecisionCaseTestInstance<In, Out>::iterate (void)
                env.lookup(*m_variables.in3) = convert<In3>(fmt, round(fmt, inputs.in3[valueNdx]));
 
                {
-                       EvalContext     ctx (fmt, m_caseCtx.precision, env);
+                       EvalContext     ctx (fmt, m_caseCtx.precision, env, 0, m_context.getFloat16Int8Features().shaderFloat16 != 0u);
                        m_stmt->execute(ctx);
-               }
 
                switch (outCount)
                {
                        case 2:
                                reference1 = convert<Out1>(highpFmt, env.lookup(*m_variables.out1));
-                               if (!status.check(contains(reference1, outputs.out1[valueNdx]),
-                                                                       "Shader output 1 is outside acceptable range"))
+                               if (!status.check(contains(reference1, outputs.out1[valueNdx], m_caseCtx.isPackFloat16b), "Shader output 1 is outside acceptable range"))
                                        result = false;
                        // Fallthrough
                        case 1:
                                reference0 = convert<Out0>(highpFmt, env.lookup(*m_variables.out0));
-                               if (!status.check(contains(reference0, outputs.out0[valueNdx]),
-                                                                       "Shader output 0 is outside acceptable range"))
-                                       result = false;
+                               if (!status.check(contains(reference0, outputs.out0[valueNdx], m_caseCtx.isPackFloat16b), "Shader output 0 is outside acceptable range"))
+                               {
+                                       m_stmt->failed(ctx);
+                                       reference0 = convert<Out0>(highpFmt, env.lookup(*m_variables.out0));
+                                       if (!status.check(contains(reference0, outputs.out0[valueNdx], m_caseCtx.isPackFloat16b), "Shader output 0 is outside acceptable range"))
+                                               result = false;
+                               }
                        // Fallthrough
                        default: break;
                }
 
+               }
                if (!result)
                        ++numErrors;
 
@@ -4549,39 +5992,49 @@ tcu::TestStatus BuiltinPrecisionCaseTestInstance<In, Out>::iterate (void)
                        if (inCount > 0)
                        {
                                builder << "\t" << m_variables.in0->getName() << " = "
-                                               << valueToString(highpFmt, inputs.in0[valueNdx]) << "\n";
+                                               << (isInput16Bit ? value16ToString(highpFmt, inputs.in0[valueNdx]) : value32ToString(highpFmt, inputs.in0[valueNdx])) << "\n";
                        }
 
                        if (inCount > 1)
                        {
                                builder << "\t" << m_variables.in1->getName() << " = "
-                                               << valueToString(highpFmt, inputs.in1[valueNdx]) << "\n";
+                                               << (isInput16Bit ? value16ToString(highpFmt, inputs.in1[valueNdx]) : value32ToString(highpFmt, inputs.in1[valueNdx])) << "\n";
                        }
 
                        if (inCount > 2)
                        {
                                builder << "\t" << m_variables.in2->getName() << " = "
-                                               << valueToString(highpFmt, inputs.in2[valueNdx]) << "\n";
+                                               << (isInput16Bit ? value16ToString(highpFmt, inputs.in2[valueNdx]) : value32ToString(highpFmt, inputs.in2[valueNdx])) << "\n";
                        }
 
                        if (inCount > 3)
                        {
                                builder << "\t" << m_variables.in3->getName() << " = "
-                                               << valueToString(highpFmt, inputs.in3[valueNdx]) << "\n";
+                                               << (isInput16Bit ? value16ToString(highpFmt, inputs.in3[valueNdx]) : value32ToString(highpFmt, inputs.in3[valueNdx])) << "\n";
                        }
 
                        if (outCount > 0)
                        {
-                               builder << "\t" << m_variables.out0->getName() << " = "
-                                               << valueToString(highpFmt, outputs.out0[valueNdx]) << "\n"
+                               if (m_executor->isSpirVShader())
+                               {
+                                       builder << "Output:\n"
+                                                       << comparisonMessage(outputs.out0[valueNdx])
+                                                       << "Expected result:\n"
+                                                       << comparisonMessageInterval<typename Out::Out0>(reference0) << "\n";
+                               }
+                               else
+                               {
+                                       builder << "\t" << m_variables.out0->getName() << " = "
+                                               << (m_executor->isOutput16Bit(0u) || m_caseCtx.isPackFloat16b ? value16ToString(highpFmt, outputs.out0[valueNdx]) : value32ToString(highpFmt, outputs.out0[valueNdx])) << "\n"
                                                << "\tExpected range: "
                                                << intervalToString<typename Out::Out0>(highpFmt, reference0) << "\n";
+                               }
                        }
 
                        if (outCount > 1)
                        {
                                builder << "\t" << m_variables.out1->getName() << " = "
-                                               << valueToString(highpFmt, outputs.out1[valueNdx]) << "\n"
+                                               << (m_executor->isOutput16Bit(1u) || m_caseCtx.isPackFloat16b ? value16ToString(highpFmt, outputs.out1[valueNdx]) : value32ToString(highpFmt, outputs.out1[valueNdx])) << "\n"
                                                << "\tExpected range: "
                                                << intervalToString<typename Out::Out1>(highpFmt, reference1) << "\n";
                        }
@@ -4617,11 +6070,13 @@ tcu::TestStatus BuiltinPrecisionCaseTestInstance<In, Out>::iterate (void)
 class PrecisionCase : public TestCase
 {
 protected:
-                                               PrecisionCase   (const CaseContext& context, const string& name, const string& extension = "")
+                                               PrecisionCase   (const CaseContext& context, const string& name, const Interval& inputRange, const string& extension = "")
                                                        : TestCase              (context.testContext, name.c_str(), name.c_str())
                                                        , m_ctx                 (context)
                                                        , m_extension   (extension)
                                                        {
+                                                               m_ctx.inputRange = inputRange;
+                                                               m_spec.packFloat16Bit = context.isPackFloat16b;
                                                        }
 
        virtual void            initPrograms    (vk::SourceCollections& programCollection) const
@@ -4653,6 +6108,7 @@ void PrecisionCase::testStatement (const Variables<In, Out>& variables, const St
        Environment             env;            // Hoisted out of the inner loop for optimization.
 
        // Initialize ShaderSpec from precision, variables and statement.
+       if (m_ctx.precision != glu::PRECISION_LAST)
        {
                ostringstream os;
                os << "precision " << glu::getPrecisionName(m_ctx.precision) << " float;\n";
@@ -4682,6 +6138,13 @@ void PrecisionCase::testStatement (const Variables<In, Out>& variables, const St
                        break;
        }
 
+       bool inputs16Bit = false;
+       for (vector<Symbol>::const_iterator symIter = m_spec.inputs.begin(); symIter != m_spec.inputs.end(); ++symIter)
+               inputs16Bit = inputs16Bit || glu::isDataTypeFloat16OrVec(symIter->varType.getBasicType());
+
+       if (inputs16Bit || m_spec.packFloat16Bit) //TODO GL_KHR_shader_explicit_arithmetic_types spirv/glsl tools need to be updated  [24.05.2018 A.Sarwa]
+               m_spec.globalDeclarations += "#extension GL_KHX_shader_explicit_arithmetic_types: require\n";
+
        m_spec.outputs.resize(outCount);
 
        switch (outCount)
@@ -4697,6 +6160,7 @@ void PrecisionCase::testStatement (const Variables<In, Out>& variables, const St
        }
 
        m_spec.source = de::toString(stmt);
+       m_spec.spirVShader = isInteger<typename Out::Out0>();
 }
 
 template <typename T>
@@ -4798,21 +6262,22 @@ struct InputLess<InTuple<In> >
 };
 
 template<typename In>
-Inputs<In> generateInputs (const Samplings<In>&        samplings,
-                                                  const FloatFormat&   floatFormat,
-                                                  Precision                    intPrecision,
-                                                  size_t                               numSamples,
-                                                  deUint32                             seed)
+Inputs<In> generateInputs (const Samplings<In>&                samplings,
+                                                  const FloatFormat&           floatFormat,
+                                                  Precision                            intPrecision,
+                                                  size_t                                       numSamples,
+                                                  deUint32                                     seed,
+                                                  const Interval&                      inputRange)
 {
        Random                                                                          rnd(seed);
        Inputs<In>                                                                      ret;
        Inputs<In>                                                                      fixedInputs;
        set<InTuple<In>, InputLess<InTuple<In> > >      seenInputs;
 
-       samplings.in0.genFixeds(floatFormat, fixedInputs.in0);
-       samplings.in1.genFixeds(floatFormat, fixedInputs.in1);
-       samplings.in2.genFixeds(floatFormat, fixedInputs.in2);
-       samplings.in3.genFixeds(floatFormat, fixedInputs.in3);
+       samplings.in0.genFixeds(floatFormat, intPrecision, fixedInputs.in0, inputRange);
+       samplings.in1.genFixeds(floatFormat, intPrecision, fixedInputs.in1, inputRange);
+       samplings.in2.genFixeds(floatFormat, intPrecision, fixedInputs.in2, inputRange);
+       samplings.in3.genFixeds(floatFormat, intPrecision, fixedInputs.in3, inputRange);
 
        for (size_t ndx0 = 0; ndx0 < fixedInputs.in0.size(); ++ndx0)
        {
@@ -4839,10 +6304,10 @@ Inputs<In> generateInputs (const Samplings<In>& samplings,
 
        for (size_t ndx = 0; ndx < numSamples; ++ndx)
        {
-               const typename In::In0  in0             = samplings.in0.genRandom(floatFormat, intPrecision, rnd);
-               const typename In::In1  in1             = samplings.in1.genRandom(floatFormat, intPrecision, rnd);
-               const typename In::In2  in2             = samplings.in2.genRandom(floatFormat, intPrecision, rnd);
-               const typename In::In3  in3             = samplings.in3.genRandom(floatFormat, intPrecision, rnd);
+               const typename In::In0  in0             = samplings.in0.genRandom(floatFormat, intPrecision, rnd, inputRange);
+               const typename In::In1  in1             = samplings.in1.genRandom(floatFormat, intPrecision, rnd, inputRange);
+               const typename In::In2  in2             = samplings.in2.genRandom(floatFormat, intPrecision, rnd, inputRange);
+               const typename In::In3  in3             = samplings.in3.genRandom(floatFormat, intPrecision, rnd, inputRange);
                const InTuple<In>               tuple   (in0, in1, in2, in3);
 
                if (de::contains(seenInputs, tuple))
@@ -4862,7 +6327,7 @@ class FuncCaseBase : public PrecisionCase
 {
 protected:
                                FuncCaseBase    (const CaseContext& context, const string& name, const FuncBase& func)
-                                                                       : PrecisionCase (context, name, func.getRequiredExtension())
+                                                                       : PrecisionCase (context, name, func.getInputRange(context.precision == glu::PRECISION_LAST || context.isPackFloat16b), func.getRequiredExtension())
                                                                {
                                                                }
 
@@ -4963,7 +6428,6 @@ private:
 template <typename Sig>
 void InOutFuncCase<Sig>::buildTest (void)
 {
-
        m_variables.out0        = variable<Ret>("out0");
        m_variables.out1        = variable<Arg1>("out1");
        m_variables.in0         = variable<Arg0>("in0");
@@ -5040,7 +6504,7 @@ private:
        string                          m_name;
 };
 
-template <template <int> class GenF>
+template <template <int, class T> class GenF>
 class TemplateFuncCaseFactory : public FuncCaseFactory
 {
 public:
@@ -5048,15 +6512,34 @@ public:
        {
                TestCaseGroup*  group = new TestCaseGroup(ctx.testContext, ctx.name.c_str(), ctx.name.c_str());
 
-               group->addChild(createFuncCase(ctx, "scalar", instance<GenF<1> >()));
-               group->addChild(createFuncCase(ctx, "vec2", instance<GenF<2> >()));
-               group->addChild(createFuncCase(ctx, "vec3", instance<GenF<3> >()));
-               group->addChild(createFuncCase(ctx, "vec4", instance<GenF<4> >()));
+               group->addChild(createFuncCase(ctx, "scalar", instance<GenF<1, float> >()));
+               group->addChild(createFuncCase(ctx, "vec2", instance<GenF<2, float> >()));
+               group->addChild(createFuncCase(ctx, "vec3", instance<GenF<3, float> >()));
+               group->addChild(createFuncCase(ctx, "vec4", instance<GenF<4, float> >()));
+
+               return MovePtr<TestNode>(group);
+       }
+
+       const FuncBase&         getFunc                 (void) const { return instance<GenF<1, float> >(); }
+};
+
+template <template <int, class T> class GenF>
+class TemplateFuncCaseFactory16Bit : public FuncCaseFactory
+{
+public:
+       MovePtr<TestNode>       createCase              (const CaseContext& ctx) const
+       {
+               TestCaseGroup*  group = new TestCaseGroup(ctx.testContext, ctx.name.c_str(), ctx.name.c_str());
+
+               group->addChild(createFuncCase(ctx, "scalar", instance<GenF<1, deFloat16> >()));
+               group->addChild(createFuncCase(ctx, "vec2", instance<GenF<2, deFloat16> >()));
+               group->addChild(createFuncCase(ctx, "vec3", instance<GenF<3, deFloat16> >()));
+               group->addChild(createFuncCase(ctx, "vec4", instance<GenF<4, deFloat16> >()));
 
                return MovePtr<TestNode>(group);
        }
 
-       const FuncBase&         getFunc                 (void) const { return instance<GenF<1> >(); }
+       const FuncBase&         getFunc                 (void) const { return instance<GenF<1, deFloat16> >(); }
 };
 
 template <template <int> class GenF>
@@ -5080,7 +6563,7 @@ public:
        const FuncBase&         getFunc                 (void) const { return instance<GenF<2> >(); }
 };
 
-template <template <int, int> class GenF>
+template <template <int, int, class> class GenF>
 class MatrixFuncCaseFactory : public FuncCaseFactory
 {
 public:
@@ -5088,27 +6571,59 @@ public:
        {
                TestCaseGroup*  const group = new TestCaseGroup(ctx.testContext, ctx.name.c_str(), ctx.name.c_str());
 
-               this->addCase<2, 2>(ctx, group);
-               this->addCase<3, 2>(ctx, group);
-               this->addCase<4, 2>(ctx, group);
-               this->addCase<2, 3>(ctx, group);
-               this->addCase<3, 3>(ctx, group);
-               this->addCase<4, 3>(ctx, group);
-               this->addCase<2, 4>(ctx, group);
-               this->addCase<3, 4>(ctx, group);
-               this->addCase<4, 4>(ctx, group);
+               this->addCase<2, 2, float >(ctx, group);
+               this->addCase<3, 2, float >(ctx, group);
+               this->addCase<4, 2, float >(ctx, group);
+               this->addCase<2, 3, float >(ctx, group);
+               this->addCase<3, 3, float >(ctx, group);
+               this->addCase<4, 3, float >(ctx, group);
+               this->addCase<2, 4, float >(ctx, group);
+               this->addCase<3, 4, float >(ctx, group);
+               this->addCase<4, 4, float >(ctx, group);
+
+               return MovePtr<TestNode>(group);
+       }
+
+       const FuncBase&         getFunc                 (void) const { return instance<GenF<2,2, float> >(); }
+
+private:
+       template <int Rows, int Cols, class T>
+       void                            addCase                 (const CaseContext& ctx, TestCaseGroup* group) const
+       {
+               const char*     const name = dataTypeNameOf<Matrix<float, Rows, Cols> >();
+               group->addChild(createFuncCase(ctx, name, instance<GenF<Rows, Cols, T> >()));
+       }
+};
+
+template <template <int, int, class> class GenF>
+class MatrixFuncCaseFactory16Bit : public FuncCaseFactory
+{
+public:
+       MovePtr<TestNode>       createCase              (const CaseContext& ctx) const
+       {
+               TestCaseGroup*  const group = new TestCaseGroup(ctx.testContext, ctx.name.c_str(), ctx.name.c_str());
+
+               this->addCase<2, 2, deFloat16 >(ctx, group);
+               this->addCase<3, 2, deFloat16 >(ctx, group);
+               this->addCase<4, 2, deFloat16 >(ctx, group);
+               this->addCase<2, 3, deFloat16 >(ctx, group);
+               this->addCase<3, 3, deFloat16 >(ctx, group);
+               this->addCase<4, 3, deFloat16 >(ctx, group);
+               this->addCase<2, 4, deFloat16 >(ctx, group);
+               this->addCase<3, 4, deFloat16 >(ctx, group);
+               this->addCase<4, 4, deFloat16 >(ctx, group);
 
                return MovePtr<TestNode>(group);
        }
 
-       const FuncBase&         getFunc                 (void) const { return instance<GenF<2,2> >(); }
+       const FuncBase&         getFunc                 (void) const { return instance<GenF<2, 2, deFloat16> >(); }
 
 private:
-       template <int Rows, int Cols>
+       template <int Rows, int Cols, class T>
        void                            addCase                 (const CaseContext& ctx, TestCaseGroup* group) const
        {
                const char*     const name = dataTypeNameOf<Matrix<float, Rows, Cols> >();
-               group->addChild(createFuncCase(ctx, name, instance<GenF<Rows, Cols> >()));
+               group->addChild(createFuncCase(ctx, name, instance<GenF<Rows, Cols, T> >()));
        }
 };
 
@@ -5159,7 +6674,7 @@ private:
 };
 
 template <typename F>
-void addScalarFactory(BuiltinFuncs& funcs, string name = "")
+void addScalarFactory (BuiltinFuncs& funcs, string name = "")
 {
        if (name.empty())
                name = instance<F>().getName();
@@ -5167,26 +6682,35 @@ void addScalarFactory(BuiltinFuncs& funcs, string name = "")
        funcs.addFactory(SharedPtr<const CaseFactory>(new GenFuncCaseFactory<typename F::Sig>(makeVectorizedFuncs<F>(), name)));
 }
 
-MovePtr<const CaseFactories> createComputeOnlyBuiltinCases (void)
+MovePtr<const CaseFactories> createComputeOnlyBuiltinCases (bool is16BitTest = false)
 {
        MovePtr<BuiltinFuncs>   funcs   (new BuiltinFuncs());
 
        // Tests for ES3 builtins
-
-       addScalarFactory<Add>(*funcs);
-       addScalarFactory<Sub>(*funcs);
-       addScalarFactory<Mul>(*funcs);
-       addScalarFactory<Div>(*funcs);
+       addScalarFactory<Comparison< Signature<int, float, float> > >(*funcs);
+       addScalarFactory<Add< Signature<float, float, float> > >(*funcs);
+       addScalarFactory<Sub< Signature<float, float, float> > >(*funcs);
+       addScalarFactory<Mul< Signature<float, float, float> > >(*funcs);
+       addScalarFactory<Div< Signature<float, float, float> > >(*funcs);
 
        addScalarFactory<Radians>(*funcs);
        addScalarFactory<Degrees>(*funcs);
-       addScalarFactory<Sin>(*funcs);
-       addScalarFactory<Cos>(*funcs);
+       addScalarFactory<Sin<Signature<float, float> > >(*funcs);
+       addScalarFactory<Cos<Signature<float, float> > >(*funcs);
        addScalarFactory<Tan>(*funcs);
-       addScalarFactory<ASin>(*funcs);
-       addScalarFactory<ACos>(*funcs);
-       addScalarFactory<ATan2>(*funcs, "atan2");
-       addScalarFactory<ATan>(*funcs);
+
+       if (is16BitTest)
+               addScalarFactory<ASin16BitInOut32b>(*funcs);
+       else
+               addScalarFactory<ASin>(*funcs);
+
+       if (is16BitTest)
+               addScalarFactory<ACos16BitInOut32b>(*funcs);
+       else
+               addScalarFactory<ACos>(*funcs);
+
+       addScalarFactory<ATan2< Signature<float, float, float> > >(*funcs, "atan2");
+       addScalarFactory<ATan<Signature<float, float> > >(*funcs);
        addScalarFactory<Sinh>(*funcs);
        addScalarFactory<Cosh>(*funcs);
        addScalarFactory<Tanh>(*funcs);
@@ -5195,29 +6719,41 @@ MovePtr<const CaseFactories> createComputeOnlyBuiltinCases (void)
        addScalarFactory<ATanh>(*funcs);
 
        addScalarFactory<Pow>(*funcs);
-       addScalarFactory<Exp>(*funcs);
-       addScalarFactory<Log>(*funcs);
-       addScalarFactory<Exp2>(*funcs);
-       addScalarFactory<Log2>(*funcs);
+       addScalarFactory<Exp<Signature<float, float> > >(*funcs);
+       addScalarFactory<Log< Signature<float, float> > >(*funcs);
+       addScalarFactory<Exp2<Signature<float, float> > >(*funcs);
+       addScalarFactory<Log2< Signature<float, float> > >(*funcs);
        addScalarFactory<Sqrt>(*funcs);
-       addScalarFactory<InverseSqrt>(*funcs);
-
-       addScalarFactory<Abs>(*funcs);
-       addScalarFactory<Sign>(*funcs);
-       addScalarFactory<Floor>(*funcs);
-       addScalarFactory<Trunc>(*funcs);
-       addScalarFactory<Round>(*funcs);
-       addScalarFactory<RoundEven>(*funcs);
-       addScalarFactory<Ceil>(*funcs);
+       addScalarFactory<InverseSqrt< Signature<float, float> > >(*funcs);
+
+       addScalarFactory<Abs< Signature<float, float> > >(*funcs);
+       addScalarFactory<Sign< Signature<float, float> > >(*funcs);
+       addScalarFactory<Floor32Bit>(*funcs);
+       addScalarFactory<Trunc< Signature<float, float> > >(*funcs);
+       addScalarFactory<Round< Signature<float, float> > >(*funcs);
+       addScalarFactory<RoundEven< Signature<float, float> > >(*funcs);
+       addScalarFactory<Ceil< Signature<float, float> > >(*funcs);
        addScalarFactory<Fract>(*funcs);
-       addScalarFactory<Mod>(*funcs);
-       funcs->addFactory(createSimpleFuncCaseFactory<Modf>());
-       addScalarFactory<Min>(*funcs);
-       addScalarFactory<Max>(*funcs);
-       addScalarFactory<Clamp>(*funcs);
+
+       if (is16BitTest)
+       {
+#ifdef MODULO_OPERATION
+               // \todo Zanin: Test removed for fp16 operations
+               addScalarFactory<Mod>(*funcs);
+#endif
+       }
+       else
+       {
+               addScalarFactory<Mod>(*funcs);
+       }
+
+       funcs->addFactory(createSimpleFuncCaseFactory<Modf32Bit>());
+       addScalarFactory<Min< Signature<float, float, float> > >(*funcs);
+       addScalarFactory<Max< Signature<float, float, float> > >(*funcs);
+       addScalarFactory<Clamp< Signature<float, float, float, float> > >(*funcs);
        addScalarFactory<Mix>(*funcs);
-       addScalarFactory<Step>(*funcs);
-       addScalarFactory<SmoothStep>(*funcs);
+       addScalarFactory<Step< Signature<float, float, float> > >(*funcs);
+       addScalarFactory<SmoothStep< Signature<float, float, float, float> > >(*funcs);
 
        funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory<Length>()));
        funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory<Distance>()));
@@ -5228,7 +6764,6 @@ MovePtr<const CaseFactories> createComputeOnlyBuiltinCases (void)
        funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory<Reflect>()));
        funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory<Refract>()));
 
-
        funcs->addFactory(SharedPtr<const CaseFactory>(new MatrixFuncCaseFactory<MatrixCompMult>()));
        funcs->addFactory(SharedPtr<const CaseFactory>(new MatrixFuncCaseFactory<OuterProduct>()));
        funcs->addFactory(SharedPtr<const CaseFactory>(new MatrixFuncCaseFactory<Transpose>()));
@@ -5238,14 +6773,101 @@ MovePtr<const CaseFactories> createComputeOnlyBuiltinCases (void)
        return MovePtr<const CaseFactories>(funcs.release());
 }
 
+MovePtr<const CaseFactories> createComputeOnlyBuiltinCases16Bit(void)
+{
+       MovePtr<BuiltinFuncs>   funcs(new BuiltinFuncs());
+
+       addScalarFactory<Comparison< Signature<int, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Add< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Sub< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Mul< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Div< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+
+       addScalarFactory<Radians16>(*funcs);
+       addScalarFactory<Degrees16>(*funcs);
+
+       addScalarFactory<Sin<Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Cos<Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Tan16Bit>(*funcs);
+       addScalarFactory<ASin16Bit>(*funcs);
+       addScalarFactory<ACos16Bit>(*funcs);
+       addScalarFactory<ATan2< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs, "atan2");
+       addScalarFactory<ATan<Signature<deFloat16, deFloat16> > >(*funcs);
+
+       addScalarFactory<Sinh16Bit>(*funcs);
+       addScalarFactory<Cosh16Bit>(*funcs);
+       addScalarFactory<Tanh16Bit>(*funcs);
+       addScalarFactory<ASinh16Bit>(*funcs);
+       addScalarFactory<ACosh16Bit>(*funcs);
+       addScalarFactory<ATanh16Bit>(*funcs);
+
+       addScalarFactory<Pow16>(*funcs);
+       addScalarFactory<Exp< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Log< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Exp2< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Log2< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Sqrt16Bit>(*funcs);
+       addScalarFactory<InverseSqrt16Bit>(*funcs);
+
+       addScalarFactory<Abs< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Sign< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Floor16Bit>(*funcs);
+       addScalarFactory<Trunc< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Round< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<RoundEven< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Ceil< Signature<deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Fract16Bit>(*funcs);
+
+#ifdef MODULO_OPERATION
+       // \todo Zanin: Due to this is a disjoint function a special care required for values results near b
+       addScalarFactory<Mod<Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+#endif
+
+       funcs->addFactory(createSimpleFuncCaseFactory<Modf16Bit>());
+       addScalarFactory<Min< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Max< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Clamp< Signature<deFloat16, deFloat16, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<Mix16Bit>(*funcs);
+       addScalarFactory<Step< Signature<deFloat16, deFloat16, deFloat16> > >(*funcs);
+       addScalarFactory<SmoothStep< Signature<deFloat16, deFloat16, deFloat16, deFloat16> > >(*funcs);
+
+       funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory16Bit<Length>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory16Bit<Distance>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory16Bit<Dot>()));
+       funcs->addFactory(createSimpleFuncCaseFactory<Cross16Bit>());
+       funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory16Bit<Normalize>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory16Bit<FaceForward>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory16Bit<Reflect>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new TemplateFuncCaseFactory16Bit<Refract>()));
+
+       funcs->addFactory(SharedPtr<const CaseFactory>(new MatrixFuncCaseFactory16Bit<OuterProduct>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new MatrixFuncCaseFactory16Bit<Transpose>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new SquareMatrixFuncCaseFactory<Determinant16bit>()));
+       funcs->addFactory(SharedPtr<const CaseFactory>(new SquareMatrixFuncCaseFactory<Inverse16bit>()));
+
+       return MovePtr<const CaseFactories>(funcs.release());
+}
+
 MovePtr<const CaseFactories> createCompleteBuiltinCases (void)
 {
        MovePtr<BuiltinFuncs>   funcs   (new BuiltinFuncs());
 
        // Tests for ES31 builtins
-       addScalarFactory<FrExp>(*funcs);
-       addScalarFactory<LdExp>(*funcs);
-       addScalarFactory<Fma>(*funcs);
+       addScalarFactory<FrExp <Signature<float, float, int> > >(*funcs);
+       addScalarFactory<LdExp <Signature<float, float, int> > >(*funcs);
+       addScalarFactory<Fma  <Signature<float, float, float, float> > >(*funcs);
+
+       return MovePtr<const CaseFactories>(funcs.release());
+}
+
+MovePtr<const CaseFactories> createCompleteBuiltinCases16Bit (void)
+{
+       MovePtr<BuiltinFuncs>   funcs   (new BuiltinFuncs());
+
+       // Tests for ES31 builtins
+       addScalarFactory<FrExp <Signature<deFloat16, deFloat16, int> > >(*funcs);
+       addScalarFactory<LdExp <Signature<deFloat16, deFloat16, int> > >(*funcs);
+       addScalarFactory<Fma <Signature<deFloat16, deFloat16, deFloat16, deFloat16> > >(*funcs);
 
        return MovePtr<const CaseFactories>(funcs.release());
 }
@@ -5267,13 +6889,24 @@ struct PrecisionTestContext
                                                                        formats[glu::PRECISION_LOWP]    = &lowp_;
                                                                }
 
+                                                       PrecisionTestContext(TestContext&                               testCtx_,
+                                                                                                const FloatFormat&                     floatFormat,
+                                                                                                const vector<ShaderType>&      shaderTypes_,
+                                                                                                int                                            numRandoms_)
+                                                               : testCtx(testCtx_)
+                                                               , shaderTypes(shaderTypes_)
+                                                               , numRandoms(numRandoms_)
+                                                               {
+                                                                       formats[glu::PRECISION_HIGHP] = formats[glu::PRECISION_LOWP] = formats[glu::PRECISION_MEDIUMP] = &floatFormat;
+                                                               }
+
        TestContext&                    testCtx;
        const FloatFormat*              formats[glu::PRECISION_LAST];
        vector<ShaderType>              shaderTypes;
        int                                             numRandoms;
 };
 
-TestCaseGroup* createFuncGroup (const PrecisionTestContext&    ctx, const CaseFactory& factory)
+TestCaseGroup* createFuncGroup (const PrecisionTestContext& ctx, const CaseFactory& factory)
 {
        TestCaseGroup* const    group   = new TestCaseGroup(ctx.testCtx, factory.getName().c_str(), factory.getDesc().c_str());
 
@@ -5282,16 +6915,14 @@ TestCaseGroup* createFuncGroup (const PrecisionTestContext&     ctx, const CaseFacto
                const Precision         precision       = Precision(precNdx);
                const string            precName        (glu::getPrecisionName(precision));
                const FloatFormat&      fmt                     = *de::getSizedArrayElement<glu::PRECISION_LAST>(ctx.formats, precNdx);
-               const FloatFormat&      highpFmt        = *de::getSizedArrayElement<glu::PRECISION_LAST>(ctx.formats,
-                                                                                                                                                                                glu::PRECISION_HIGHP);
+               const FloatFormat&      highpFmt        = *de::getSizedArrayElement<glu::PRECISION_LAST>(ctx.formats, glu::PRECISION_HIGHP);
 
                for (size_t shaderNdx = 0; shaderNdx < ctx.shaderTypes.size(); ++shaderNdx)
                {
                        const ShaderType        shaderType      = ctx.shaderTypes[shaderNdx];
                        const string            shaderName      (glu::getShaderTypeName(shaderType));
                        const string            name            = precName + "_" + shaderName;
-                       const CaseContext       caseCtx         (name, ctx.testCtx, fmt, highpFmt,
-                                                                                        precision, shaderType, ctx.numRandoms);
+                       const CaseContext       caseCtx         (name, ctx.testCtx, fmt, highpFmt, precision, shaderType, ctx.numRandoms);
 
                        group->addChild(factory.createCase(caseCtx).release());
                }
@@ -5300,6 +6931,40 @@ TestCaseGroup* createFuncGroup (const PrecisionTestContext&      ctx, const CaseFacto
        return group;
 }
 
+TestCaseGroup* createFuncGroup16Bit (const PrecisionTestContext& ctx, const CaseFactory& factory)
+{
+       TestCaseGroup* const    group           = new TestCaseGroup(ctx.testCtx, factory.getName().c_str(), factory.getDesc().c_str());
+       const Precision                 precision       = Precision(glu::PRECISION_LAST);
+       const FloatFormat&              fmt                     = *ctx.formats[0];
+
+       for (size_t shaderNdx = 0; shaderNdx < ctx.shaderTypes.size(); ++shaderNdx)
+       {
+               const  ShaderType                                       shaderType                              = ctx.shaderTypes[shaderNdx];
+               const Extension16BitStorageFeatures     extension16BitStorage   = (glu::SHADERTYPE_COMPUTE == shaderType ? EXT16BITSTORAGEFEATURES_UNIFORM : EXT16BITSTORAGEFEATURES_INPUT_OUTPUT) | EXTSHADER_FLOAT16_INT8;
+               const CaseContext                                       caseCtx                                 (glu::getShaderTypeName(shaderType), ctx.testCtx, fmt, fmt, precision, shaderType, ctx.numRandoms, extension16BitStorage);
+               group->addChild(factory.createCase(caseCtx).release());
+       }
+
+       return group;
+}
+
+TestCaseGroup* createFuncGroup16BitStorage32Bit(const PrecisionTestContext& ctx, const CaseFactory& factory)
+{
+       TestCaseGroup* const    group = new TestCaseGroup(ctx.testCtx, factory.getName().c_str(), factory.getDesc().c_str());
+       const Precision                 precision = Precision(glu::PRECISION_LAST);
+       const FloatFormat&              fmt = *ctx.formats[0];
+
+       for (size_t shaderNdx = 0; shaderNdx < ctx.shaderTypes.size(); ++shaderNdx)
+       {
+               const  ShaderType                                       shaderType = ctx.shaderTypes[shaderNdx];
+               const Extension16BitStorageFeatures     extension16BitStorage = EXTSHADER_FLOAT16_INT8;
+               const CaseContext                                       caseCtx(glu::getShaderTypeName(shaderType), ctx.testCtx, fmt, fmt, precision, shaderType, ctx.numRandoms, extension16BitStorage, true);
+               group->addChild(factory.createCase(caseCtx).release());
+       }
+
+       return group;
+}
+
 void addBuiltinPrecisionTests (TestContext&                                    testCtx,
                                                           const CaseFactories&                 cases,
                                                           const vector<ShaderType>&    shaderTypes,
@@ -5313,17 +6978,32 @@ void addBuiltinPrecisionTests (TestContext&                                     testCtx,
                                                                                                 tcu::YES,              // infinities
                                                                                                 tcu::MAYBE);   // NaN
        // \todo [2014-04-01 lauri] Check these once Khronos bug 11840 is resolved.
-       const FloatFormat                               mediump         (-13, 13, 9, false);
+       FloatFormat                                             mediump         (-13, 13, 9, false, tcu::MAYBE);
        // A fixed-point format is just a floating point format with a fixed
        // exponent and support for subnormals.
-       const FloatFormat                               lowp            (0, 0, 7, false, tcu::YES);
-       const PrecisionTestContext              ctx                     (testCtx, highp, mediump, lowp,
-                                                                                                shaderTypes, numRandoms);
+       FloatFormat                                             lowp            (0, 0, 7, false, tcu::MAYBE);
+       const PrecisionTestContext              ctx                     (testCtx, highp, mediump, lowp, shaderTypes, numRandoms);
 
        for (size_t ndx = 0; ndx < cases.getFactories().size(); ++ndx)
                dstGroup.addChild(createFuncGroup(ctx, *cases.getFactories()[ndx]));
 }
 
+void addBuiltinPrecision16BitTests (TestContext&                               testCtx,
+                                                                       const CaseFactories&            cases,
+                                                                       const vector<ShaderType>&       shaderTypes,
+                                                                       TestCaseGroup&                          dstGroup,
+                                                                       const bool                                      storage32Bit = false)
+{
+       const int                                               userRandoms     = testCtx.getCommandLine().getTestIterationCount();
+       const int                                               defRandoms      = 16384;
+       const int                                               numRandoms      = userRandoms > 0 ? userRandoms : defRandoms;
+       const FloatFormat                               float16         (-14, 15, 10, true, tcu::MAYBE);
+       const PrecisionTestContext              ctx                     (testCtx, float16, shaderTypes, numRandoms);
+
+       for (size_t ndx = 0; ndx < cases.getFactories().size(); ++ndx)
+               dstGroup.addChild((storage32Bit ? createFuncGroup16BitStorage32Bit : createFuncGroup16Bit) (ctx, *cases.getFactories()[ndx]));
+}
+
 BuiltinPrecisionTests::BuiltinPrecisionTests (tcu::TestContext& testCtx)
        : tcu::TestCaseGroup(testCtx, "precision", "Builtin precision tests")
 {
@@ -5357,5 +7037,69 @@ void BuiltinPrecisionTests::init (void)
                                                         *this);
 }
 
+BuiltinPrecision16BitTests::BuiltinPrecision16BitTests (tcu::TestContext& testCtx)
+       : tcu::TestCaseGroup(testCtx, "precision_fp16_storage16b", "Builtin precision tests")
+{
+}
+
+BuiltinPrecision16BitTests::~BuiltinPrecision16BitTests (void)
+{
+}
+
+void BuiltinPrecision16BitTests::init (void)
+{
+       std::vector<glu::ShaderType>            shaderTypes;
+       de::MovePtr<const CaseFactories>        computeOnlyCases        = createComputeOnlyBuiltinCases16Bit();
+       de::MovePtr<const CaseFactories>        completeCases           = createCompleteBuiltinCases16Bit();
+
+       shaderTypes.push_back(glu::SHADERTYPE_COMPUTE);
+
+       addBuiltinPrecision16BitTests(m_testCtx,
+                                                                 *computeOnlyCases,
+                                                                 shaderTypes,
+                                                                 *this);
+
+       shaderTypes.push_back(glu::SHADERTYPE_VERTEX);
+       shaderTypes.push_back(glu::SHADERTYPE_FRAGMENT);
+
+       addBuiltinPrecision16BitTests(m_testCtx,
+                                                                 *completeCases,
+                                                                 shaderTypes,
+                                                                 *this);
+}
+
+BuiltinPrecision16Storage32BitTests::BuiltinPrecision16Storage32BitTests(tcu::TestContext& testCtx)
+       : tcu::TestCaseGroup(testCtx, "precision_fp16_storage32b", "Builtin precision tests")
+{
+}
+
+BuiltinPrecision16Storage32BitTests::~BuiltinPrecision16Storage32BitTests(void)
+{
+}
+
+void BuiltinPrecision16Storage32BitTests::init(void)
+{
+       std::vector<glu::ShaderType>            shaderTypes;
+       de::MovePtr<const CaseFactories>        computeOnlyCases        = createComputeOnlyBuiltinCases(true);
+       de::MovePtr<const CaseFactories>        completeCases           = createCompleteBuiltinCases();
+
+       shaderTypes.push_back(glu::SHADERTYPE_COMPUTE);
+
+       addBuiltinPrecision16BitTests(m_testCtx,
+               *computeOnlyCases,
+               shaderTypes,
+               *this,
+               true);
+
+       shaderTypes.push_back(glu::SHADERTYPE_VERTEX);
+       shaderTypes.push_back(glu::SHADERTYPE_FRAGMENT);
+
+       addBuiltinPrecision16BitTests(m_testCtx,
+               *completeCases,
+               shaderTypes,
+               *this,
+               true);
+}
+
 } // shaderexecutor
 } // vkt
index eac12a0..1ceada7 100644 (file)
@@ -46,6 +46,32 @@ private:
        BuiltinPrecisionTests&                  operator=                                                       (const BuiltinPrecisionTests&);         // not allowed!
 };
 
+class BuiltinPrecision16BitTests : public tcu::TestCaseGroup
+{
+public:
+                                                                       BuiltinPrecision16BitTests                      (tcu::TestContext& testCtx);
+       virtual                                                 ~BuiltinPrecision16BitTests                     (void);
+
+       virtual void                                    init                                                            (void);
+
+private:
+                                                                       BuiltinPrecision16BitTests                      (const BuiltinPrecisionTests&);         // not allowed!
+       BuiltinPrecision16BitTests&             operator=                                                       (const BuiltinPrecisionTests&);         // not allowed!
+};
+
+class BuiltinPrecision16Storage32BitTests : public tcu::TestCaseGroup
+{
+public:
+                                                                                               BuiltinPrecision16Storage32BitTests     (tcu::TestContext& testCtx);
+       virtual                                                                         ~BuiltinPrecision16Storage32BitTests    (void);
+
+       virtual void                                                            init(void);
+
+private:
+                                                                                               BuiltinPrecision16Storage32BitTests     (const BuiltinPrecisionTests&);         // not allowed!
+       BuiltinPrecision16Storage32BitTests&            operator=                                                               (const BuiltinPrecisionTests&);         // not allowed!
+};
+
 } // shaderexecutor
 } // vkt
 
index bfed3e4..c1f98b2 100644 (file)
@@ -48,6 +48,8 @@ tcu::TestCaseGroup* createBuiltinTests (tcu::TestContext& testCtx)
 
        builtinTests->addChild(builtinFunctionTests.release());
        builtinTests->addChild(new BuiltinPrecisionTests(testCtx));
+       builtinTests->addChild(new BuiltinPrecision16BitTests(testCtx));
+       builtinTests->addChild(new BuiltinPrecision16Storage32BitTests(testCtx));
 
        return builtinTests.release();
 }
index 44872b0..3bbdaaf 100644 (file)
@@ -72,6 +72,8 @@ typedef de::SharedPtr<Unique<VkImageView> >   VkImageViewSp;
 typedef de::SharedPtr<Unique<VkBuffer> >       VkBufferSp;
 typedef de::SharedPtr<Allocation>                      AllocationSp;
 
+static VkFormat getAttributeFormat(const glu::DataType dataType);
+
 // Shader utilities
 
 static VkClearValue    getDefaultClearColor (void)
@@ -83,7 +85,7 @@ static std::string generateEmptyFragmentSource (void)
 {
        std::ostringstream src;
 
-       src << "#version 310 es\n"
+       src << "#version 450\n"
                   "layout(location=0) out highp vec4 o_color;\n";
 
        src << "void main (void)\n{\n";
@@ -93,16 +95,90 @@ static std::string generateEmptyFragmentSource (void)
        return src.str();
 }
 
-static std::string generatePassthroughVertexShader (const std::vector<Symbol>& inputs, const char* inputPrefix, const char* outputPrefix)
+void packFloat16Bit (std::ostream& src, const std::vector<Symbol>& outputs)
 {
+       for (vector<Symbol>::const_iterator symIter = outputs.begin(); symIter != outputs.end(); ++symIter)
+       {
+               if(glu::isDataTypeFloatType(symIter->varType.getBasicType()))
+               {
+                       if(glu::isDataTypeVector(symIter->varType.getBasicType()))
+                       {
+                               for(int i = 0; i < glu::getDataTypeScalarSize(symIter->varType.getBasicType()); i++)
+                               {
+                                       src << "\tpacked_" << symIter->name << "[" << i << "] = uintBitsToFloat(packFloat2x16(f16vec2(" << symIter->name << "[" << i << "], -1.0)));\n";
+                               }
+                       }
+                       else if (glu::isDataTypeMatrix(symIter->varType.getBasicType()))
+                       {
+                               int maxRow = 0;
+                               int maxCol = 0;
+                               switch (symIter->varType.getBasicType())
+                               {
+                               case glu::TYPE_FLOAT_MAT2:
+                                       maxRow = maxCol = 2;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT2X3:
+                                       maxRow = 2;
+                                       maxCol = 3;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT2X4:
+                                       maxRow = 2;
+                                       maxCol = 4;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT3X2:
+                                       maxRow = 3;
+                                       maxCol = 2;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT3:
+                                       maxRow = maxCol = 3;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT3X4:
+                                       maxRow = 3;
+                                       maxCol = 4;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT4X2:
+                                       maxRow = 4;
+                                       maxCol = 2;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT4X3:
+                                       maxRow = 4;
+                                       maxCol = 3;
+                                       break;
+                               case glu::TYPE_FLOAT_MAT4:
+                                       maxRow = maxCol = 4;
+                                       break;
+                               default:
+                                       DE_ASSERT(false);
+                                       break;
+                               }
+
+                               for(int i = 0; i < maxRow; i++)
+                               for(int j = 0; j < maxCol; j++)
+                               {
+                                       src << "\tpacked_" << symIter->name << "[" << i << "][" << j << "] = uintBitsToFloat(packFloat2x16(f16vec2(" << symIter->name << "[" << i << "][" << j << "], -1.0)));\n";
+                               }
+                       }
+                       else
+                       {
+                                       src << "\tpacked_" << symIter->name << " = uintBitsToFloat(packFloat2x16(f16vec2(" << symIter->name << ", -1.0)));\n";
+                       }
+               }
+       }
+}
 
+static std::string generatePassthroughVertexShader (const ShaderSpec& shaderSpec, const char* inputPrefix, const char* outputPrefix)
+{
        std::ostringstream      src;
        int                                     location        = 0;
 
-       src << "#version 310 es\n"
-                  "layout(location = " << location << ") in highp vec4 a_position;\n";
+       src << glu::getGLSLVersionDeclaration(shaderSpec.glslVersion) << "\n";
+
+       if (!shaderSpec.globalDeclarations.empty())
+               src << shaderSpec.globalDeclarations << "\n";
+
+       src << "layout(location = " << location << ") in highp vec4 a_position;\n";
 
-       for (vector<Symbol>::const_iterator input = inputs.begin(); input != inputs.end(); ++input)
+       for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.end(); ++input)
        {
                location++;
                src << "layout(location = "<< location << ") in " << glu::declare(input->varType, inputPrefix + input->name) << ";\n"
@@ -113,7 +189,7 @@ static std::string generatePassthroughVertexShader (const std::vector<Symbol>& i
                << "    gl_Position = a_position;\n"
                << "    gl_PointSize = 1.0;\n";
 
-       for (vector<Symbol>::const_iterator input = inputs.begin(); input != inputs.end(); ++input)
+       for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.end(); ++input)
                src << "\t" << outputPrefix << input->name << " = " << inputPrefix << input->name << ";\n";
 
        src << "}\n";
@@ -134,9 +210,11 @@ static std::string generateVertexShader (const ShaderSpec& shaderSpec, const std
 
        src << "layout(location = 0) in highp vec4 a_position;\n";
 
-       int locationNumber = 1;
+       int                     locationNumber  = 1;
        for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.end(); ++input, ++locationNumber)
+       {
                src <<  "layout(location = " << locationNumber << ") in " << glu::declare(input->varType, inputPrefix + input->name) << ";\n";
+       }
 
        locationNumber = 0;
        for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outputs.end(); ++output, ++locationNumber)
@@ -163,11 +241,29 @@ static std::string generateVertexShader (const ShaderSpec& shaderSpec, const std
 
        // Declare & fetch local input variables
        for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.end(); ++input)
-               src << "\t" << glu::declare(input->varType, input->name) << " = " << inputPrefix << input->name << ";\n";
+       {
+               if (shaderSpec.packFloat16Bit && isDataTypeFloatOrVec(input->varType.getBasicType()))
+               {
+                       const std::string tname = glu::getDataTypeName(getDataTypeFloat16Scalars(input->varType.getBasicType()));
+                       src << "\t" << tname << " " << input->name << " = " << tname << "(" << inputPrefix << input->name << ");\n";
+               }
+               else
+                       src << "\t" << glu::declare(input->varType, input->name) << " = " << inputPrefix << input->name << ";\n";
+       }
 
        // Declare local output variables
        for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outputs.end(); ++output)
-               src << "\t" << glu::declare(output->varType, output->name) << ";\n";
+       {
+               if (shaderSpec.packFloat16Bit && isDataTypeFloatOrVec(output->varType.getBasicType()))
+               {
+                       const std::string tname = glu::getDataTypeName(getDataTypeFloat16Scalars(output->varType.getBasicType()));
+                       src << "\t" << tname << " " << output->name << ";\n";
+                       const char* tname2 = glu::getDataTypeName(output->varType.getBasicType());
+                       src << "\t" << tname2 << " " << "packed_" << output->name << ";\n";
+               }
+               else
+                       src << "\t" << glu::declare(output->varType, output->name) << ";\n";
+       }
 
        // Operation - indented to correct level.
        {
@@ -178,18 +274,28 @@ static std::string generateVertexShader (const ShaderSpec& shaderSpec, const std
                        src << "\t" << line << "\n";
        }
 
+       if (shaderSpec.packFloat16Bit)
+               packFloat16Bit(src, shaderSpec.outputs);
+
        // Assignments to outputs.
        for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outputs.end(); ++output)
        {
-               if (glu::isDataTypeBoolOrBVec(output->varType.getBasicType()))
+               if (shaderSpec.packFloat16Bit && isDataTypeFloatOrVec(output->varType.getBasicType()))
                {
-                       const int                               vecSize         = glu::getDataTypeScalarSize(output->varType.getBasicType());
-                       const glu::DataType             intBaseType     = vecSize > 1 ? glu::getDataTypeIntVec(vecSize) : glu::TYPE_INT;
-
-                       src << "\t" << outputPrefix << output->name << " = " << glu::getDataTypeName(intBaseType) << "(" << output->name << ");\n";
+                       src << "\t" << outputPrefix << output->name << " = packed_" << output->name << ";\n";
                }
                else
-                       src << "\t" << outputPrefix << output->name << " = " << output->name << ";\n";
+               {
+                       if (glu::isDataTypeBoolOrBVec(output->varType.getBasicType()))
+                       {
+                               const int                               vecSize         = glu::getDataTypeScalarSize(output->varType.getBasicType());
+                               const glu::DataType             intBaseType     = vecSize > 1 ? glu::getDataTypeIntVec(vecSize) : glu::TYPE_INT;
+
+                               src << "\t" << outputPrefix << output->name << " = " << glu::getDataTypeName(intBaseType) << "(" << output->name << ");\n";
+                       }
+                       else
+                               src << "\t" << outputPrefix << output->name << " = " << output->name << ";\n";
+               }
        }
 
        src << "}\n";
@@ -252,10 +358,15 @@ static void generateFragShaderOutputDecl (std::ostream& src, const ShaderSpec& s
        }
 }
 
-static void generateFragShaderOutAssign (std::ostream& src, const ShaderSpec& shaderSpec, bool useIntOutputs, const std::string& valuePrefix, const std::string& outputPrefix)
+static void generateFragShaderOutAssign (std::ostream& src, const ShaderSpec& shaderSpec, bool useIntOutputs, const std::string& valuePrefix, const std::string& outputPrefix, const bool isInput16Bit = false)
 {
+       if (isInput16Bit)
+               packFloat16Bit(src, shaderSpec.outputs);
+
        for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outputs.end(); ++output)
        {
+               const std::string packPrefix = (isInput16Bit && glu::isDataTypeFloatType(output->varType.getBasicType())) ? "packed_" : "";
+
                if (useIntOutputs && glu::isDataTypeFloatOrVec(output->varType.getBasicType()))
                        src << "        o_" << output->name << " = floatBitsToUint(" << valuePrefix << output->name << ");\n";
                else if (glu::isDataTypeMatrix(output->varType.getBasicType()))
@@ -266,7 +377,7 @@ static void generateFragShaderOutAssign (std::ostream& src, const ShaderSpec& sh
                                if (useIntOutputs)
                                        src << "\t" << outputPrefix << output->name << "_" << vecNdx << " = floatBitsToUint(" << valuePrefix << output->name << "[" << vecNdx << "]);\n";
                                else
-                                       src << "\t" << outputPrefix << output->name << "_" << vecNdx << " = " << valuePrefix << output->name << "[" << vecNdx << "];\n";
+                                       src << "\t" << outputPrefix << output->name << "_" << vecNdx << " = " << packPrefix << valuePrefix << output->name << "[" << vecNdx << "];\n";
                }
                else if (glu::isDataTypeBoolOrBVec(output->varType.getBasicType()))
                {
@@ -276,7 +387,7 @@ static void generateFragShaderOutAssign (std::ostream& src, const ShaderSpec& sh
                        src << "\t" << outputPrefix << output->name << " = " << glu::getDataTypeName(intBaseType) << "(" << valuePrefix << output->name << ");\n";
                }
                else
-                       src << "\t" << outputPrefix << output->name << " = " << valuePrefix << output->name << ";\n";
+                       src << "\t" << outputPrefix << output->name << " = " << packPrefix << valuePrefix << output->name << ";\n";
        }
 }
 
@@ -405,9 +516,11 @@ static std::string generateFragmentShader (const ShaderSpec& shaderSpec, bool us
        if (!shaderSpec.globalDeclarations.empty())
                src << shaderSpec.globalDeclarations << "\n";
 
-       int locationNumber = 0;
+       int                     locationNumber  = 0;
        for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.end(); ++input, ++locationNumber)
+       {
                src << "layout(location = " << locationNumber << ") flat in " << glu::declare(input->varType, inputPrefix + input->name) << ";\n";
+       }
 
        generateFragShaderOutputDecl(src, shaderSpec, useIntOutputs, outLocationMap, outputPrefix);
 
@@ -415,11 +528,29 @@ static std::string generateFragmentShader (const ShaderSpec& shaderSpec, bool us
 
        // Declare & fetch local input variables
        for (vector<Symbol>::const_iterator input = shaderSpec.inputs.begin(); input != shaderSpec.inputs.end(); ++input)
-               src << "\t" << glu::declare(input->varType, input->name) << " = " << inputPrefix << input->name << ";\n";
+       {
+               if (shaderSpec.packFloat16Bit && isDataTypeFloatOrVec(input->varType.getBasicType()))
+               {
+                       const std::string tname = glu::getDataTypeName(getDataTypeFloat16Scalars(input->varType.getBasicType()));
+                       src << "\t" << tname << " " << input->name << " = " << tname << "(" << inputPrefix << input->name << ");\n";
+               }
+               else
+                       src << "\t" << glu::declare(input->varType, input->name) << " = " << inputPrefix << input->name << ";\n";
+       }
 
        // Declare output variables
        for (vector<Symbol>::const_iterator output = shaderSpec.outputs.begin(); output != shaderSpec.outputs.end(); ++output)
-               src << "\t" << glu::declare(output->varType, output->name) << ";\n";
+       {
+               if (shaderSpec.packFloat16Bit && isDataTypeFloatOrVec(output->varType.getBasicType()))
+               {
+                       const std::string tname = glu::getDataTypeName(getDataTypeFloat16Scalars(output->varType.getBasicType()));
+                       src << "\t" << tname << " " << output->name << ";\n";
+                       const char* tname2 = glu::getDataTypeName(output->varType.getBasicType());
+                       src << "\t" << tname2 << " " << "packed_" << output->name << ";\n";
+               }
+               else
+                       src << "\t" << glu::declare(output->varType, output->name) << ";\n";
+       }
 
        // Operation - indented to correct level.
        {
@@ -430,7 +561,7 @@ static std::string generateFragmentShader (const ShaderSpec& shaderSpec, bool us
                        src << "\t" << line << "\n";
        }
 
-       generateFragShaderOutAssign(src, shaderSpec, useIntOutputs, "", outputPrefix);
+       generateFragShaderOutAssign(src, shaderSpec, useIntOutputs, "", outputPrefix, shaderSpec.packFloat16Bit);
 
        src << "}\n";
 
@@ -500,6 +631,19 @@ FragmentOutExecutor::FragmentOutExecutor (Context& context, glu::ShaderType shad
        , m_outputLayout                        (computeFragmentOutputLayout(m_shaderSpec.outputs))
        , m_extraResourcesLayout        (extraResourcesLayout)
 {
+       const VkPhysicalDevice          physicalDevice = m_context.getPhysicalDevice();
+       const InstanceInterface&        vki = m_context.getInstanceInterface();
+
+       // Input attributes
+       for (int inputNdx = 0; inputNdx < (int)m_shaderSpec.inputs.size(); inputNdx++)
+       {
+               const Symbol&                           symbol = m_shaderSpec.inputs[inputNdx];
+               const glu::DataType                     basicType = symbol.varType.getBasicType();
+               const VkFormat                          format = getAttributeFormat(basicType);
+               const VkFormatProperties        formatProperties = getPhysicalDeviceFormatProperties(vki, physicalDevice, format);
+               if ((formatProperties.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) == 0)
+                       TCU_THROW(NotSupportedError, "format not supported by device as vertex buffer attribute format");
+       }
 }
 
 FragmentOutExecutor::~FragmentOutExecutor (void)
@@ -538,10 +682,11 @@ static tcu::TextureFormat getRenderbufferFormatForOutput (const glu::VarType& ou
 
        switch (glu::getDataTypeScalarType(basicType))
        {
-               case glu::TYPE_UINT:    channelType = tcu::TextureFormat::UNSIGNED_INT32;                                                                                               break;
-               case glu::TYPE_INT:             channelType = tcu::TextureFormat::SIGNED_INT32;                                                                                                 break;
-               case glu::TYPE_BOOL:    channelType = tcu::TextureFormat::SIGNED_INT32;                                                                                                 break;
-               case glu::TYPE_FLOAT:   channelType = useIntOutputs ? tcu::TextureFormat::UNSIGNED_INT32 : tcu::TextureFormat::FLOAT;   break;
+               case glu::TYPE_UINT:    channelType = tcu::TextureFormat::UNSIGNED_INT32;                                                                                                               break;
+               case glu::TYPE_INT:             channelType = tcu::TextureFormat::SIGNED_INT32;                                                                                                                 break;
+               case glu::TYPE_BOOL:    channelType = tcu::TextureFormat::SIGNED_INT32;                                                                                                                 break;
+               case glu::TYPE_FLOAT:   channelType = useIntOutputs ? tcu::TextureFormat::UNSIGNED_INT32 : tcu::TextureFormat::FLOAT;                   break;
+               case glu::TYPE_FLOAT16: channelType = useIntOutputs ? tcu::TextureFormat::UNSIGNED_INT32 : tcu::TextureFormat::HALF_FLOAT;              break;
                default:
                        throw tcu::InternalError("Invalid output type");
        }
@@ -555,6 +700,11 @@ static VkFormat getAttributeFormat (const glu::DataType dataType)
 {
        switch (dataType)
        {
+               case glu::TYPE_FLOAT16:                 return VK_FORMAT_R16_SFLOAT;
+               case glu::TYPE_FLOAT16_VEC2:    return VK_FORMAT_R16G16_SFLOAT;
+               case glu::TYPE_FLOAT16_VEC3:    return VK_FORMAT_R16G16B16_SFLOAT;
+               case glu::TYPE_FLOAT16_VEC4:    return VK_FORMAT_R16G16B16A16_SFLOAT;
+
                case glu::TYPE_FLOAT:                   return VK_FORMAT_R32_SFLOAT;
                case glu::TYPE_FLOAT_VEC2:              return VK_FORMAT_R32G32_SFLOAT;
                case glu::TYPE_FLOAT_VEC3:              return VK_FORMAT_R32G32B32_SFLOAT;
@@ -654,6 +804,8 @@ void FragmentOutExecutor::bindAttributes (int numValues, const void* const* inpu
 
                if (glu::isDataTypeFloatOrVec(basicType))
                        elementSize = sizeof(float);
+               else if (glu::isDataTypeFloat16OrVec(basicType))
+                       elementSize = sizeof(deUint16);
                else if (glu::isDataTypeIntOrIVec(basicType))
                        elementSize = sizeof(int);
                else if (glu::isDataTypeUintOrUVec(basicType))
@@ -801,9 +953,16 @@ void FragmentOutExecutor::execute (int numValues, const void* const* inputs, voi
                for (int outNdx = 0; outNdx < (int)m_outputLayout.locationSymbols.size(); ++outNdx)
                {
                        const bool              isFloat         = isDataTypeFloatOrVec(m_shaderSpec.outputs[outNdx].varType.getBasicType());
+                       const bool              isFloat16b      = glu::isDataTypeFloat16OrVec(m_shaderSpec.outputs[outNdx].varType.getBasicType());
                        const bool              isSigned        = isDataTypeIntOrIVec (m_shaderSpec.outputs[outNdx].varType.getBasicType());
                        const bool              isBool          = isDataTypeBoolOrBVec(m_shaderSpec.outputs[outNdx].varType.getBasicType());
-                       const VkFormat  colorFormat = isFloat ? VK_FORMAT_R32G32B32A32_SFLOAT : (isSigned || isBool ? VK_FORMAT_R32G32B32A32_SINT : VK_FORMAT_R32G32B32A32_UINT);
+                       const VkFormat  colorFormat = isFloat16b ? VK_FORMAT_R16G16B16A16_SFLOAT : (isFloat ? VK_FORMAT_R32G32B32A32_SFLOAT : (isSigned || isBool ? VK_FORMAT_R32G32B32A32_SINT : VK_FORMAT_R32G32B32A32_UINT));
+
+                       {
+                               const VkFormatProperties        formatProperties        = getPhysicalDeviceFormatProperties(m_context.getInstanceInterface(), m_context.getPhysicalDevice(), colorFormat);
+                               if ((formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) == 0)
+                                       TCU_THROW(NotSupportedError, "Image format doesn't support COLOR_ATTACHMENT_BIT");
+                       }
 
                        const VkImageCreateInfo  colorImageParams =
                        {
@@ -1162,7 +1321,6 @@ void FragmentOutExecutor::execute (int numValues, const void* const* inputs, voi
                        const int                                       outSize                 = output.varType.getScalarSize();
                        const int                                       outVecSize              = glu::getDataTypeNumComponents(output.varType.getBasicType());
                        const int                                       outNumLocs              = glu::getDataTypeNumLocations(output.varType.getBasicType());
-                       deUint32*                                       dstPtrBase              = static_cast<deUint32*>(outputs[outNdx]);
                        const int                                       outLocation             = de::lookup(m_outputLayout.locationMap, output.name);
 
                        for (int locNdx = 0; locNdx < outNumLocs; ++locNdx)
@@ -1205,15 +1363,34 @@ void FragmentOutExecutor::execute (int numValues, const void* const* inputs, voi
 
                                tcu::copy(tmpBuf.getAccess(), resultAccess);
 
-                               if (outSize == 4 && outNumLocs == 1)
-                                       deMemcpy(dstPtrBase, tmpBuf.getAccess().getDataPtr(), numValues * outVecSize * sizeof(deUint32));
+                               if (isOutput16Bit(static_cast<size_t>(outNdx)))
+                               {
+                                       deUint16*       dstPtrBase = static_cast<deUint16*>(outputs[outNdx]);
+                                       if (outSize == 4 && outNumLocs == 1)
+                                               deMemcpy(dstPtrBase, tmpBuf.getAccess().getDataPtr(), numValues * outVecSize * sizeof(deUint16));
+                                       else
+                                       {
+                                               for (int valNdx = 0; valNdx < numValues; valNdx++)
+                                               {
+                                                       const deUint16* srcPtr = (const deUint16*)tmpBuf.getAccess().getDataPtr() + valNdx * 4;
+                                                       deUint16*               dstPtr = &dstPtrBase[outSize * valNdx + outVecSize * locNdx];
+                                                       deMemcpy(dstPtr, srcPtr, outVecSize * sizeof(deUint16));
+                                               }
+                                       }
+                               }
                                else
                                {
-                                       for (int valNdx = 0; valNdx < numValues; valNdx++)
+                                       deUint32*       dstPtrBase = static_cast<deUint32*>(outputs[outNdx]);
+                                       if (outSize == 4 && outNumLocs == 1)
+                                               deMemcpy(dstPtrBase, tmpBuf.getAccess().getDataPtr(), numValues * outVecSize * sizeof(deUint32));
+                                       else
                                        {
-                                               const deUint32* srcPtr = (const deUint32*)tmpBuf.getAccess().getDataPtr() + valNdx * 4;
-                                               deUint32*               dstPtr = &dstPtrBase[outSize * valNdx + outVecSize * locNdx];
-                                               deMemcpy(dstPtr, srcPtr, outVecSize * sizeof(deUint32));
+                                               for (int valNdx = 0; valNdx < numValues; valNdx++)
+                                               {
+                                                       const deUint32* srcPtr = (const deUint32*)tmpBuf.getAccess().getDataPtr() + valNdx * 4;
+                                                       deUint32*               dstPtr = &dstPtrBase[outSize * valNdx + outVecSize * locNdx];
+                                                       deMemcpy(dstPtr, srcPtr, outVecSize * sizeof(deUint32));
+                                               }
                                        }
                                }
                        }
@@ -1279,7 +1456,7 @@ void GeometryShaderExecutor::generateSources (const ShaderSpec& shaderSpec, Sour
 {
        const FragmentOutputLayout      outputLayout    (computeFragmentOutputLayout(shaderSpec.outputs));
 
-       programCollection.glslSources.add("vert") << glu::VertexSource(generatePassthroughVertexShader(shaderSpec.inputs, "a_", "vtx_out_")) << shaderSpec.buildOptions;
+       programCollection.glslSources.add("vert") << glu::VertexSource(generatePassthroughVertexShader(shaderSpec, "a_", "vtx_out_")) << shaderSpec.buildOptions;
 
        programCollection.glslSources.add("geom") << glu::GeometrySource(generateGeometryShader(shaderSpec, "vtx_out_", "geom_out_")) << shaderSpec.buildOptions;
 
@@ -1313,7 +1490,7 @@ void FragmentShaderExecutor::generateSources (const ShaderSpec& shaderSpec, Sour
 {
        const FragmentOutputLayout      outputLayout    (computeFragmentOutputLayout(shaderSpec.outputs));
 
-       programCollection.glslSources.add("vert") << glu::VertexSource(generatePassthroughVertexShader(shaderSpec.inputs, "a_", "vtx_out_")) << shaderSpec.buildOptions;
+       programCollection.glslSources.add("vert") << glu::VertexSource(generatePassthroughVertexShader(shaderSpec, "a_", "vtx_out_")) << shaderSpec.buildOptions;
        /* \todo [2015-09-11 hegedusd] set useIntOutputs parameter if needed. */
        programCollection.glslSources.add("frag") << glu::FragmentSource(generateFragmentShader(shaderSpec, false, outputLayout.locationMap, "vtx_out_", "o_")) << shaderSpec.buildOptions;
 }
@@ -1322,6 +1499,15 @@ void FragmentShaderExecutor::generateSources (const ShaderSpec& shaderSpec, Sour
 
 static deUint32 getVecStd430ByteAlignment (glu::DataType type)
 {
+       switch (type)
+       {
+               case glu::TYPE_FLOAT16:                 return 2u;
+               case glu::TYPE_FLOAT16_VEC2:    return 4u;
+               case glu::TYPE_FLOAT16_VEC3:    return 8u;
+               case glu::TYPE_FLOAT16_VEC4:    return 8u;
+               default: break;
+       }
+
        switch (glu::getDataTypeScalarSize(type))
        {
                case 1:         return 4u;
@@ -1420,7 +1606,7 @@ void BufferIoExecutor::computeVarLayout (const std::vector<Symbol>& symbols, std
                if (glu::isDataTypeScalarOrVector(basicType))
                {
                        const deUint32  alignment       = getVecStd430ByteAlignment(basicType);
-                       const deUint32  size            = (deUint32)glu::getDataTypeScalarSize(basicType) * (int)sizeof(deUint32);
+                       const deUint32  size            = (deUint32)glu::getDataTypeScalarSize(basicType) * (isDataTypeFloat16OrVec(basicType) ? (int)sizeof(deUint16) : (int)sizeof(deUint32));
 
                        curOffset               = (deUint32)deAlign32((int)curOffset, (int)alignment);
                        maxAlignment    = de::max(maxAlignment, alignment);
@@ -1434,7 +1620,7 @@ void BufferIoExecutor::computeVarLayout (const std::vector<Symbol>& symbols, std
                {
                        const int                               numVecs                 = glu::getDataTypeMatrixNumColumns(basicType);
                        const glu::DataType             vecType                 = glu::getDataTypeFloatVec(glu::getDataTypeMatrixNumRows(basicType));
-                       const deUint32                  vecAlignment    = getVecStd430ByteAlignment(vecType);
+                       const deUint32                  vecAlignment    = isDataTypeFloat16OrVec(basicType) ? getVecStd430ByteAlignment(vecType)/2 : getVecStd430ByteAlignment(vecType);
 
                        curOffset               = (deUint32)deAlign32((int)curOffset, (int)vecAlignment);
                        maxAlignment    = de::max(maxAlignment, vecAlignment);
@@ -1494,11 +1680,39 @@ void BufferIoExecutor::declareBufferBlocks (std::ostream& src, const ShaderSpec&
 
 void BufferIoExecutor::generateExecBufferIo (std::ostream& src, const ShaderSpec& spec, const char* invocationNdxName)
 {
+       std::string     tname;
        for (vector<Symbol>::const_iterator symIter = spec.inputs.begin(); symIter != spec.inputs.end(); ++symIter)
-               src << "\t" << glu::declare(symIter->varType, symIter->name) << " = inputs[" << invocationNdxName << "]." << symIter->name << ";\n";
+       {
+               const bool f16BitTest = spec.packFloat16Bit && glu::isDataTypeFloatType(symIter->varType.getBasicType());
+               if (f16BitTest)
+               {
+                       tname = glu::getDataTypeName(getDataTypeFloat16Scalars(symIter->varType.getBasicType()));
+               }
+               else
+               {
+                       tname = glu::getDataTypeName(symIter->varType.getBasicType());
+               }
+               src << "\t" << tname << " "<< symIter->name << " = " << tname << "(inputs[" << invocationNdxName << "]." << symIter->name << ");\n";
+       }
 
        for (vector<Symbol>::const_iterator symIter = spec.outputs.begin(); symIter != spec.outputs.end(); ++symIter)
-               src << "\t" << glu::declare(symIter->varType, symIter->name) << ";\n";
+       {
+               const bool f16BitTest = spec.packFloat16Bit && glu::isDataTypeFloatType(symIter->varType.getBasicType());
+               if (f16BitTest)
+               {
+                       tname = glu::getDataTypeName(getDataTypeFloat16Scalars(symIter->varType.getBasicType()));
+               }
+               else
+               {
+                       tname = glu::getDataTypeName(symIter->varType.getBasicType());
+               }
+               src << "\t" << tname << " " << symIter->name << ";\n";
+               if (f16BitTest)
+               {
+                       const char* ttname = glu::getDataTypeName(symIter->varType.getBasicType());
+                       src << "\t" << ttname << " " << "packed_" << symIter->name << ";\n";
+               }
+       }
 
        src << "\n";
 
@@ -1510,9 +1724,18 @@ void BufferIoExecutor::generateExecBufferIo (std::ostream& src, const ShaderSpec
                        src << "\t" << line << "\n";
        }
 
+       if (spec.packFloat16Bit)
+               packFloat16Bit (src, spec.outputs);
+
        src << "\n";
        for (vector<Symbol>::const_iterator symIter = spec.outputs.begin(); symIter != spec.outputs.end(); ++symIter)
-               src << "\toutputs[" << invocationNdxName << "]." << symIter->name << " = " << symIter->name << ";\n";
+       {
+               const bool f16BitTest = spec.packFloat16Bit && glu::isDataTypeFloatType(symIter->varType.getBasicType());
+               if(f16BitTest)
+                       src << "\toutputs[" << invocationNdxName << "]." << symIter->name << " = packed_" << symIter->name << ";\n";
+               else
+                       src << "\toutputs[" << invocationNdxName << "]." << symIter->name << " = " << symIter->name << ";\n";
+       }
 }
 
 void BufferIoExecutor::copyToBuffer (const glu::VarType& varType, const VarLayout& layout, int numValues, const void* srcBasePtr, void* dstBasePtr)
@@ -1529,12 +1752,13 @@ void BufferIoExecutor::copyToBuffer (const glu::VarType& varType, const VarLayou
                {
                        for (int vecNdx = 0; vecNdx < numVecs; vecNdx++)
                        {
-                               const int               srcOffset               = (int)sizeof(deUint32) * (elemNdx * scalarSize + vecNdx * numComps);
+                               const int               size                    = (glu::isDataTypeFloat16OrVec(basicType) ? (int)sizeof(deUint16) : (int)sizeof(deUint32));
+                               const int               srcOffset               = size * (elemNdx * scalarSize + vecNdx * numComps);
                                const int               dstOffset               = layout.offset + layout.stride * elemNdx + (isMatrix ? layout.matrixStride * vecNdx : 0);
                                const deUint8*  srcPtr                  = (const deUint8*)srcBasePtr + srcOffset;
                                deUint8*                dstPtr                  = (deUint8*)dstBasePtr + dstOffset;
 
-                               deMemcpy(dstPtr, srcPtr, sizeof(deUint32) * numComps);
+                               deMemcpy(dstPtr, srcPtr, size * numComps);
                        }
                }
        }
@@ -1556,12 +1780,13 @@ void BufferIoExecutor::copyFromBuffer (const glu::VarType& varType, const VarLay
                {
                        for (int vecNdx = 0; vecNdx < numVecs; vecNdx++)
                        {
+                               const int               size                    = (glu::isDataTypeFloat16OrVec(basicType) ? (int)sizeof(deUint16) : (int)sizeof(deUint32));
                                const int               srcOffset               = layout.offset + layout.stride * elemNdx + (isMatrix ? layout.matrixStride * vecNdx : 0);
-                               const int               dstOffset               = (int)sizeof(deUint32) * (elemNdx * scalarSize + vecNdx * numComps);
+                               const int               dstOffset               = size * (elemNdx * scalarSize + vecNdx * numComps);
                                const deUint8*  srcPtr                  = (const deUint8*)srcBasePtr + srcOffset;
                                deUint8*                dstPtr                  = (deUint8*)dstBasePtr + dstOffset;
 
-                               deMemcpy(dstPtr, srcPtr, sizeof(deUint32) * numComps);
+                               deMemcpy(dstPtr, srcPtr, size * numComps);
                        }
                }
        }
@@ -1692,34 +1917,418 @@ ComputeShaderExecutor::~ComputeShaderExecutor  (void)
 {
 }
 
-std::string ComputeShaderExecutor::generateComputeShader (const ShaderSpec& spec)
+std::string getTypeSpirv(const glu::DataType type)
 {
-       std::ostringstream src;
-       src << glu::getGLSLVersionDeclaration(spec.glslVersion) << "\n";
+       switch(type)
+       {
+       case glu::TYPE_FLOAT16:
+               return "%f16";
+       case glu::TYPE_FLOAT16_VEC2:
+               return "%v2f16";
+       case glu::TYPE_FLOAT16_VEC3:
+               return "%v3f16";
+       case glu::TYPE_FLOAT16_VEC4:
+               return "%v4f16";
+       case glu::TYPE_FLOAT:
+               return "%f32";
+       case glu::TYPE_FLOAT_VEC2:
+               return "%v2f32";
+       case glu::TYPE_FLOAT_VEC3:
+               return "%v3f32";
+       case glu::TYPE_FLOAT_VEC4:
+               return "%v4f32";
+       case glu::TYPE_INT:
+               return "%i32";
+       case glu::TYPE_INT_VEC2:
+               return "%v2i32";
+       case glu::TYPE_INT_VEC3:
+               return "%v3i32";
+       case glu::TYPE_INT_VEC4:
+               return "%v4i32";
+       default:
+               DE_ASSERT(0);
+               return "";
+               break;
+       }
+}
 
-       if (!spec.globalDeclarations.empty())
-               src << spec.globalDeclarations << "\n";
+std::string moveBitOperation (std::string variableName, const int operationNdx)
+{
+       std::ostringstream      src;
+       src << "\n"
+       << "%operation_move_" << operationNdx << " = OpLoad %i32 " << variableName << "\n"
+       << "%move1_" << operationNdx << " = OpShiftLeftLogical %i32 %operation_move_"<< operationNdx <<" %c_i32_1\n"
+       << "OpStore " << variableName << " %move1_" << operationNdx << "\n";
+       return src.str();
+}
 
-       src << "layout(local_size_x = 1) in;\n"
-               << "\n";
+std::string sclarComparison(const std::string opeartion, const int operationNdx, const glu::DataType type, const std::string& outputType, const int scalarSize)
+{
+       std::ostringstream      src;
+       std::string                     boolType;
 
-       declareBufferBlocks(src, spec);
+       switch (type)
+       {
+       case glu::TYPE_FLOAT16:
+       case glu::TYPE_FLOAT:
+               src << "\n"
+                       << "%operation_result_" << operationNdx << " = " << opeartion << " %bool %in0_val %in1_val\n"
+                       << "OpSelectionMerge %IF_" << operationNdx << " None\n"
+                       << "OpBranchConditional %operation_result_" << operationNdx << " %label_IF_" << operationNdx << " %IF_" << operationNdx << "\n"
+                       << "%label_IF_" << operationNdx << " = OpLabel\n"
+                       << "%operation_val_" << operationNdx << " = OpLoad %i32 %operation\n"
+                       << "%out_val_" << operationNdx << " = OpLoad %i32 %out\n"
+                       << "%add_if_" << operationNdx << " = OpIAdd %i32 %out_val_" << operationNdx << " %operation_val_" << operationNdx << "\n"
+                       << "OpStore %out %add_if_" << operationNdx << "\n"
+                       << "OpBranch %IF_" << operationNdx << "\n"
+                       << "%IF_" << operationNdx << " = OpLabel\n";
+               return src.str();
+       case glu::TYPE_FLOAT16_VEC2:
+       case glu::TYPE_FLOAT_VEC2:
+               boolType = "%v2bool";
+               break;
+       case glu::TYPE_FLOAT16_VEC3:
+       case glu::TYPE_FLOAT_VEC3:
+               boolType = "%v3bool";
+               break;
+       case glu::TYPE_FLOAT16_VEC4:
+       case glu::TYPE_FLOAT_VEC4:
+               boolType = "%v4bool";
+               break;
+       default:
+               DE_ASSERT(0);
+               return "";
+               break;
+       }
 
-       src << "void main (void)\n"
-               << "{\n"
-               << "    uint invocationNdx = gl_NumWorkGroups.x*gl_NumWorkGroups.y*gl_WorkGroupID.z\n"
-               << "                       + gl_NumWorkGroups.x*gl_WorkGroupID.y + gl_WorkGroupID.x;\n";
+       src << "\n"
+               << "%operation_result_" << operationNdx << " = " << opeartion << " " << boolType << " %in0_val %in1_val\n"
+               << "%ivec_result_" << operationNdx << " = OpSelect " << outputType << " %operation_result_" << operationNdx << " %c_" << &outputType[1] << "_1 %c_" << &outputType[1] << "_0\n"
+               << "%operation_val_" << operationNdx << " = OpLoad %i32 %operation\n";
 
-       generateExecBufferIo(src, spec, "invocationNdx");
+       src << "%operation_vec_" << operationNdx << " = OpCompositeConstruct " << outputType;
+       for(int ndx = 0; ndx < scalarSize; ++ndx)
+               src << " %operation_val_" << operationNdx;
+       src << "\n";
 
-       src << "}\n";
+       src << "%toAdd" << operationNdx << " = OpIMul "<< outputType << " %ivec_result_" << operationNdx << " %operation_vec_" << operationNdx <<"\n"
+               << "%out_val_" << operationNdx << " = OpLoad "<< outputType << " %out\n"
+
+               << "%add_if_" << operationNdx << " = OpIAdd " << outputType << " %out_val_" << operationNdx << " %toAdd" << operationNdx << "\n"
+               << "OpStore %out %add_if_" << operationNdx << "\n";
 
        return src.str();
 }
 
+std::string generateSpirv(const ShaderSpec& spec, const bool are16Bit, const bool isMediump)
+{
+       const int                       operationAmount = 10;
+       int                                     moveBitNdx              = 0;
+       const std::string       inputType1              = getTypeSpirv(spec.inputs[0].varType.getBasicType());
+       const std::string       inputType2              = getTypeSpirv(spec.inputs[1].varType.getBasicType());
+       const std::string       outputType              = getTypeSpirv(spec.outputs[0].varType.getBasicType());
+       const std::string       packType                = spec.packFloat16Bit ? getTypeSpirv(getDataTypeFloat16Scalars(spec.inputs[0].varType.getBasicType())) : "";
+
+       std::string     opeartions[operationAmount]     =
+       {
+               "OpFOrdEqual",
+               "OpFOrdGreaterThan",
+               "OpFOrdLessThan",
+               "OpFOrdGreaterThanEqual",
+               "OpFOrdLessThanEqual",
+               "OpFUnordEqual",
+               "OpFUnordGreaterThan",
+               "OpFUnordLessThan",
+               "OpFUnordGreaterThanEqual",
+               "OpFUnordLessThanEqual"
+       };
+
+       std::ostringstream      src;
+       src << "; SPIR-V\n"
+               "; Version: 1.0\n"
+               "; Generator: Khronos Glslang Reference Front End; 4\n"
+               "; Bound: 114\n"
+               "; Schema: 0\n"
+               "OpCapability Shader\n";
+
+       if (spec.packFloat16Bit || are16Bit)
+               src << "OpCapability Float16\n";
+
+       if (are16Bit)
+               src << "OpCapability StorageBuffer16BitAccess\n"
+                       "OpCapability UniformAndStorageBuffer16BitAccess\n";
+
+       if (spec.packFloat16Bit || are16Bit)
+               src << "OpExtension \"SPV_AMD_gpu_shader_half_float\"\n";
+
+       if (are16Bit)
+               src << "OpExtension \"SPV_AMD_gpu_shader_half_float\"\n"
+                       "OpExtension \"SPV_KHR_16bit_storage\"\n";
+
+       src << "%1 = OpExtInstImport \"GLSL.std.450\"\n"
+               "OpMemoryModel Logical GLSL450\n"
+               "OpEntryPoint GLCompute %BP_main \"main\" %BP_id3uNum %BP_id3uID\n"
+               "OpExecutionMode %BP_main LocalSize 1 1 1\n"
+               "OpDecorate %BP_id3uNum BuiltIn NumWorkgroups\n"
+               "OpDecorate %BP_id3uID BuiltIn WorkgroupId\n";
+
+       //input offset
+       {
+               int offset = 0;
+               int ndx = 0;
+               for (vector<Symbol>::const_iterator symIter = spec.inputs.begin(); symIter != spec.inputs.end(); ++symIter)
+               {
+                       src << "OpMemberDecorate %SSB0_IN "<< ndx <<" Offset " << offset << "\n";
+                       ++ndx;
+                       offset += (symIter->varType.getScalarSize() == 3 ? 4 : symIter->varType.getScalarSize()) * (isDataTypeFloat16OrVec(symIter->varType.getBasicType()) ? (int)sizeof(deUint16) : (int)sizeof(deUint32));
+               }
+               src << "OpDecorate %up_SSB0_IN ArrayStride "<< offset << "\n";
+       }
+
+       src << "OpMemberDecorate %ssboIN 0 Offset 0\n"
+               "OpDecorate %ssboIN BufferBlock\n"
+               "OpDecorate %ssbo_src DescriptorSet 0\n"
+               "OpDecorate %ssbo_src Binding 0\n"
+               "\n";
+
+       if (isMediump)
+       {
+               src << "OpMemberDecorate %SSB0_IN 1 RelaxedPrecision\n"
+                       "OpDecorate %in0 RelaxedPrecision\n"
+                       "OpMemberDecorate %SSB0_IN 0 RelaxedPrecision\n"
+                       "OpDecorate %src_val_0_0 RelaxedPrecision\n"
+                       "OpDecorate %src_val_0_0 RelaxedPrecision\n"
+                       "OpDecorate %in1 RelaxedPrecision\n"
+                       "OpDecorate %src_val_0_1 RelaxedPrecision\n"
+                       "OpDecorate %src_val_0_1 RelaxedPrecision\n"
+                       "OpDecorate %in0_val RelaxedPrecision\n"
+                       "OpDecorate %in1_val RelaxedPrecision\n"
+                       "OpDecorate %in0_val RelaxedPrecision\n"
+                       "OpDecorate %in1_val RelaxedPrecision\n"
+                       "OpMemberDecorate %SSB0_OUT 0 RelaxedPrecision\n";
+       }
+
+       //output offset
+       {
+               int offset = 0;
+               int ndx = 0;
+               for (vector<Symbol>::const_iterator symIter = spec.outputs.begin(); symIter != spec.outputs.end(); ++symIter)
+               {
+                       src << "OpMemberDecorate %SSB0_OUT " << ndx << " Offset " << offset << "\n";
+                       ++ndx;
+                       offset += (symIter->varType.getScalarSize() == 3 ? 4 : symIter->varType.getScalarSize()) * (isDataTypeFloat16OrVec(symIter->varType.getBasicType()) ? (int)sizeof(deUint16) : (int)sizeof(deUint32));
+               }
+               src << "OpDecorate %up_SSB0_OUT ArrayStride " << offset << "\n";
+       }
+
+       src << "OpMemberDecorate %ssboOUT 0 Offset 0\n"
+               "OpDecorate %ssboOUT BufferBlock\n"
+               "OpDecorate %ssbo_dst DescriptorSet 0\n"
+               "OpDecorate %ssbo_dst Binding 1\n"
+               "\n"
+               "%void  = OpTypeVoid\n"
+               "%bool  = OpTypeBool\n"
+               "%v2bool = OpTypeVector %bool 2\n"
+               "%v3bool = OpTypeVector %bool 3\n"
+               "%v4bool = OpTypeVector %bool 4\n"
+               "%u32   = OpTypeInt 32 0\n";
+
+       if (!are16Bit) //f32 is not needed when shader operates only on f16
+               src << "%f32   = OpTypeFloat 32\n"
+                       "%v2f32 = OpTypeVector %f32 2\n"
+                       "%v3f32 = OpTypeVector %f32 3\n"
+                       "%v4f32 = OpTypeVector %f32 4\n";
+
+       if (spec.packFloat16Bit || are16Bit)
+               src << "%f16   = OpTypeFloat 16\n"
+                       "%v2f16 = OpTypeVector %f16 2\n"
+                       "%v3f16 = OpTypeVector %f16 3\n"
+                       "%v4f16 = OpTypeVector %f16 4\n";
+
+       src << "%i32   = OpTypeInt 32 1\n"
+               "%v2i32 = OpTypeVector %i32 2\n"
+               "%v3i32 = OpTypeVector %i32 3\n"
+               "%v4i32 = OpTypeVector %i32 4\n"
+               "%v3u32 = OpTypeVector %u32 3\n"
+               "\n"
+               "%ip_u32   = OpTypePointer Input %u32\n"
+               "%ip_v3u32 = OpTypePointer Input %v3u32\n"
+               "%up_float   = OpTypePointer Uniform " << inputType1 << "\n"
+               "\n"
+               "%fun     = OpTypeFunction %void\n"
+               "%fp_u32  = OpTypePointer Function %u32\n"
+               "%fp_i32  = OpTypePointer Function " << outputType << "\n"
+               "%fp_f32  = OpTypePointer Function " << inputType1 << "\n"
+               "%fp_operation =  OpTypePointer Function %i32\n";
+
+       if (spec.packFloat16Bit)
+               src << "%fp_f16  = OpTypePointer Function " << packType << "\n";
+
+       src << "%BP_id3uID = OpVariable %ip_v3u32 Input\n"
+               "%BP_id3uNum = OpVariable %ip_v3u32 Input\n"
+               "%up_i32 = OpTypePointer Uniform " << outputType << "\n"
+               "\n"
+               "%c_u32_0 = OpConstant %u32 0\n"
+               "%c_u32_1 = OpConstant %u32 1\n"
+               "%c_u32_2 = OpConstant %u32 2\n"
+               "%c_i32_0 = OpConstant %i32 0\n"
+               "%c_i32_1 = OpConstant %i32 1\n"
+               "%c_v2i32_0 = OpConstantComposite %v2i32 %c_i32_0 %c_i32_0\n"
+               "%c_v2i32_1 = OpConstantComposite %v2i32 %c_i32_1 %c_i32_1\n"
+               "%c_v3i32_0 = OpConstantComposite %v3i32 %c_i32_0 %c_i32_0 %c_i32_0\n"
+               "%c_v3i32_1 = OpConstantComposite %v3i32 %c_i32_1 %c_i32_1 %c_i32_1\n"
+               "%c_v4i32_0 = OpConstantComposite %v4i32 %c_i32_0 %c_i32_0 %c_i32_0 %c_i32_0\n"
+               "%c_v4i32_1 = OpConstantComposite %v4i32 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_1\n"
+               "\n"
+               "%SSB0_IN    = OpTypeStruct " << inputType1 << " " << inputType2 << "\n"
+               "%up_SSB0_IN = OpTypeRuntimeArray %SSB0_IN\n"
+               "%ssboIN     = OpTypeStruct %up_SSB0_IN\n"
+               "%up_ssboIN  = OpTypePointer Uniform %ssboIN\n"
+               "%ssbo_src   = OpVariable %up_ssboIN Uniform\n"
+               "\n"
+               "%SSB0_OUT    = OpTypeStruct " << outputType << "\n"
+               "%up_SSB0_OUT = OpTypeRuntimeArray %SSB0_OUT\n"
+               "%ssboOUT     = OpTypeStruct %up_SSB0_OUT\n"
+               "%up_ssboOUT  = OpTypePointer Uniform %ssboOUT\n"
+               "%ssbo_dst    = OpVariable %up_ssboOUT Uniform\n"
+               "\n"
+               "%BP_main = OpFunction %void None %fun\n"
+               "%BP_label = OpLabel\n"
+               "%invocationNdx = OpVariable  %fp_u32 Function\n";
+
+       if (spec.packFloat16Bit)
+               src << "%in0 = OpVariable %fp_f16 Function\n"
+                       "%in1 = OpVariable %fp_f16 Function\n";
+       else
+               src << "%in0 = OpVariable %fp_f32 Function\n"
+                       "%in1 = OpVariable %fp_f32 Function\n";
+
+       src << "%operation = OpVariable %fp_operation Function\n"
+               "%out = OpVariable %fp_i32 Function\n"
+               "%BP_id_0_ptr  = OpAccessChain %ip_u32 %BP_id3uID %c_u32_0\n"
+               "%BP_id_1_ptr  = OpAccessChain %ip_u32 %BP_id3uID %c_u32_1\n"
+               "%BP_id_2_ptr  = OpAccessChain %ip_u32 %BP_id3uID %c_u32_2\n"
+               "%BP_num_0_ptr  = OpAccessChain %ip_u32 %BP_id3uNum %c_u32_0\n"
+               "%BP_num_1_ptr  = OpAccessChain %ip_u32 %BP_id3uNum %c_u32_1\n"
+               "%BP_id_0_val = OpLoad %u32 %BP_id_0_ptr\n"
+               "%BP_id_1_val = OpLoad %u32 %BP_id_1_ptr\n"
+               "%BP_id_2_val = OpLoad %u32 %BP_id_2_ptr\n"
+               "%BP_num_0_val = OpLoad %u32 %BP_num_0_ptr\n"
+               "%BP_num_1_val = OpLoad %u32 %BP_num_1_ptr\n"
+               "\n"
+               "%mul_1 = OpIMul %u32 %BP_num_0_val %BP_num_1_val\n"
+               "%mul_2 = OpIMul %u32 %mul_1 %BP_id_2_val\n"
+               "%mul_3 = OpIMul %u32 %BP_num_0_val %BP_id_1_val\n"
+               "%add_1 = OpIAdd %u32 %mul_2 %mul_3\n"
+               "%add_2 = OpIAdd %u32 %add_1 %BP_id_0_val\n"
+               "OpStore %invocationNdx %add_2\n"
+               "%invocationNdx_val = OpLoad %u32 %invocationNdx\n"
+               "\n"
+               "%src_ptr_0_0 = OpAccessChain %up_float %ssbo_src %c_i32_0 %invocationNdx_val %c_i32_0\n"
+               "%src_val_0_0 = OpLoad " << inputType1 << " %src_ptr_0_0\n";
+
+       if(spec.packFloat16Bit)
+               src << "%val_f16_0_0 = OpFConvert " << packType <<" %src_val_0_0\n"
+                       "OpStore %in0 %val_f16_0_0\n";
+       else
+               src << "OpStore %in0 %src_val_0_0\n";
+
+       src << "\n"
+               "%src_ptr_0_1 = OpAccessChain %up_float %ssbo_src %c_i32_0 %invocationNdx_val %c_i32_1\n"
+               "%src_val_0_1 = OpLoad " << inputType2 << " %src_ptr_0_1\n";
+
+       if (spec.packFloat16Bit)
+               src << "%val_f16_0_1 = OpFConvert " << packType << " %src_val_0_1\n"
+                       "OpStore %in1 %val_f16_0_1\n";
+       else
+               src << "OpStore %in1 %src_val_0_1\n";
+
+       src << "\n"
+               "OpStore %operation %c_i32_1\n"
+               "OpStore %out %c_" << &outputType[1] << "_0\n"
+               "\n";
+
+       if (spec.packFloat16Bit)
+               src << "%in0_val = OpLoad " << packType << " %in0\n"
+                       "%in1_val = OpLoad " << packType << " %in1\n";
+       else
+               src << "%in0_val = OpLoad " << inputType1 << " %in0\n"
+                       "%in1_val = OpLoad " << inputType2 << " %in1\n";
+
+       src << "\n";
+       for(int operationNdx = 0; operationNdx < operationAmount; ++operationNdx)
+       {
+               src << sclarComparison  (opeartions[operationNdx], operationNdx,
+                                                               spec.inputs[0].varType.getBasicType(),
+                                                               outputType,
+                                                               spec.outputs[0].varType.getScalarSize());
+               src << moveBitOperation("%operation", moveBitNdx);
+               ++moveBitNdx;
+       }
+
+       src << "\n"
+               "%out_val_final = OpLoad " << outputType << " %out\n"
+               "%ssbo_dst_ptr = OpAccessChain %up_i32 %ssbo_dst %c_i32_0 %invocationNdx_val %c_i32_0\n"
+               "OpStore %ssbo_dst_ptr %out_val_final\n"
+               "\n"
+               "OpReturn\n"
+               "OpFunctionEnd\n";
+       return src.str();
+}
+
+
+std::string ComputeShaderExecutor::generateComputeShader (const ShaderSpec& spec)
+{
+       if(spec.spirVShader)
+       {
+               bool    are16Bit        = false;
+               bool    isMediump       = false;
+               for (vector<Symbol>::const_iterator symIter = spec.inputs.begin(); symIter != spec.inputs.end(); ++symIter)
+               {
+                       if (glu::isDataTypeFloat16OrVec(symIter->varType.getBasicType()))
+                               are16Bit = true;
+
+                       if (symIter->varType.getPrecision() == glu::PRECISION_MEDIUMP)
+                               isMediump = true;
+
+                       if(isMediump && are16Bit)
+                               break;
+               }
+
+               return generateSpirv(spec, are16Bit, isMediump);
+       }
+       else
+       {
+               std::ostringstream src;
+               src << glu::getGLSLVersionDeclaration(spec.glslVersion) << "\n";
+
+               if (!spec.globalDeclarations.empty())
+                       src << spec.globalDeclarations << "\n";
+
+               src << "layout(local_size_x = 1) in;\n"
+                       << "\n";
+
+               declareBufferBlocks(src, spec);
+
+               src << "void main (void)\n"
+                       << "{\n"
+                       << "    uint invocationNdx = gl_NumWorkGroups.x*gl_NumWorkGroups.y*gl_WorkGroupID.z\n"
+                       << "                       + gl_NumWorkGroups.x*gl_WorkGroupID.y + gl_WorkGroupID.x;\n";
+
+               generateExecBufferIo(src, spec, "invocationNdx");
+
+               src << "}\n";
+
+               return src.str();
+       }
+}
+
 void ComputeShaderExecutor::generateSources (const ShaderSpec& shaderSpec, SourceCollections& programCollection)
 {
-       programCollection.glslSources.add("compute") << glu::ComputeSource(generateComputeShader(shaderSpec)) << shaderSpec.buildOptions;
+       if(shaderSpec.spirVShader)
+               programCollection.spirvAsmSources.add("compute") << SpirVAsmBuildOptions(programCollection.usedVulkanVersion, SPIRV_VERSION_1_3) << generateComputeShader(shaderSpec);
+       else
+               programCollection.glslSources.add("compute") << glu::ComputeSource(generateComputeShader(shaderSpec)) << shaderSpec.buildOptions;
 }
 
 void ComputeShaderExecutor::execute (int numValues, const void* const* inputs, void* const* outputs, VkDescriptorSet extraResources)
@@ -1893,7 +2502,7 @@ void ComputeShaderExecutor::execute (int numValues, const void* const* inputs, v
 static std::string generateVertexShaderForTess (void)
 {
        std::ostringstream      src;
-       src << "#version 310 es\n"
+       src << "#version 450\n"
                << "void main (void)\n{\n"
                << "    gl_Position = vec4(gl_VertexIndex/2, gl_VertexIndex%2, 0.0, 1.0);\n"
                << "}\n";
@@ -2300,7 +2909,7 @@ static std::string generateEmptyTessEvalShader ()
 {
        std::ostringstream src;
 
-       src << "#version 310 es\n"
+       src << "#version 450\n"
                   "#extension GL_EXT_tessellation_shader : require\n\n";
 
        src << "layout(triangles, ccw) in;\n";
@@ -2364,7 +2973,7 @@ static std::string generatePassthroughTessControlShader (void)
 {
        std::ostringstream src;
 
-       src << "#version 310 es\n"
+       src << "#version 450\n"
                   "#extension GL_EXT_tessellation_shader : require\n\n";
 
        src << "layout(vertices = 1) out;\n\n";
@@ -2444,6 +3053,33 @@ ShaderExecutor::~ShaderExecutor (void)
 {
 }
 
+bool ShaderExecutor::areInputs16Bit (void) const
+{
+       for (vector<Symbol>::const_iterator symIter = m_shaderSpec.inputs.begin(); symIter != m_shaderSpec.inputs.end(); ++symIter)
+       {
+               if (glu::isDataTypeFloat16OrVec(symIter->varType.getBasicType()))
+                       return true;
+       }
+       return false;
+}
+
+bool ShaderExecutor::areOutputs16Bit (void) const
+{
+       for (vector<Symbol>::const_iterator symIter = m_shaderSpec.outputs.begin(); symIter != m_shaderSpec.outputs.end(); ++symIter)
+       {
+               if (glu::isDataTypeFloat16OrVec(symIter->varType.getBasicType()))
+                       return true;
+       }
+       return false;
+}
+
+bool ShaderExecutor::isOutput16Bit (const size_t ndx) const
+{
+       if (glu::isDataTypeFloat16OrVec(m_shaderSpec.outputs[ndx].varType.getBasicType()))
+               return true;
+       return false;
+}
+
 // Utilities
 
 void generateSources (glu::ShaderType shaderType, const ShaderSpec& shaderSpec, vk::SourceCollections& dst)
index 2eee615..9abdc99 100644 (file)
@@ -56,9 +56,13 @@ struct ShaderSpec
        std::string                             globalDeclarations;     //!< These are placed into global scope. Can contain uniform declarations for example.
        std::string                             source;                         //!< Source snippet to be executed.
        vk::ShaderBuildOptions  buildOptions;
+       bool                                    packFloat16Bit;
+       bool                                    spirVShader;
 
        ShaderSpec (void)
-               : glslVersion(glu::GLSL_VERSION_310_ES)
+               : glslVersion           (glu::GLSL_VERSION_450)
+               , packFloat16Bit        (false)
+               , spirVShader           (false)
        {}
 };
 
@@ -76,6 +80,10 @@ public:
 
        //! Execute
        virtual void                    execute                         (int numValues, const void* const* inputs, void* const* outputs, vk::VkDescriptorSet extraResources = (vk::VkDescriptorSet)0) = 0;
+       bool                                    areInputs16Bit          (void) const;
+       bool                                    areOutputs16Bit         (void) const;
+       bool                                    isOutput16Bit           (const size_t ndx) const;
+       bool                                    isSpirVShader           (void) {return m_shaderSpec.spirVShader;}
 
 protected:
                                                        ShaderExecutor          (Context& context, const ShaderSpec& shaderSpec)
index 31776f6..9f53b27 100644 (file)
@@ -348,6 +348,7 @@ public:
                scalarBlockLayoutFeatures.sType                 = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT;
                float16Int8Features.sType                               = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR;
 
+
                if (isPhysicalDeviceFeatures2Supported(apiVersion, instanceExtensions))
                {
                        void** nextPtr = &coreFeatures.pNext;
index 4b43bf3..6f0c4be 100644 (file)
@@ -246656,6 +246656,14 @@ dEQP-VK.glsl.builtin.function.pack_unpack.packhalf2x16_geometry
 dEQP-VK.glsl.builtin.function.pack_unpack.packhalf2x16_compute
 dEQP-VK.glsl.builtin.function.pack_unpack.unpackhalf2x16_geometry
 dEQP-VK.glsl.builtin.function.pack_unpack.unpackhalf2x16_compute
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.scalar
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec2
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec3
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec4
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.scalar
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec2
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec3
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec4
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.scalar
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.vec2
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.vec3
@@ -247094,6 +247102,515 @@ dEQP-VK.glsl.builtin.precision.fma.highp_compute.scalar
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec2
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec3
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.modf.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cross.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.determinant.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inverse.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.modf.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cross.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.determinant.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inverse.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec4
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.sampler2d
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.samplercube
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.sampler2darray
index 498b2be..a97c6af 100644 (file)
@@ -246618,6 +246618,14 @@ dEQP-VK.glsl.builtin.function.pack_unpack.packhalf2x16_geometry
 dEQP-VK.glsl.builtin.function.pack_unpack.packhalf2x16_compute
 dEQP-VK.glsl.builtin.function.pack_unpack.unpackhalf2x16_geometry
 dEQP-VK.glsl.builtin.function.pack_unpack.unpackhalf2x16_compute
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.scalar
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec2
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec3
+dEQP-VK.glsl.builtin.precision.comparison.mediump_compute.vec4
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.scalar
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec2
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec3
+dEQP-VK.glsl.builtin.precision.comparison.highp_compute.vec4
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.scalar
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.vec2
 dEQP-VK.glsl.builtin.precision.add.mediump_compute.vec3
@@ -247056,6 +247064,515 @@ dEQP-VK.glsl.builtin.precision.fma.highp_compute.scalar
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec2
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec3
 dEQP-VK.glsl.builtin.precision.fma.highp_compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.comparison.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.add.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sub.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mul.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.div.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.radians.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.degrees.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.tanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.asinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.acosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.atanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.pow.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.exp2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.log2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inversesqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.abs.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.sign.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.floor.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.trunc.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.round.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.roundeven.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ceil.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.modf.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.min.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.max.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.clamp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.mix.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.step.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.smoothstep.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.length.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.distance.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.dot.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.cross.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.normalize.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.faceforward.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.reflect.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.refract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.outerproduct.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.transpose.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.determinant.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.inverse.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.frexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.ldexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage16b.fma.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.comparison.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.add.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sub.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mul.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.div.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.radians.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.degrees.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asin.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acos.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atan.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.tanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.asinh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.acosh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.atanh.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.pow.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.exp2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.log2.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inversesqrt.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.abs.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.sign.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.floor.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.trunc.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.round.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.roundeven.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ceil.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.modf.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.min.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.max.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.clamp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.mix.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.step.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.smoothstep.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.length.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.distance.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.dot.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.cross.compute
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.normalize.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.faceforward.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.reflect.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.refract.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.matrixcompmult.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.outerproduct.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat2x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat3x4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4x2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4x3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.transpose.compute.mat4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.determinant.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.inverse.compute.mat2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.frexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.ldexp.fragment.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.compute.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.vertex.vec4
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.scalar
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec2
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec3
+dEQP-VK.glsl.builtin.precision_fp16_storage32b.fma.fragment.vec4
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.sampler2d
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.samplercube
 dEQP-VK.glsl.opaque_type_indexing.sampler.const_literal.vertex.sampler2darray
index 872e733..08254b8 100644 (file)
@@ -189,7 +189,7 @@ Interval FloatFormat::convert (const Interval& x) const
 
        // Round both bounds _inwards_ to closest representable values.
        if (!tmp.empty())
-               ret |= clampValue(round(tmp.lo(), true)) | clampValue(round(tmp.hi(), false));
+               ret |= clampValue(round(tmp.lo(), false)) | clampValue(round(tmp.hi(), true));
 
        // If this format's precision is not exact, the (possibly out-of-bounds)
        // original value is also a possible result.
index a7eea9e..66f23f6 100644 (file)
@@ -24,7 +24,6 @@
  *//*--------------------------------------------------------------------*/
 
 #include "tcuDefs.hpp"
-
 #include "tcuInterval.hpp"
 
 #include <string>
index 878b366..aebfaaf 100644 (file)
@@ -505,6 +505,23 @@ typedef Matrix<float, 2, 4>        Mat4x2;
 typedef Matrix<float, 3, 4>    Mat4x3;
 typedef Matrix4f                       Mat4;
 
+//using tcu::Matrix;
+// Common typedefs 16Bit.
+typedef Matrix<deUint16, 2, 2> Matrix2f16b;
+typedef Matrix<deUint16, 3, 3> Matrix3f16b;
+typedef Matrix<deUint16, 4, 4> Matrix4f16b;
+
+// GLSL-style naming \note CxR.
+typedef Matrix2f16b                            Mat2_16b;
+typedef Matrix<deUint16, 3, 2> Mat2x3_16b;
+typedef Matrix<deUint16, 4, 2> Mat2x4_16b;
+typedef Matrix<deUint16, 2, 3> Mat3x2_16b;
+typedef Matrix3f16b                            Mat3_16b;
+typedef Matrix<deUint16, 4, 3> Mat3x4_16b;
+typedef Matrix<deUint16, 2, 4> Mat4x2_16b;
+typedef Matrix<deUint16, 3, 4> Mat4x3_16b;
+typedef Matrix4f16b                            Mat4_16b;
+
 // Matrix-scalar operators.
 
 template <typename T, int Rows, int Cols>
index 7b10edb..f9ea13e 100644 (file)
@@ -39,7 +39,8 @@ DE_BEGIN_EXTERN_C
 #define DE_LOG2_E              1.44269504088896340736f /*!< log_2(e).                          */
 #define DE_INV_LOG2_E  0.69314718055994530942f /*!< 1.0 / log_2(e).            */
 
-#define DE_PI_DOUBLE   3.14159265358979323846  /*!< Pi as a double.            */
+#define DE_PI_DOUBLE   3.14159265358979323846  /*!< Pi as a double.            */
+#define DE_PI_16BIT            0x4248                                  /*!< Pi. as a float16b          */
 
 /* Rounding mode control. */
 
index bf1111d..abd7cd9 100644 (file)
@@ -295,6 +295,15 @@ const char* getDataTypeName (DataType dataType)
                "f16vec2",
                "f16vec3",
                "f16vec4",
+               "f16mat2",
+               "f16mat2x3",
+               "f16mat2x4",
+               "f16mat3x2",
+               "f16mat3",
+               "f16mat3x4",
+               "f16mat4x2",
+               "f16mat4x3",
+               "f16mat4",
        };
 
        DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(s_names) == TYPE_LAST);
@@ -420,6 +429,15 @@ int getDataTypeScalarSize (DataType dataType)
                2,              // f16vec2
                3,              // f16vec3
                4,              // f16vec4
+               4,              // f16mat2
+               6,              // f16mat2x3
+               8,              // f16mat2x4
+               6,              // f16mat3x2
+               9,              // f16mat3
+               12,             // f16mat3x4
+               8,              // f16mat4x2
+               12,             // f16mat4x3
+               16,             // f16mat4
        };
 
        DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(s_sizes) == TYPE_LAST);
@@ -545,6 +563,15 @@ DataType getDataTypeScalarType (DataType dataType)
                TYPE_FLOAT16,                                                   // f16vec2
                TYPE_FLOAT16,                                                   // f16vec3
                TYPE_FLOAT16,                                                   // f16vec4
+               TYPE_FLOAT16,                                                   // f16mat2
+               TYPE_FLOAT16,                                                   // f16mat2x3
+               TYPE_FLOAT16,                                                   // f16mat2x4
+               TYPE_FLOAT16,                                                   // f16mat3x2
+               TYPE_FLOAT16,                                                   // f16mat3
+               TYPE_FLOAT16,                                                   // f16mat3x4
+               TYPE_FLOAT16,                                                   // f16mat4x2
+               TYPE_FLOAT16,                                                   // f16mat4x3
+               TYPE_FLOAT16,                                                   // f16mat4
        };
 
        DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(s_scalarTypes) == TYPE_LAST);
@@ -552,6 +579,140 @@ DataType getDataTypeScalarType (DataType dataType)
        return s_scalarTypes[(int)dataType];
 }
 
+DataType getDataTypeFloat16Scalars (DataType dataType)
+{
+       static const DataType s_floatTypes[] =
+       {
+               TYPE_INVALID,                   // invalid
+               TYPE_FLOAT16,                   // float
+               TYPE_FLOAT16_VEC2,              // vec2
+               TYPE_FLOAT16_VEC3,              // vec3
+               TYPE_FLOAT16_VEC4,              // vec4
+               TYPE_FLOAT16_MAT2,              // mat2
+               TYPE_FLOAT16_MAT2X3,    // mat2x3
+               TYPE_FLOAT16_MAT2X4,    // mat2x4
+               TYPE_FLOAT16_MAT3X2,    // mat3x2
+               TYPE_FLOAT16_MAT3,              // mat3
+               TYPE_FLOAT16_MAT3X4,    // mat3x4
+               TYPE_FLOAT16_MAT4X2,    // mat4x2
+               TYPE_FLOAT16_MAT4X3,    // mat4x3
+               TYPE_FLOAT16_MAT4,              // mat4
+               TYPE_FLOAT16,                   // double
+               TYPE_FLOAT16_VEC2,              // dvec2
+               TYPE_FLOAT16_VEC3,              // dvec3
+               TYPE_FLOAT16_VEC4,              // dvec4
+               TYPE_FLOAT16_MAT2,              // dmat2
+               TYPE_FLOAT16_MAT2X3,    // dmat2x3
+               TYPE_FLOAT16_MAT2X4,    // dmat2x4
+               TYPE_FLOAT16_MAT3X2,    // dmat3x2
+               TYPE_FLOAT16_MAT3,              // dmat3
+               TYPE_FLOAT16_MAT3X4,    // dmat3x4
+               TYPE_FLOAT16_MAT4X2,    // dmat4x2
+               TYPE_FLOAT16_MAT4X3,    // dmat4x3
+               TYPE_FLOAT16_MAT4,              // dmat4
+               TYPE_FLOAT16,                   // int
+               TYPE_FLOAT16_VEC2,              // ivec2
+               TYPE_FLOAT16_VEC3,              // ivec3
+               TYPE_FLOAT16_VEC4,              // ivec4
+               TYPE_FLOAT16,                   // uint
+               TYPE_FLOAT16_VEC2,              // uvec2
+               TYPE_FLOAT16_VEC3,              // uvec3
+               TYPE_FLOAT16_VEC4,              // uvec4
+               TYPE_FLOAT16,                   // bool
+               TYPE_FLOAT16_VEC2,              // bvec2
+               TYPE_FLOAT16_VEC3,              // bvec3
+               TYPE_FLOAT16_VEC4,              // bvec4
+               TYPE_INVALID,                   // sampler1D
+               TYPE_INVALID,                   // sampler2D
+               TYPE_INVALID,                   // samplerCube
+               TYPE_INVALID,                   // sampler1DArray
+               TYPE_INVALID,                   // sampler2DArray
+               TYPE_INVALID,                   // sampler3D
+               TYPE_INVALID,                   // samplerCubeArray
+               TYPE_INVALID,                   // sampler1DShadow
+               TYPE_INVALID,                   // sampler2DShadow
+               TYPE_INVALID,                   // samplerCubeShadow
+               TYPE_INVALID,                   // sampler1DArrayShadow
+               TYPE_INVALID,                   // sampler2DArrayShadow
+               TYPE_INVALID,                   // samplerCubeArrayShadow
+               TYPE_INVALID,                   // isampler1D
+               TYPE_INVALID,                   // isampler2D
+               TYPE_INVALID,                   // isamplerCube
+               TYPE_INVALID,                   // isampler1DArray
+               TYPE_INVALID,                   // isampler2DArray
+               TYPE_INVALID,                   // isampler3D
+               TYPE_INVALID,                   // isamplerCubeArray
+               TYPE_INVALID,                   // usampler1D
+               TYPE_INVALID,                   // usampler2D
+               TYPE_INVALID,                   // usamplerCube
+               TYPE_INVALID,                   // usampler1DArray
+               TYPE_INVALID,                   // usampler2DArray
+               TYPE_INVALID,                   // usampler3D
+               TYPE_INVALID,                   // usamplerCubeArray
+               TYPE_INVALID,                   // sampler2DMS
+               TYPE_INVALID,                   // isampler2DMS
+               TYPE_INVALID,                   // usampler2DMS
+               TYPE_INVALID,                   // image2D
+               TYPE_INVALID,                   // imageCube
+               TYPE_INVALID,                   // image2DArray
+               TYPE_INVALID,                   // image3D
+               TYPE_INVALID,                   // imageCubeArray
+               TYPE_INVALID,                   // iimage2D
+               TYPE_INVALID,                   // iimageCube
+               TYPE_INVALID,                   // iimage2DArray
+               TYPE_INVALID,                   // iimage3D
+               TYPE_INVALID,                   // iimageCubeArray
+               TYPE_INVALID,                   // uimage2D
+               TYPE_INVALID,                   // uimageCube
+               TYPE_INVALID,                   // uimage2DArray
+               TYPE_INVALID,                   // uimage3D
+               TYPE_INVALID,                   // uimageCubeArray
+               TYPE_INVALID,                   // atomic_uint
+               TYPE_INVALID,                   // samplerBuffer
+               TYPE_INVALID,                   // isamplerBuffer
+               TYPE_INVALID,                   // usamplerBuffer
+               TYPE_INVALID,                   // sampler2DMSArray
+               TYPE_INVALID,                   // isampler2DMSArray
+               TYPE_INVALID,                   // usampler2DMSArray
+               TYPE_INVALID,                   // imageBuffer
+               TYPE_INVALID,                   // iimageBuffer
+               TYPE_INVALID,                   // uimageBuffer
+               TYPE_FLOAT16,                   // uint8_t
+               TYPE_FLOAT16_VEC2,              // u8vec2
+               TYPE_FLOAT16_VEC3,              // u8vec3
+               TYPE_FLOAT16_VEC4,              // u8vec4
+               TYPE_FLOAT16,                   // int8_t
+               TYPE_FLOAT16_VEC2,              // i8vec2
+               TYPE_FLOAT16_VEC3,              // i8vec3
+               TYPE_FLOAT16_VEC4,              // i8vec4
+               TYPE_FLOAT16,                   // uint16_t
+               TYPE_FLOAT16_VEC2,              // u16vec2
+               TYPE_FLOAT16_VEC3,              // u16vec3
+               TYPE_FLOAT16_VEC4,              // u16vec4
+               TYPE_FLOAT16,                   // int16_t
+               TYPE_FLOAT16_VEC2,              // i16vec2
+               TYPE_FLOAT16_VEC3,              // i16vec3
+               TYPE_FLOAT16_VEC4,              // i16vec4
+               TYPE_FLOAT16,                   // float16_t
+               TYPE_FLOAT16_VEC2,              // f16vec2
+               TYPE_FLOAT16_VEC3,              // f16vec3
+               TYPE_FLOAT16_VEC4,              // f16vec4
+               TYPE_FLOAT16_MAT2,              // f16mat2
+               TYPE_FLOAT16_MAT2X3,    // f16mat2x3
+               TYPE_FLOAT16_MAT2X4,    // f16mat2x4
+               TYPE_FLOAT16_MAT3X2,    // f16mat3x2
+               TYPE_FLOAT16_MAT3,              // f16mat3
+               TYPE_FLOAT16_MAT3X4,    // f16mat3x4
+               TYPE_FLOAT16_MAT4X2,    // f16mat4x2
+               TYPE_FLOAT16_MAT4X3,    // f16mat4x3
+               TYPE_FLOAT16_MAT4,              // f16mat4
+       };
+
+       DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(s_floatTypes) == TYPE_LAST);
+       DE_ASSERT(deInBounds32((int)dataType, 0, DE_LENGTH_OF_ARRAY(s_floatTypes)));
+       return s_floatTypes[(int)dataType];
+}
+
 DataType getDataTypeFloatScalars (DataType dataType)
 {
        static const DataType s_floatTypes[] =
@@ -670,6 +831,15 @@ DataType getDataTypeFloatScalars (DataType dataType)
                TYPE_FLOAT_VEC2,        // f16vec2
                TYPE_FLOAT_VEC3,        // f16vec3
                TYPE_FLOAT_VEC4,        // f16vec4
+               TYPE_FLOAT_MAT2,        // f16mat2
+               TYPE_FLOAT_MAT2X3,      // f16mat2x3
+               TYPE_FLOAT_MAT2X4,      // f16mat2x4
+               TYPE_FLOAT_MAT3X2,      // f16mat3x2
+               TYPE_FLOAT_MAT3,        // f16mat3
+               TYPE_FLOAT_MAT3X4,      // f16mat3x4
+               TYPE_FLOAT_MAT4X2,      // f16mat4x2
+               TYPE_FLOAT_MAT4X3,      // f16mat4x3
+               TYPE_FLOAT_MAT4,        // f16mat4
        };
 
        DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(s_floatTypes) == TYPE_LAST);
@@ -795,6 +965,15 @@ DataType getDataTypeDoubleScalars (DataType dataType)
                TYPE_DOUBLE_VEC2,       // f16vec2
                TYPE_DOUBLE_VEC3,       // f16vec3
                TYPE_DOUBLE_VEC4,       // f16vec4
+               TYPE_DOUBLE_MAT2,       // f16mat2
+               TYPE_DOUBLE_MAT2X3,     // f16mat2x3
+               TYPE_DOUBLE_MAT2X4,     // f16mat2x4
+               TYPE_DOUBLE_MAT3X2,     // f16mat3x2
+               TYPE_DOUBLE_MAT3,       // f16mat3
+               TYPE_DOUBLE_MAT3X4,     // f16mat3x4
+               TYPE_DOUBLE_MAT4X2,     // f16mat4x2
+               TYPE_DOUBLE_MAT4X3,     // f16mat4x3
+               TYPE_DOUBLE_MAT4,       // f16mat4
        };
 
        DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(s_doubleTypes) == TYPE_LAST);
@@ -871,6 +1050,15 @@ int getDataTypeMatrixNumRows (DataType dataType)
                case TYPE_DOUBLE_MAT4X2:        return 2;
                case TYPE_DOUBLE_MAT4X3:        return 3;
                case TYPE_DOUBLE_MAT4:          return 4;
+               case TYPE_FLOAT16_MAT2:         return 2;
+               case TYPE_FLOAT16_MAT2X3:       return 3;
+               case TYPE_FLOAT16_MAT2X4:       return 4;
+               case TYPE_FLOAT16_MAT3X2:       return 2;
+               case TYPE_FLOAT16_MAT3:         return 3;
+               case TYPE_FLOAT16_MAT3X4:       return 4;
+               case TYPE_FLOAT16_MAT4X2:       return 2;
+               case TYPE_FLOAT16_MAT4X3:       return 3;
+               case TYPE_FLOAT16_MAT4:         return 4;
                default:
                        DE_ASSERT(false);
                        return 0;
@@ -899,6 +1087,15 @@ int getDataTypeMatrixNumColumns (DataType dataType)
                case TYPE_DOUBLE_MAT4X2:        return 4;
                case TYPE_DOUBLE_MAT4X3:        return 4;
                case TYPE_DOUBLE_MAT4:          return 4;
+               case TYPE_FLOAT16_MAT2:         return 2;
+               case TYPE_FLOAT16_MAT2X3:       return 2;
+               case TYPE_FLOAT16_MAT2X4:       return 2;
+               case TYPE_FLOAT16_MAT3X2:       return 3;
+               case TYPE_FLOAT16_MAT3:         return 3;
+               case TYPE_FLOAT16_MAT3X4:       return 3;
+               case TYPE_FLOAT16_MAT4X2:       return 4;
+               case TYPE_FLOAT16_MAT4X3:       return 4;
+               case TYPE_FLOAT16_MAT4:         return 4;
                default:
                        DE_ASSERT(false);
                        return 0;
index 0f245e0..bc14152 100644 (file)
@@ -233,6 +233,15 @@ enum DataType
        TYPE_FLOAT16_VEC2,
        TYPE_FLOAT16_VEC3,
        TYPE_FLOAT16_VEC4,
+       TYPE_FLOAT16_MAT2,
+       TYPE_FLOAT16_MAT2X3,
+       TYPE_FLOAT16_MAT2X4,
+       TYPE_FLOAT16_MAT3X2,
+       TYPE_FLOAT16_MAT3,
+       TYPE_FLOAT16_MAT3X4,
+       TYPE_FLOAT16_MAT4X2,
+       TYPE_FLOAT16_MAT4X3,
+       TYPE_FLOAT16_MAT4,
 
        TYPE_LAST
 };
@@ -240,6 +249,7 @@ enum DataType
 const char*            getDataTypeName                         (DataType dataType);
 int                            getDataTypeScalarSize           (DataType dataType);
 DataType               getDataTypeScalarType           (DataType dataType);
+DataType               getDataTypeFloat16Scalars       (DataType dataType);
 DataType               getDataTypeFloatScalars         (DataType dataType);
 DataType               getDataTypeDoubleScalars        (DataType dataType);
 DataType               getDataTypeVector                       (DataType scalarType, int size);
@@ -250,24 +260,74 @@ DataType          getDataTypeBoolVec                      (int vecSize);
 DataType               getDataTypeMatrix                       (int numCols, int numRows);
 DataType               getDataTypeFromGLType           (deUint32 glType);
 
-inline bool            isDataTypeFloatOrVec            (DataType dataType)     { return (dataType >= TYPE_FLOAT)      && (dataType <= TYPE_FLOAT_VEC4);   }
-inline bool            isDataTypeDoubleOrDVec          (DataType dataType)     { return (dataType >= TYPE_DOUBLE)     && (dataType <= TYPE_DOUBLE_VEC4);  }
-inline bool            isDataTypeMatrix                        (DataType dataType)     { return ((dataType >= TYPE_FLOAT_MAT2) && (dataType <= TYPE_FLOAT_MAT4)) || ((dataType >= TYPE_DOUBLE_MAT2) && (dataType <= TYPE_DOUBLE_MAT4));  }
-inline bool            isDataTypeIntOrIVec                     (DataType dataType)     { return (dataType >= TYPE_INT)        && (dataType <= TYPE_INT_VEC4);     }
-inline bool            isDataTypeUintOrUVec            (DataType dataType)     { return (dataType >= TYPE_UINT)       && (dataType <= TYPE_UINT_VEC4);    }
-inline bool            isDataTypeBoolOrBVec            (DataType dataType)     { return (dataType >= TYPE_BOOL)       && (dataType <= TYPE_BOOL_VEC4);    }
-inline bool            isDataTypeScalar                        (DataType dataType) { return (dataType == TYPE_FLOAT) || (dataType == TYPE_DOUBLE) ||(dataType == TYPE_INT) || (dataType == TYPE_UINT) || (dataType == TYPE_BOOL) || (dataType == TYPE_UINT8) || (dataType == TYPE_INT8) || (dataType == TYPE_UINT16) || (dataType == TYPE_INT16) || (dataType == TYPE_FLOAT16); }
-inline bool            isDataTypeVector                        (DataType dataType) { return deInRange32(dataType, TYPE_FLOAT_VEC2, TYPE_FLOAT_VEC4) || deInRange32(dataType, TYPE_DOUBLE_VEC2, TYPE_DOUBLE_VEC4) || deInRange32(dataType, TYPE_INT_VEC2, TYPE_INT_VEC4) || deInRange32(dataType, TYPE_UINT_VEC2, TYPE_UINT_VEC4) || deInRange32(dataType, TYPE_BOOL_VEC2, TYPE_BOOL_VEC4) || deInRange32(dataType, TYPE_UINT8_VEC2, TYPE_UINT8_VEC4) || deInRange32(dataType, TYPE_INT8_VEC2, TYPE_INT8_VEC4) || deInRange32(dataType, TYPE_UINT16_VEC2, TYPE_UINT16_VEC4) || deInRange32(dataType, TYPE_INT16_VEC2, TYPE_INT16_VEC4) || deInRange32(dataType, TYPE_FLOAT16_VEC2, TYPE_FLOAT16_VEC4); }
-inline bool            isDataTypeScalarOrVector        (DataType dataType) { return deInRange32(dataType, TYPE_FLOAT, TYPE_FLOAT_VEC4) || deInRange32(dataType, TYPE_DOUBLE, TYPE_DOUBLE_VEC4) || deInRange32(dataType, TYPE_INT, TYPE_INT_VEC4) || deInRange32(dataType, TYPE_UINT, TYPE_UINT_VEC4) || deInRange32(dataType, TYPE_BOOL, TYPE_BOOL_VEC4) || deInRange32(dataType, TYPE_UINT8, TYPE_UINT8_VEC4) || deInRange32(dataType, TYPE_INT8, TYPE_INT8_VEC4) || deInRange32(dataType, TYPE_UINT16, TYPE_UINT16_VEC4) || deInRange32(dataType, TYPE_INT16, TYPE_INT16_VEC4) || deInRange32(dataType, TYPE_FLOAT16, TYPE_FLOAT16_VEC4); }
-inline bool            isDataTypeSampler                       (DataType dataType)     { return (dataType >= TYPE_SAMPLER_1D) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE); }
-inline bool            isDataTypeImage                         (DataType dataType)     { return (dataType >= TYPE_IMAGE_2D) && (dataType <= TYPE_UINT_IMAGE_3D); }
-inline bool            isDataTypeSamplerMultisample(DataType dataType) { return (dataType >= TYPE_SAMPLER_2D_MULTISAMPLE) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE); }
-inline bool            isDataTypeAtomicCounter         (DataType dataType)     { return dataType == TYPE_UINT_ATOMIC_COUNTER; }
-inline bool            isDataTypeSamplerBuffer         (DataType dataType)     { return (dataType >= TYPE_SAMPLER_BUFFER) && (dataType <= TYPE_UINT_SAMPLER_BUFFER); }
-inline bool            isDataTypeSamplerMSArray        (DataType dataType)     { return (dataType >= TYPE_SAMPLER_2D_MULTISAMPLE_ARRAY) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE_ARRAY); }
-inline bool            isDataTypeImageBuffer           (DataType dataType)     { return (dataType >= TYPE_IMAGE_BUFFER) && (dataType <= TYPE_UINT_IMAGE_BUFFER); }
-inline bool            isDataTypeExplicitPrecision     (DataType dataType)     { return deInRange32(dataType, TYPE_UINT8, TYPE_UINT8_VEC4) || deInRange32(dataType, TYPE_INT8, TYPE_INT8_VEC4) || deInRange32(dataType, TYPE_UINT16, TYPE_UINT16_VEC4) || deInRange32(dataType, TYPE_INT16, TYPE_INT16_VEC4) || deInRange32(dataType, TYPE_FLOAT16, TYPE_FLOAT16_VEC4); }
-inline bool            dataTypeSupportsPrecisionModifier(DataType dataType)    { return !isDataTypeBoolOrBVec(dataType) && !isDataTypeExplicitPrecision(dataType);    }
+inline bool            isDataTypeFloat16OrVec                          (DataType dataType)     { return (dataType >= TYPE_FLOAT16)    && (dataType <= TYPE_FLOAT16_MAT4); }
+inline bool            isDataTypeFloatOrVec                            (DataType dataType)     { return (dataType >= TYPE_FLOAT)      && (dataType <= TYPE_FLOAT_VEC4);   }
+inline bool            isDataTypeFloatType                                     (DataType dataType)     { return (dataType >= TYPE_FLOAT)      && (dataType <= TYPE_FLOAT_MAT4);   }
+inline bool            isDataTypeDoubleOrDVec                          (DataType dataType)     { return (dataType >= TYPE_DOUBLE)     && (dataType <= TYPE_DOUBLE_VEC4);  }
+inline bool            isDataTypeMatrix                                        (DataType dataType)     {
+                                                                                                                                                       return ((dataType >= TYPE_FLOAT_MAT2) && (dataType <= TYPE_FLOAT_MAT4))
+                                                                                                                                                               || ((dataType >= TYPE_DOUBLE_MAT2) && (dataType <= TYPE_DOUBLE_MAT4))
+                                                                                                                                                               || ((dataType >= TYPE_FLOAT16_MAT2) && (dataType <= TYPE_FLOAT16_MAT4))
+                                                                                                                                                               ;
+                                                                                                                                               }
+inline bool            isDataTypeIntOrIVec                                     (DataType dataType)     { return (dataType >= TYPE_INT)        && (dataType <= TYPE_INT_VEC4);     }
+inline bool            isDataTypeUintOrUVec                            (DataType dataType)     { return (dataType >= TYPE_UINT)       && (dataType <= TYPE_UINT_VEC4);    }
+inline bool            isDataTypeBoolOrBVec                            (DataType dataType)     { return (dataType >= TYPE_BOOL)       && (dataType <= TYPE_BOOL_VEC4);    }
+inline bool            isDataTypeScalar                                        (DataType dataType) {
+                                                                                                                                                       return (dataType == TYPE_FLOAT)
+                                                                                                                                                               || (dataType == TYPE_DOUBLE)
+                                                                                                                                                               || (dataType == TYPE_INT)
+                                                                                                                                                               || (dataType == TYPE_UINT)
+                                                                                                                                                               || (dataType == TYPE_BOOL)
+                                                                                                                                                               || (dataType == TYPE_UINT8)
+                                                                                                                                                               || (dataType == TYPE_INT8)
+                                                                                                                                                               || (dataType == TYPE_UINT16)
+                                                                                                                                                               || (dataType == TYPE_INT16)
+                                                                                                                                                               || (dataType == TYPE_FLOAT16)
+                                                                                                                                                               ;
+                                                                                                                                               }
+inline bool            isDataTypeVector                                        (DataType dataType) {
+                                                                                                                                                       return deInRange32(dataType, TYPE_FLOAT_VEC2, TYPE_FLOAT_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_DOUBLE_VEC2, TYPE_DOUBLE_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT_VEC2, TYPE_INT_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_UINT_VEC2, TYPE_UINT_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_BOOL_VEC2, TYPE_BOOL_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_UINT8_VEC2, TYPE_UINT8_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT8_VEC2, TYPE_INT8_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_UINT16_VEC2, TYPE_UINT16_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT16_VEC2, TYPE_INT16_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_FLOAT16_VEC2, TYPE_FLOAT16_VEC4)
+                                                                                                                                                               ;
+                                                                                                                                               }
+inline bool            isDataTypeScalarOrVector                        (DataType dataType) {
+                                                                                                                                                       return deInRange32(dataType, TYPE_FLOAT, TYPE_FLOAT_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_DOUBLE, TYPE_DOUBLE_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT, TYPE_INT_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_UINT, TYPE_UINT_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_BOOL, TYPE_BOOL_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_UINT8, TYPE_UINT8_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT8, TYPE_INT8_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_UINT16, TYPE_UINT16_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT16, TYPE_INT16_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_FLOAT16, TYPE_FLOAT16_VEC4)
+                                                                                                                                                               ;
+                                                                                                                                               }
+inline bool            isDataTypeSampler                                       (DataType dataType)     { return (dataType >= TYPE_SAMPLER_1D) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE); }
+inline bool            isDataTypeImage                                         (DataType dataType)     { return (dataType >= TYPE_IMAGE_2D) && (dataType <= TYPE_UINT_IMAGE_3D); }
+inline bool            isDataTypeSamplerMultisample            (DataType dataType)     { return (dataType >= TYPE_SAMPLER_2D_MULTISAMPLE) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE); }
+inline bool            isDataTypeAtomicCounter                         (DataType dataType)     { return dataType == TYPE_UINT_ATOMIC_COUNTER; }
+inline bool            isDataTypeSamplerBuffer                         (DataType dataType)     { return (dataType >= TYPE_SAMPLER_BUFFER) && (dataType <= TYPE_UINT_SAMPLER_BUFFER); }
+inline bool            isDataTypeSamplerMSArray                        (DataType dataType)     { return (dataType >= TYPE_SAMPLER_2D_MULTISAMPLE_ARRAY) && (dataType <= TYPE_UINT_SAMPLER_2D_MULTISAMPLE_ARRAY); }
+inline bool            isDataTypeImageBuffer                           (DataType dataType)     { return (dataType >= TYPE_IMAGE_BUFFER) && (dataType <= TYPE_UINT_IMAGE_BUFFER); }
+inline bool            isDataTypeExplicitPrecision                     (DataType dataType)     {
+                                                                                                                                                       return deInRange32(dataType, TYPE_UINT8, TYPE_UINT8_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT8, TYPE_INT8_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_UINT16, TYPE_UINT16_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_INT16, TYPE_INT16_VEC4)
+                                                                                                                                                               || deInRange32(dataType, TYPE_FLOAT16, TYPE_FLOAT16_VEC4)
+                                                                                                                                                               ;
+                                                                                                                                               }
+inline bool            dataTypeSupportsPrecisionModifier       (DataType dataType)     { return !isDataTypeBoolOrBVec(dataType) && !isDataTypeExplicitPrecision(dataType);    }
 
 int                            getDataTypeMatrixNumRows        (DataType dataType);
 int                            getDataTypeMatrixNumColumns     (DataType dataType);
@@ -278,19 +338,29 @@ int                               getDataTypeNumComponents        (DataType dataType);
 template <typename T>
 struct DataTypeTraits;
 
-template <> struct DataTypeTraits<float>               { enum { DATATYPE = TYPE_FLOAT                  }; };
-template <> struct DataTypeTraits<bool>                        { enum { DATATYPE = TYPE_BOOL                   }; };
-template <> struct DataTypeTraits<int>                 { enum { DATATYPE = TYPE_INT                    }; };
-template <> struct DataTypeTraits<deUint32>            { enum { DATATYPE = TYPE_UINT                   }; };
-template <> struct DataTypeTraits<tcu::Mat2>   { enum { DATATYPE = TYPE_FLOAT_MAT2             }; };
-template <> struct DataTypeTraits<tcu::Mat2x3> { enum { DATATYPE = TYPE_FLOAT_MAT2X3   }; };
-template <> struct DataTypeTraits<tcu::Mat2x4> { enum { DATATYPE = TYPE_FLOAT_MAT2X4   }; };
-template <> struct DataTypeTraits<tcu::Mat3x2> { enum { DATATYPE = TYPE_FLOAT_MAT3X2   }; };
-template <> struct DataTypeTraits<tcu::Mat3>   { enum { DATATYPE = TYPE_FLOAT_MAT3             }; };
-template <> struct DataTypeTraits<tcu::Mat3x4> { enum { DATATYPE = TYPE_FLOAT_MAT3X4   }; };
-template <> struct DataTypeTraits<tcu::Mat4x2> { enum { DATATYPE = TYPE_FLOAT_MAT4X2   }; };
-template <> struct DataTypeTraits<tcu::Mat4x3> { enum { DATATYPE = TYPE_FLOAT_MAT4X3   }; };
-template <> struct DataTypeTraits<tcu::Mat4>   { enum { DATATYPE = TYPE_FLOAT_MAT4             }; };
+template <> struct DataTypeTraits<deUint16>                    { enum { DATATYPE = TYPE_FLOAT16                        }; };
+template <> struct DataTypeTraits<float>                       { enum { DATATYPE = TYPE_FLOAT                          }; };
+template <> struct DataTypeTraits<bool>                                { enum { DATATYPE = TYPE_BOOL                           }; };
+template <> struct DataTypeTraits<int>                         { enum { DATATYPE = TYPE_INT                            }; };
+template <> struct DataTypeTraits<deUint32>                    { enum { DATATYPE = TYPE_UINT                           }; };
+template <> struct DataTypeTraits<tcu::Mat2>           { enum { DATATYPE = TYPE_FLOAT_MAT2                     }; };
+template <> struct DataTypeTraits<tcu::Mat2x3>         { enum { DATATYPE = TYPE_FLOAT_MAT2X3           }; };
+template <> struct DataTypeTraits<tcu::Mat2x4>         { enum { DATATYPE = TYPE_FLOAT_MAT2X4           }; };
+template <> struct DataTypeTraits<tcu::Mat3x2>         { enum { DATATYPE = TYPE_FLOAT_MAT3X2           }; };
+template <> struct DataTypeTraits<tcu::Mat3>           { enum { DATATYPE = TYPE_FLOAT_MAT3                     }; };
+template <> struct DataTypeTraits<tcu::Mat3x4>         { enum { DATATYPE = TYPE_FLOAT_MAT3X4           }; };
+template <> struct DataTypeTraits<tcu::Mat4x2>         { enum { DATATYPE = TYPE_FLOAT_MAT4X2           }; };
+template <> struct DataTypeTraits<tcu::Mat4x3>         { enum { DATATYPE = TYPE_FLOAT_MAT4X3           }; };
+template <> struct DataTypeTraits<tcu::Mat4>           { enum { DATATYPE = TYPE_FLOAT_MAT4                     }; };
+template <> struct DataTypeTraits<tcu::Mat2_16b>       { enum { DATATYPE = TYPE_FLOAT16_MAT2           }; };
+template <> struct DataTypeTraits<tcu::Mat2x3_16b>     { enum { DATATYPE = TYPE_FLOAT16_MAT2X3         }; };
+template <> struct DataTypeTraits<tcu::Mat2x4_16b>     { enum { DATATYPE = TYPE_FLOAT16_MAT2X4         }; };
+template <> struct DataTypeTraits<tcu::Mat3x2_16b>     { enum { DATATYPE = TYPE_FLOAT16_MAT3X2         }; };
+template <> struct DataTypeTraits<tcu::Mat3_16b>       { enum { DATATYPE = TYPE_FLOAT16_MAT3           }; };
+template <> struct DataTypeTraits<tcu::Mat3x4_16b>     { enum { DATATYPE = TYPE_FLOAT16_MAT3X4         }; };
+template <> struct DataTypeTraits<tcu::Mat4x2_16b>     { enum { DATATYPE = TYPE_FLOAT16_MAT4X2         }; };
+template <> struct DataTypeTraits<tcu::Mat4x3_16b>     { enum { DATATYPE = TYPE_FLOAT16_MAT4X3         }; };
+template <> struct DataTypeTraits<tcu::Mat4_16b>       { enum { DATATYPE = TYPE_FLOAT16_MAT4           }; };
 
 template <typename T, int Size>
 struct DataTypeTraits<tcu::Vector<T, Size> >
index fc7cd58..fcb2c9c 100644 (file)
@@ -370,8 +370,8 @@ std::ostream& operator<< (std::ostream& str, const DeclareVariable& decl)
 
        if (curType->isBasicType())
        {
-               if (curType->getPrecision() != PRECISION_LAST)
-                       str << glu::getPrecisionName(curType->getPrecision()) << " ";
+               if (curType->getPrecision() != PRECISION_LAST && !glu::isDataTypeFloat16OrVec(curType->getBasicType()))
+                               str << glu::getPrecisionName(curType->getPrecision()) << " ";
                str << glu::getDataTypeName(curType->getBasicType());
        }
        else if (curType->isStructType())
index 3a985cc..0b1af84 100644 (file)
@@ -307,6 +307,7 @@ enum DataType
        DATATYPE_BOOLEAN = 0,
        DATATYPE_INTEGER,
        DATATYPE_INTEGER64,
+       DATATYPE_FLOAT16,
        DATATYPE_FLOAT,
        DATATYPE_UNSIGNED_INTEGER,
        DATATYPE_INTEGER_VEC3,