diff options
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h index a1b55605584..af92c8c66a9 100644 --- a/src/gallium/drivers/vc4/vc4_qir.h +++ b/src/gallium/drivers/vc4/vc4_qir.h @@ -33,6 +33,7 @@ #include "util/macros.h" #include "util/simple_list.h" +#include "util/u_math.h" #include "tgsi/tgsi_parse.h" enum qfile { @@ -368,6 +369,9 @@ struct qinst *qir_inst4(enum qop op, struct qreg dst, struct qreg c, struct qreg d); void qir_remove_instruction(struct qinst *qinst); +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); struct qreg qir_get_temp(struct vc4_compile *c); @@ -400,6 +404,18 @@ void qpu_schedule_instructions(struct vc4_compile *c); void qir_SF(struct vc4_compile *c, struct qreg src); +static inline struct qreg +qir_uniform_ui(struct vc4_compile *c, uint32_t ui) +{ + return qir_uniform(c, QUNIFORM_CONSTANT, ui); +} + +static inline struct qreg +qir_uniform_f(struct vc4_compile *c, float f) +{ + return qir_uniform(c, QUNIFORM_CONSTANT, fui(f)); +} + #define QIR_ALU0(name) \ static inline struct qreg \ qir_##name(struct vc4_compile *c) \ |