diff options
author | Eric Anholt <[email protected]> | 2016-07-14 17:26:43 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-07-15 13:54:00 -0700 |
commit | 3bcd0f1912a60cc9d3813923d18d29465e41ff56 (patch) | |
tree | a453cbfb302a1e70b0704c3725f9ce6e5172db0d /src/gallium/drivers/vc4/vc4_resource.c | |
parent | 88152d7dc0e2cf233cd2c38a4e9affb1ea73fa97 (diff) |
vc4: Speed up glGenerateMipmaps by avoiding shadow baselevel.
To support general GL_TEXTURE_BASE_LEVEL we have to copy to a temporary
miptree. However, if a single level is being selected, we can use the
existing miptree and force all the sampling to be from that particular
level.
This avoids a ton of software fallbacks in glGenerateMipmaps(), which uses
base levels in the blit implementation in gallium. Improves "glmark2 -b
terrain" from 2 fps to 3 (perhaps some more precision would be useful?),
and cuts its CPU usage during the benchmarking from ~30% to ~10% (total
CPU time from 8.8s to 7.6s).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_resource.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_resource.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index a07fa3d9979..08d7d207f79 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -877,7 +877,9 @@ vc4_update_shadow_baselevel_texture(struct pipe_context *pctx, if (shadow->writes == orig->writes && orig->bo->private) return; - perf_debug("Updating shadow texture due to %s\n", + perf_debug("Updating %dx%d@%d shadow texture due to %s\n", + orig->base.b.width0, orig->base.b.height0, + view->u.tex.first_level, view->u.tex.first_level ? "base level" : "raster layout"); for (int i = 0; i <= shadow->base.b.last_level; i++) { |