diff options
author | Eric Anholt <[email protected]> | 2018-01-08 11:55:31 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-01-12 21:55:30 -0800 |
commit | 90269ba353333be13e54549ecff3adb8803661db (patch) | |
tree | 228c677b3b355ea9e0dee929e6ed8d0afb85dd0c /src/broadcom/compiler/vir.c | |
parent | 86a12b4d5a49c68f4613513d2846c5eb8e56a677 (diff) |
broadcom/vc5: Use THRSW to enable multi-threaded shaders.
This is a major performance boost on all of V3D, but is required on V3D
4.x where shaders are always either 2- or 4-threaded.
Diffstat (limited to 'src/broadcom/compiler/vir.c')
-rw-r--r-- | src/broadcom/compiler/vir.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c index da4ece2cffe..a063ebc5d53 100644 --- a/src/broadcom/compiler/vir.c +++ b/src/broadcom/compiler/vir.c @@ -109,7 +109,7 @@ vir_has_side_effects(struct v3d_compile *c, struct qinst *inst) } } - if (inst->qpu.sig.ldtmu) + if (inst->qpu.sig.ldtmu || inst->qpu.sig.thrsw) return true; return false; @@ -528,6 +528,7 @@ vir_compile_init(const struct v3d_compiler *compiler, c->key = key; c->program_id = program_id; c->variant_id = variant_id; + c->threads = 4; s = nir_shader_clone(c, s); c->s = s; @@ -637,6 +638,9 @@ static void v3d_set_prog_data(struct v3d_compile *c, struct v3d_prog_data *prog_data) { + prog_data->threads = c->threads; + prog_data->single_seg = !c->last_thrsw; + v3d_set_prog_data_uniforms(c, prog_data); v3d_set_prog_data_ubo(c, prog_data); } |