From f7d73db353e5b6416c98a8c05c585ea79b3eada2 Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsálvez Date: Wed, 20 Jun 2018 09:11:14 +0200 Subject: nir: add support for flushing to zero denorm constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2: - Refactor conditions and shared function (Connor). - Move code to nir_eval_const_opcode() (Connor). - Don't flush to zero on fquantize2f16 From Vulkan spec, VK_KHR_shader_float_controls section: "3) Do denorm and rounding mode controls apply to OpSpecConstantOp? RESOLVED: Yes, except when the opcode is OpQuantizeToF16." v3: - Fix bit size (Connor). - Fix execution mode on nir_loop_analize (Connor). v4: - Adapt after API changes to nir_eval_const_opcode (Andres). v5: - Simplify constant_denorm_flush_to_zero (Caio). v6: - Adapt after API changes and to use the new constant constructors (Andres). - Replace MAYBE_UNUSED with UNUSED as the first is going away (Andres). v7: - Adapt to newly added calls (Andres). - Simplified the auxiliary to flush denorms to zero (Caio). - Updated to renamed supported capabilities member (Andres). Signed-off-by: Samuel Iglesias Gonsálvez Signed-off-by: Andres Gomez Reviewed-by: Connor Abbott [v4] Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir/nir_constant_expressions.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compiler/nir/nir_constant_expressions.h') diff --git a/src/compiler/nir/nir_constant_expressions.h b/src/compiler/nir/nir_constant_expressions.h index 087663f7480..6450d5c3d03 100644 --- a/src/compiler/nir/nir_constant_expressions.h +++ b/src/compiler/nir/nir_constant_expressions.h @@ -32,6 +32,7 @@ void nir_eval_const_opcode(nir_op op, nir_const_value *dest, unsigned num_components, unsigned bit_size, - nir_const_value **src); + nir_const_value **src, + unsigned float_controls_execution_mode); #endif /* NIR_CONSTANT_EXPRESSIONS_H */ -- cgit v1.2.3