v3d: Use the core tex lowering.

Even without any clever optimization on the unpack operations, this gives
us a useful value for the channels read field, which we can use to avoid
ldtmu instructions to the no-op register.

instructions in affected programs: 890712 -> 881974 (-0.98%)
This commit is contained in:
Eric Anholt
2018-12-20 09:43:43 -08:00
parent f217a94542
commit 8847370424
3 changed files with 10 additions and 123 deletions

View File

@@ -630,6 +630,10 @@ v3d_lower_nir(struct v3d_compile *c)
tex_options.saturate_t |= 1 << i;
if (c->key->tex[i].clamp_r)
tex_options.saturate_r |= 1 << i;
if (c->key->tex[i].return_size == 16) {
tex_options.lower_tex_packing[i] =
nir_lower_tex_packing_16;
}
}
NIR_PASS_V(c->s, nir_lower_tex, &tex_options);