mesa: optimize color_buffer_writes_enabled()
authorBrian Paul <brianp@vmware.com>
Thu, 27 Apr 2017 14:52:30 +0000 (08:52 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 28 Apr 2017 19:12:31 +0000 (13:12 -0600)
commit6b60153f042c1191ae8fde3fbfc7d861650287aa
tree08e70ec8392cf03fd0f215fdbc71213ee7d0b4ff
parent054fb129e1117315d0c4d1ac95bde650aee3faf5
mesa: optimize color_buffer_writes_enabled()

Return as soon as we find an existing color channel that's enabled for
writing.  Typically, this allows us to return true on the first loop
iteration intead of doing four iterations.

No piglit regressions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/clear.c