mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 08:19:02 +00:00
Fix floating point validation in write_image tests (#1017)
Fix validate_float/half_write_results so that when nan/inf is encountered on a channel, the rest of the channel values are still considered for correctness. Signed-off-by: John Kesapides <john.kesapides@arm.com> Signed-off-by: James Morrissey <james.morrissey@arm.com> Co-authored-by: John Kesapides <john.kesapides@arm.com>
This commit is contained in:
committed by
GitHub
parent
a6809710ea
commit
0a8c5feed7
@@ -1174,8 +1174,11 @@ bool validate_float_write_results( float *expected, float *actual, image_descrip
|
|||||||
continue;
|
continue;
|
||||||
if ( IsFloatSubnormal( expected[j] ) && actual[j] == 0.0f )
|
if ( IsFloatSubnormal( expected[j] ) && actual[j] == 0.0f )
|
||||||
continue;
|
continue;
|
||||||
pass = false;
|
if (expected[j] != actual[j])
|
||||||
break;
|
{
|
||||||
|
pass = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pass;
|
return pass;
|
||||||
@@ -1193,8 +1196,11 @@ bool validate_half_write_results( cl_half *expected, cl_half *actual, image_desc
|
|||||||
continue;
|
continue;
|
||||||
if ( is_half_denorm( expected[j] ) && is_half_zero( actual[j] ) )
|
if ( is_half_denorm( expected[j] ) && is_half_zero( actual[j] ) )
|
||||||
continue;
|
continue;
|
||||||
pass = false;
|
if (expected[j] != actual[j])
|
||||||
break;
|
{
|
||||||
|
pass = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pass;
|
return pass;
|
||||||
|
|||||||
Reference in New Issue
Block a user