From: Alyssa Rosenzweig Date: Mon, 25 May 2020 18:05:34 +0000 (-0400) Subject: pan/mdg: Add roundmode enum X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2eb4c85e42452527d46b03242f6f26c8cb216e39;p=mesa.git pan/mdg: Add roundmode enum Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 1765bfd8551..7e2a453584c 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -121,6 +121,9 @@ typedef struct midgard_instruction { /* Out of the union for csel (could maybe be fixed..) */ bool src_invert[MIR_SRC_COUNT]; + /* If the op supports it */ + enum midgard_roundmode roundmode; + /* Special fields for an ALU instruction */ midgard_reg_info registers; diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h index 4e7c80585d5..bb93d0d653d 100644 --- a/src/panfrost/midgard/midgard.h +++ b/src/panfrost/midgard/midgard.h @@ -822,4 +822,11 @@ typedef union midgard_constants { } midgard_constants; +enum midgard_roundmode { + MIDGARD_RTE = 0x0, /* round to even */ + MIDGARD_RTZ = 0x1, /* round to zero */ + MIDGARD_RTN = 0x2, /* round to negative */ + MIDGARD_RTP = 0x3, /* round to positive */ +}; + #endif