diff options
author | Eric Anholt <[email protected]> | 2019-02-26 18:36:05 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-03-05 12:57:39 -0800 |
commit | 4739181a160cd941f7af78074c4f4ac7c6a1fd76 (patch) | |
tree | 7d48d8cc933f6446d01cebe94ed26262b8b0f749 /src/broadcom/compiler/v3d33_tex.c | |
parent | 1e98f02d887dada530595bc0c74292d4678c5e1a (diff) |
v3d: Switch implicit uniforms over to being any qinst->uniform != ~0.
I'm not sure why I didn't do this before -- it's clearly much simpler to
add dumping of the extra thing than to have it as another implicit source.
Diffstat (limited to 'src/broadcom/compiler/v3d33_tex.c')
-rw-r--r-- | src/broadcom/compiler/v3d33_tex.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/broadcom/compiler/v3d33_tex.c b/src/broadcom/compiler/v3d33_tex.c index 7e9cd27d31b..95e486ef6e8 100644 --- a/src/broadcom/compiler/v3d33_tex.c +++ b/src/broadcom/compiler/v3d33_tex.c @@ -161,11 +161,10 @@ v3d33_vir_emit_tex(struct v3d_compile *c, nir_tex_instr *instr) unit)); } - struct qreg texture_u[] = { - vir_uniform(c, QUNIFORM_TEXTURE_CONFIG_P0_0 + unit, p0_packed), - vir_uniform(c, QUNIFORM_TEXTURE_CONFIG_P1, p1_packed), + int texture_u[] = { + vir_get_uniform_index(c, QUNIFORM_TEXTURE_CONFIG_P0_0 + unit, p0_packed), + vir_get_uniform_index(c, QUNIFORM_TEXTURE_CONFIG_P1, p1_packed), }; - uint32_t next_texture_u = 0; for (int i = 0; i < next_coord; i++) { struct qreg dst; @@ -177,11 +176,8 @@ v3d33_vir_emit_tex(struct v3d_compile *c, nir_tex_instr *instr) struct qinst *tmu = vir_MOV_dest(c, dst, coords[i]); - if (i < 2) { - tmu->has_implicit_uniform = true; - tmu->src[vir_get_implicit_uniform_src(tmu)] = - texture_u[next_texture_u++]; - } + if (i < 2) + tmu->uniform = texture_u[i]; } vir_emit_thrsw(c); |