vc4: Avoid loading from the texture during non-utile-aligned glTexImage().
authorEric Anholt <eric@anholt.net>
Thu, 13 Oct 2016 19:37:59 +0000 (12:37 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 13 Oct 2016 21:27:30 +0000 (14:27 -0700)
commit99d790538de2e7d7d489a8638b13c5aa069c27c3
tree69782db7d286337514bfa40abcff983090fbab14
parent0717cd975d85eb04389d84c54b796863aa537cf0
vc4: Avoid loading from the texture during non-utile-aligned glTexImage().

Previously, the plan was "if the width/height we have to load/store isn't
the size the user is planning on writing, then we need to load the old
contents out beforehand to prevent writing back undefined".

However, when we're doing glTexImage() we often end up aligning the
width/height into the padding of the texture, and we don't actually
need to read out that padding.

Improves x11perf -aatrapezoid100 performance from ~460/sec to
~700/sec.
src/gallium/drivers/vc4/vc4_resource.c