summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-08-22 15:02:52 -0700
committerEric Anholt <[email protected]>2014-09-23 13:40:10 -0700
commit2e48b286bf21501ac06832799a4b7957bb8ac893 (patch)
tree2abbc37c478504db4b699b1f8251f51b66800aa4 /src/gallium/drivers/vc4/vc4_qir.h
parentb7edf30191cae945b4836d683762d0ebed6efbfe (diff)
vc4: Add support for 8-bit unorm/snorm vertex inputs.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index f3e5332edfc..d1bfc77621e 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -108,6 +108,11 @@ enum qop {
QOP_FRAG_Z,
QOP_FRAG_W,
+ QOP_UNPACK_8A,
+ QOP_UNPACK_8B,
+ QOP_UNPACK_8C,
+ QOP_UNPACK_8D,
+
/** Texture x coordinate parameter write */
QOP_TEX_S,
/** Texture y coordinate parameter write */
@@ -386,4 +391,12 @@ qir_SEL_X_0_COND(struct vc4_compile *c, int i)
return t;
}
+static inline struct qreg
+qir_UNPACK_8(struct vc4_compile *c, struct qreg src, int i)
+{
+ struct qreg t = qir_get_temp(c);
+ qir_emit(c, qir_inst(QOP_UNPACK_8A + i, t, src, c->undef));
+ return t;
+}
+
#endif /* VC4_QIR_H */