add negative float conversions to test constantUnaryConversion.comp

Add conversions from negative float16_t and float32_t to bool, all
signed integer types (i.e., including those in
GL_EXT_shader_explicit_arithmetic_types), and all float types (from the
same extension) to extend coverage.

Note that converting negative float values to unsigned integers is
undefined behavior. Thus, we exclude them.
This commit is contained in:
Marius Hillenbrand
2021-11-15 16:30:15 +01:00
committed by Greg Fischer
parent 7141f89a89
commit 0d85595e33
2 changed files with 133 additions and 4 deletions

View File

@@ -3,8 +3,8 @@ Shader version: 450
Requested GL_EXT_shader_explicit_arithmetic_types
local_size = (1, 1, 1)
0:? Sequence
0:48 Function Definition: main( ( global void)
0:48 Function Parameters:
0:69 Function Definition: main( ( global void)
0:69 Function Parameters:
0:? Linker Objects
0:? 'bool_init' ( const bool)
0:? true (const bool)
@@ -30,6 +30,12 @@ local_size = (1, 1, 1)
0:? 13.000000
0:? 'float64_t_init' ( const double)
0:? -4.000000
0:? 'neg_float16_t_init' ( const float16_t)
0:? -42.000000
0:? 'neg_float32_t_init' ( const float)
0:? -13.000000
0:? 'neg_float64_t_init' ( const double)
0:? -4.000000
0:? 'bool_to_bool' ( const bool)
0:? true (const bool)
0:? 'int8_t_to_bool' ( const bool)
@@ -318,6 +324,54 @@ local_size = (1, 1, 1)
0:? 13.000000
0:? 'float64_t_to_float64_t' ( const double)
0:? -4.000000
0:? 'neg_float16_t_to_bool' ( const bool)
0:? true (const bool)
0:? 'neg_float32_t_to_bool' ( const bool)
0:? true (const bool)
0:? 'neg_float64_t_to_bool' ( const bool)
0:? true (const bool)
0:? 'neg_float16_t_to_int8_t' ( const int8_t)
0:? -42 (const int8_t)
0:? 'neg_float32_t_to_int8_t' ( const int8_t)
0:? -13 (const int8_t)
0:? 'neg_float64_t_to_int8_t' ( const int8_t)
0:? -4 (const int8_t)
0:? 'neg_float16_t_to_int16_t' ( const int16_t)
0:? -42 (const int16_t)
0:? 'neg_float32_t_to_int16_t' ( const int16_t)
0:? -13 (const int16_t)
0:? 'neg_float64_t_to_int16_t' ( const int16_t)
0:? -4 (const int16_t)
0:? 'neg_float16_t_to_int32_t' ( const int)
0:? -42 (const int)
0:? 'neg_float32_t_to_int32_t' ( const int)
0:? -13 (const int)
0:? 'neg_float64_t_to_int32_t' ( const int)
0:? -4 (const int)
0:? 'neg_float16_t_to_int64_t' ( const int64_t)
0:? -42 (const int64_t)
0:? 'neg_float32_t_to_int64_t' ( const int64_t)
0:? -13 (const int64_t)
0:? 'neg_float64_t_to_int64_t' ( const int64_t)
0:? -4 (const int64_t)
0:? 'neg_float16_t_to_float16_t' ( const float16_t)
0:? -42.000000
0:? 'neg_float32_t_to_float16_t' ( const float16_t)
0:? -13.000000
0:? 'neg_float64_t_to_float16_t' ( const float16_t)
0:? -4.000000
0:? 'neg_float16_t_to_float32_t' ( const float)
0:? -42.000000
0:? 'neg_float32_t_to_float32_t' ( const float)
0:? -13.000000
0:? 'neg_float64_t_to_float32_t' ( const float)
0:? -4.000000
0:? 'neg_float16_t_to_float64_t' ( const double)
0:? -42.000000
0:? 'neg_float32_t_to_float64_t' ( const double)
0:? -13.000000
0:? 'neg_float64_t_to_float64_t' ( const double)
0:? -4.000000
Linked compute stage:
@@ -327,8 +381,8 @@ Shader version: 450
Requested GL_EXT_shader_explicit_arithmetic_types
local_size = (1, 1, 1)
0:? Sequence
0:48 Function Definition: main( ( global void)
0:48 Function Parameters:
0:69 Function Definition: main( ( global void)
0:69 Function Parameters:
0:? Linker Objects
0:? 'bool_init' ( const bool)
0:? true (const bool)
@@ -354,6 +408,12 @@ local_size = (1, 1, 1)
0:? 13.000000
0:? 'float64_t_init' ( const double)
0:? -4.000000
0:? 'neg_float16_t_init' ( const float16_t)
0:? -42.000000
0:? 'neg_float32_t_init' ( const float)
0:? -13.000000
0:? 'neg_float64_t_init' ( const double)
0:? -4.000000
0:? 'bool_to_bool' ( const bool)
0:? true (const bool)
0:? 'int8_t_to_bool' ( const bool)
@@ -642,4 +702,52 @@ local_size = (1, 1, 1)
0:? 13.000000
0:? 'float64_t_to_float64_t' ( const double)
0:? -4.000000
0:? 'neg_float16_t_to_bool' ( const bool)
0:? true (const bool)
0:? 'neg_float32_t_to_bool' ( const bool)
0:? true (const bool)
0:? 'neg_float64_t_to_bool' ( const bool)
0:? true (const bool)
0:? 'neg_float16_t_to_int8_t' ( const int8_t)
0:? -42 (const int8_t)
0:? 'neg_float32_t_to_int8_t' ( const int8_t)
0:? -13 (const int8_t)
0:? 'neg_float64_t_to_int8_t' ( const int8_t)
0:? -4 (const int8_t)
0:? 'neg_float16_t_to_int16_t' ( const int16_t)
0:? -42 (const int16_t)
0:? 'neg_float32_t_to_int16_t' ( const int16_t)
0:? -13 (const int16_t)
0:? 'neg_float64_t_to_int16_t' ( const int16_t)
0:? -4 (const int16_t)
0:? 'neg_float16_t_to_int32_t' ( const int)
0:? -42 (const int)
0:? 'neg_float32_t_to_int32_t' ( const int)
0:? -13 (const int)
0:? 'neg_float64_t_to_int32_t' ( const int)
0:? -4 (const int)
0:? 'neg_float16_t_to_int64_t' ( const int64_t)
0:? -42 (const int64_t)
0:? 'neg_float32_t_to_int64_t' ( const int64_t)
0:? -13 (const int64_t)
0:? 'neg_float64_t_to_int64_t' ( const int64_t)
0:? -4 (const int64_t)
0:? 'neg_float16_t_to_float16_t' ( const float16_t)
0:? -42.000000
0:? 'neg_float32_t_to_float16_t' ( const float16_t)
0:? -13.000000
0:? 'neg_float64_t_to_float16_t' ( const float16_t)
0:? -4.000000
0:? 'neg_float16_t_to_float32_t' ( const float)
0:? -42.000000
0:? 'neg_float32_t_to_float32_t' ( const float)
0:? -13.000000
0:? 'neg_float64_t_to_float32_t' ( const float)
0:? -4.000000
0:? 'neg_float16_t_to_float64_t' ( const double)
0:? -42.000000
0:? 'neg_float32_t_to_float64_t' ( const double)
0:? -13.000000
0:? 'neg_float64_t_to_float64_t' ( const double)
0:? -4.000000