diff options
author | Kenneth Graunke <[email protected]> | 2017-10-12 20:47:41 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-10-19 11:10:00 -0700 |
commit | 82144b7392d1651167cbfd4746aea6a14d5aff46 (patch) | |
tree | b4a1638e066fe7695cbced149fe435cbf00d8149 /src/gallium/drivers/swr | |
parent | fa6ca6991bccea97fbb98c29fb02e2a195818b8c (diff) |
i965: Don't disable aux buffers for non-overlapping miplevels.
Meta's GenerateMipmap implementation binds the same image for both
sampling and rendering - but it samples from one miplevel while
rendering the next. This is a false self-dependency, and there's
no need to disable auxiliary buffers in this case. In fact, we really
want to leave it enabled so the new miplevels gain color compression.
Thankfully, the texture object's _MaxLevel is always one shy of the
miplevel being rendered. So we can simply check if irb->mt_level is
overlaps with the texture's defined levels. If not, there's no self-
dependency and we can leave the auxiliary buffers enabled.
Fixes a performance regression in GFXBench4 Car Chase, which apparently
calls glGenerateMipmap() on every frame.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103247
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by; Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
0 files changed, 0 insertions, 0 deletions