[Mesa-dev] [PATCH 1/4] intel/reg: Add helpers for 64-bit integer immediates

Michael Schellenberger Costa mschellenbergercosta at googlemail.com
Fri Nov 3 05:12:20 UTC 2017


Hi Jason,

-----Ursprüngliche Nachricht-----
Von: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] Im Auftrag von Jason Ekstrand
Gesendet: Freitag, 3. November 2017 05:53
An: mesa-dev at lists.freedesktop.org
Cc: Jason Ekstrand <jason.ekstrand at intel.com>
Betreff: [Mesa-dev] [PATCH 1/4] intel/reg: Add helpers for 64-bit integer immediates

---
 src/intel/compiler/brw_reg.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/intel/compiler/brw_reg.h b/src/intel/compiler/brw_reg.h
index d68d64f..a641869 100644
--- a/src/intel/compiler/brw_reg.h
+++ b/src/intel/compiler/brw_reg.h
@@ -597,6 +597,24 @@ brw_imm_f(float f)
    return imm;
 }
 
+/** Construct int64_t immediate register */
+static inline struct brw_reg
+brw_imm_q(int64_t q)
+{
+   struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_Q);
+   imm.d64 = q;
+   return imm;
+}
+
+/** Construct int64_t immediate register */
This should be uint64_t?

--Michael

+static inline struct brw_reg
+brw_imm_uq(uint64_t uq)
+{
+   struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_UQ);
+   imm.u64 = uq;
+   return imm;
+}
+
 /** Construct integer immediate register */
 static inline struct brw_reg
 brw_imm_d(int d)
-- 
2.5.0.400.gff86faf

_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list