From a1f698881e13a4993e958815b79f8150d48e2739 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 5 May 2016 18:04:14 -0700 Subject: vc4: Add support for loading immediate values in QIR. This will be used for resetting the uniform stream in the presence of branching, but may also be useful as an optimization to reduce how many uniforms we have to copy out per draw call (in exchange for increasing icache pressure). --- src/gallium/drivers/vc4/vc4_qir.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gallium/drivers/vc4/vc4_qir.c') diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c index 86a7ae023c1..b9676adb3af 100644 --- a/src/gallium/drivers/vc4/vc4_qir.c +++ b/src/gallium/drivers/vc4/vc4_qir.c @@ -81,6 +81,8 @@ static const struct qir_op_info qir_op_info[] = { [QOP_TEX_B] = { "tex_b", 0, 2 }, [QOP_TEX_DIRECT] = { "tex_direct", 0, 2 }, [QOP_TEX_RESULT] = { "tex_result", 1, 0, true }, + + [QOP_LOAD_IMM] = { "load_imm", 0, 1 }, }; static const char * @@ -244,6 +246,10 @@ qir_print_reg(struct vc4_compile *c, struct qreg reg, bool write) fprintf(stderr, "null"); break; + case QFILE_LOAD_IMM: + fprintf(stderr, "0x%08x (%f)", reg.index, uif(reg.index)); + break; + case QFILE_SMALL_IMM: if ((int)reg.index >= -16 && (int)reg.index <= 15) fprintf(stderr, "%d", reg.index); -- cgit v1.2.3