[Mesa-dev] [PATCH 11/59] i965/eu: allow doubles in math instructions

Samuel Iglesias Gonsálvez siglesias at igalia.com
Fri Apr 29 11:29:08 UTC 2016


From: Connor Abbott <connor.w.abbott at intel.com>

---
 src/mesa/drivers/dri/i965/brw_eu_emit.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index e5057a0..4c08883 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -1995,8 +1995,10 @@ void gen6_math(struct brw_codegen *p,
       assert(src1.file == BRW_GENERAL_REGISTER_FILE ||
              (devinfo->gen >= 8 && src1.file == BRW_IMMEDIATE_VALUE));
    } else {
-      assert(src0.type == BRW_REGISTER_TYPE_F);
-      assert(src1.type == BRW_REGISTER_TYPE_F);
+      assert(src0.type == BRW_REGISTER_TYPE_F ||
+             src0.type == BRW_REGISTER_TYPE_DF);
+      assert(src1.type == BRW_REGISTER_TYPE_F ||
+             src1.type == BRW_REGISTER_TYPE_DF);
       if (function == BRW_MATH_FUNCTION_POW) {
          assert(src1.file == BRW_GENERAL_REGISTER_FILE ||
                 (devinfo->gen >= 8 && src1.file == BRW_IMMEDIATE_VALUE));
-- 
2.5.0



More information about the mesa-dev mailing list