X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fvc4%2Fvc4_qir.h;h=a2b21fa17bb055fb8a8d6490d52f0344818a118b;hb=6aaa814995d922d6f9cc68bc26276fd752866ceb;hp=c9ca3da203c6d071ff6448507fbd9fcf916379d3;hpb=572a48366d9dfac6a7f9ee8f4d29832c496125e2;p=mesa.git diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h index c9ca3da203c..a2b21fa17bb 100644 --- a/src/gallium/drivers/vc4/vc4_qir.h +++ b/src/gallium/drivers/vc4/vc4_qir.h @@ -58,6 +58,7 @@ enum qfile { struct qreg { enum qfile file; uint32_t index; + int pack; }; enum qop { @@ -109,8 +110,6 @@ enum qop { QOP_PACK_8B_F, QOP_PACK_8C_F, QOP_PACK_8D_F, - QOP_PACK_16A_I, - QOP_PACK_16B_I, QOP_TLB_DISCARD_SETUP, QOP_TLB_STENCIL_SETUP, QOP_TLB_Z_WRITE, @@ -445,7 +444,13 @@ struct qreg qir_uniform(struct vc4_compile *c, enum quniform_contents contents, uint32_t data); void qir_reorder_uniforms(struct vc4_compile *c); + void qir_emit(struct vc4_compile *c, struct qinst *inst); +static inline void qir_emit_nodef(struct vc4_compile *c, struct qinst *inst) +{ + list_addtail(&inst->link, &c->instructions); +} + struct qreg qir_get_temp(struct vc4_compile *c); int qir_get_op_nsrc(enum qop qop); bool qir_reg_equals(struct qreg a, struct qreg b); @@ -511,6 +516,12 @@ qir_##name(struct vc4_compile *c, struct qreg a) \ struct qreg t = qir_get_temp(c); \ qir_emit(c, qir_inst(QOP_##name, t, a, c->undef)); \ return t; \ +} \ +static inline void \ +qir_##name##_dest(struct vc4_compile *c, struct qreg dest, \ + struct qreg a) \ +{ \ + qir_emit_nodef(c, qir_inst(QOP_##name, dest, a, c->undef)); \ } #define QIR_ALU2(name) \ @@ -520,6 +531,12 @@ qir_##name(struct vc4_compile *c, struct qreg a, struct qreg b) \ struct qreg t = qir_get_temp(c); \ qir_emit(c, qir_inst(QOP_##name, t, a, b)); \ return t; \ +} \ +static inline void \ +qir_##name##_dest(struct vc4_compile *c, struct qreg dest, \ + struct qreg a, struct qreg b) \ +{ \ + qir_emit_nodef(c, qir_inst(QOP_##name, dest, a, b)); \ } #define QIR_NODST_1(name) \ @@ -540,9 +557,7 @@ qir_##name(struct vc4_compile *c, struct qreg a, struct qreg b) \ static inline struct qreg \ qir_##name(struct vc4_compile *c, struct qreg dest, struct qreg a) \ { \ - qir_emit(c, qir_inst(QOP_##name, dest, a, c->undef)); \ - if (dest.file == QFILE_TEMP) \ - c->defs[dest.index] = NULL; \ + qir_emit_nodef(c, qir_inst(QOP_##name, dest, a, c->undef)); \ return dest; \ } @@ -587,8 +602,6 @@ QIR_PACK(PACK_8A_F) QIR_PACK(PACK_8B_F) QIR_PACK(PACK_8C_F) QIR_PACK(PACK_8D_F) -QIR_PACK(PACK_16A_I) -QIR_PACK(PACK_16B_I) QIR_ALU1(VARY_ADD_C) QIR_NODST_2(TEX_S) QIR_NODST_2(TEX_T)