summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-02-19 12:19:44 -0800
committerEric Anholt <[email protected]>2015-02-19 23:35:17 -0800
commit877b48a531adc397493e508e509aba2918915349 (patch)
tree8aa23a56e1470b1a0a78c7f80ae7a4894006e0d2 /src/gallium/drivers/vc4/vc4_program.c
parent14dc281c1332518b6144718e1fb3845abbe23ff7 (diff)
vc4: Move qir_uniform() and the constant-value versions to vc4_qir.c/h.
I may want them in optimization passes, and they're not really particular to the program translation stage.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index b904679ef00..56a3a96c1b5 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -110,51 +110,6 @@ resize_qreg_array(struct vc4_compile *c,
}
static struct qreg
-qir_uniform(struct vc4_compile *c,
- enum quniform_contents contents,
- uint32_t data)
-{
- for (int i = 0; i < c->num_uniforms; i++) {
- if (c->uniform_contents[i] == contents &&
- c->uniform_data[i] == data) {
- return (struct qreg) { QFILE_UNIF, i };
- }
- }
-
- uint32_t uniform = c->num_uniforms++;
- struct qreg u = { QFILE_UNIF, uniform };
-
- if (uniform >= c->uniform_array_size) {
- c->uniform_array_size = MAX2(MAX2(16, uniform + 1),
- c->uniform_array_size * 2);
-
- c->uniform_data = reralloc(c, c->uniform_data,
- uint32_t,
- c->uniform_array_size);
- c->uniform_contents = reralloc(c, c->uniform_contents,
- enum quniform_contents,
- c->uniform_array_size);
- }
-
- c->uniform_contents[uniform] = contents;
- c->uniform_data[uniform] = data;
-
- return u;
-}
-
-static struct qreg
-qir_uniform_ui(struct vc4_compile *c, uint32_t ui)
-{
- return qir_uniform(c, QUNIFORM_CONSTANT, ui);
-}
-
-static struct qreg
-qir_uniform_f(struct vc4_compile *c, float f)
-{
- return qir_uniform(c, QUNIFORM_CONSTANT, fui(f));
-}
-
-static struct qreg
indirect_uniform_load(struct vc4_compile *c,
struct tgsi_full_src_register *src, int swiz)
{