Skip to content

Commit

Permalink
Fix float_controls2 tests assuming RTE rounding
Browse files Browse the repository at this point in the history
The FMA tests check that 0.1 * 10.0 - 1.0 == 0.0 which fails on RTZ as
a result of a rounding error.
Change the tests to check 0.1 * 23.0 - 2.3 == 0.0 to allow them to
work on both RTE and RTZ.

Some tests add or multiply two large inputs and expect the result to
overflow to infinity.
This works as expected for RTE but will produce the max finite value
for RTZ.
Change the tests to require the shaderRoundingModeRTEFloat{16,32,64}
property and use RoundingModeRTE in the shader.

Affects: dEQP-VK.spirv_assembly.instruction.*.float_controls2.*.input_args.*
Components: Vulkan
VK-GL-CTS issue: 4962

Change-Id: I34492b26aff70409d78d51976353072c4a8a8c08
  • Loading branch information
kieronjosephs-IMG authored and lordalcol committed Apr 10, 2024
1 parent 1f4ebee commit 201e6fe
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 155 deletions.
36 changes: 18 additions & 18 deletions android/cts/main/vk-main-2024-03-01/spirv-assembly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.floor
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.floor_testedWithout_NotInf_arg1_inf_arg2_one_res_inf_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp16.input_args.fma_testedWithout_NotInf_arg1_inf_arg2_one_res_inf_deco
Expand Down Expand Up @@ -1133,8 +1133,8 @@ dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.floor
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.floor_testedWithout_NotInf_arg1_inf_arg2_one_res_inf_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp32.input_args.fma_testedWithout_NotInf_arg1_inf_arg2_one_res_inf_deco
Expand Down Expand Up @@ -1720,8 +1720,8 @@ dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.floor
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.floor_testedWithout_NotInf_arg1_inf_arg2_one_res_inf_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_exec
dEQP-VK.spirv_assembly.instruction.compute.float_controls2.fp64.input_args.fma_testedWithout_NotInf_arg1_inf_arg2_one_res_inf_deco
Expand Down Expand Up @@ -3139,10 +3139,10 @@ dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.floo
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp16.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_exec_frag
Expand Down Expand Up @@ -4557,10 +4557,10 @@ dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.floo
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp32.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_exec_frag
Expand Down Expand Up @@ -5731,10 +5731,10 @@ dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.floo
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.floor_testedWithout_NotNaN_arg1_nan_arg2_one_res_nan_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_ten_res_zero_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_AllowContract_arg1_zeroPtOne_arg2_twentyFivePtEight_res_zero_exec_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco_frag
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_deco_vert
dEQP-VK.spirv_assembly.instruction.graphics.float_controls2.fp64.input_args.fma_testedWithout_NSZ_arg1_minusZero_arg2_one_res_minusOne_exec_frag
Expand Down
Loading

0 comments on commit 201e6fe

Please sign in to comment.