Added tests for NMin, NMax and NClamp instructions
The NMin, NMax and NClamp instructions are not generated by glslang
nor tested by spriv-assembly.
Due to the fact that the vulkan spec allows implementations that do
not implement NaN handling, the tests have to be somewhat relaxed;
either the NaN is handled correctly, or NaNs are considered huge
values.
All three instructions return NaN in all cases if all parameters are
NaN.
NMin always returns the other value if paired with NaN: if NaNs are
handled, the instruction should pick the other value. If NaNs are
not handled, the other value will always be smaller.
NMax may return either the other value (if NaNs are handled), or NaN
(if NaNs are not handled).
NClamp is only defined if the min and max values are not NaN, so those
cases are not tested, except for the case where all three values are
NaN. If the clamped value is NaN, the result may either be the min
value (if NaNs are handled) or max value (if NaNs are not handled).
In addition to the NaN case testing, various random non-NaN values are
tested for all three instructions.
Affects:
dEQP-VK.spirv_assembly.instruction.compute.opnmin.all
dEQP-VK.spirv_assembly.instruction.compute.opnmax.all
dEQP-VK.spirv_assembly.instruction.compute.opnclamp.all
Components: Vulkan
VK-GL-CTS issue: 171
Change-Id: I59e884d51dac4eee047af2e52eebee3318e57776