[Mesa-dev] [PATCH v2 22/27] i965/miptree: Allocate mcs_buf for an image's CCS
Chad Versace
chadversary at chromium.org
Fri Jul 14 22:10:34 UTC 2017
On Wed 12 Jul 2017, Jason Ekstrand wrote:
> On Wed, Jul 12, 2017 at 11:05 AM, Chad Versace <[1]chadversary at chromium.org>
> wrote:
>
> On Thu 29 Jun 2017, Jason Ekstrand wrote:
> Why require that aux_offset > 0? Why reject images where the aux surface
> precedes the primary surface? This rejection seems arbitrary.
>
>
> All throughout these patches image->aux_offset == 0 is used for "no aux". As
> you pointed out earlier, that's a bit on the bogus side but also always true.
> For scanout, the hardware requires the aux buffer to be placed after the main
> surface so it's not *that* bogus.
I suspected that would be the answer.
> The else-if-if chain here is ugly.
>
>
> Yes it is. But I did it because it made more logical sense to me. "if we have
> a modifier, follow it for aux else follow aux_usage." However, the only
> aux_usage that will ever show up here is CCS_E.
>
>
> The inner if's condition should replace the
> outer else-if's condition.
>
>
> Here's a better idea. How about I write an intel_miptree_alloc_aux helper
> function and call that for aux_usage != NONE? It can handle CCS, MCS, and HiZ
> so that's all together in one place.
Nice. A new function seems like the right way to do it.
More information about the mesa-dev
mailing list