aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-12-15 12:30:26 -0800
committerEric Anholt <[email protected]>2014-12-15 14:33:01 -0800
commit48a2154520351a22fc860efcdaa4329a51d29c8d (patch)
treecccb279fea71ccd85c0dda762fe8898408a9f00b /src/gallium/drivers/vc4/vc4_qir.h
parent9ca32d6c19489653222ff1084856fa5584932b66 (diff)
vc4: Add support for 16-bit signed/unsigned norm/scaled vertex attrs.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index 9da120ab912..46f4c12b22c 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -113,11 +113,15 @@ enum qop {
QOP_UNPACK_8B_F,
QOP_UNPACK_8C_F,
QOP_UNPACK_8D_F,
+ QOP_UNPACK_16A_F,
+ QOP_UNPACK_16B_F,
QOP_UNPACK_8A_I,
QOP_UNPACK_8B_I,
QOP_UNPACK_8C_I,
QOP_UNPACK_8D_I,
+ QOP_UNPACK_16A_I,
+ QOP_UNPACK_16B_I,
/** Texture x coordinate parameter write */
QOP_TEX_S,
@@ -510,6 +514,22 @@ qir_UNPACK_8_I(struct vc4_compile *c, struct qreg src, int i)
}
static inline struct qreg
+qir_UNPACK_16_F(struct vc4_compile *c, struct qreg src, int i)
+{
+ struct qreg t = qir_get_temp(c);
+ qir_emit(c, qir_inst(QOP_UNPACK_16A_F + i, t, src, c->undef));
+ return t;
+}
+
+static inline struct qreg
+qir_UNPACK_16_I(struct vc4_compile *c, struct qreg src, int i)
+{
+ struct qreg t = qir_get_temp(c);
+ qir_emit(c, qir_inst(QOP_UNPACK_16A_I + i, t, src, c->undef));
+ return t;
+}
+
+static inline struct qreg
qir_POW(struct vc4_compile *c, struct qreg x, struct qreg y)
{
return qir_EXP2(c, qir_FMUL(c,