[Mesa-dev] [PATCH 20/34] i965: Restructure CCS disable

Ben Widawsky ben at bwidawsk.net
Mon Feb 6 06:48:11 UTC 2017


On 17-01-25 20:53:44, Topi Pohjolainen Topi Pohjolainen wrote:
>On Mon, Jan 23, 2017 at 10:21:43PM -0800, Ben Widawsky wrote:
>> Make the code only disable CCS when it has to, unlike before where it
>> disabled CCS and enabled it when it could. This is much more inline with
>> how it should work in a few patches, where we have fewer restrictions as
>> to when we disable CCS.
>>
>> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
>> ---
>>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>> index db1732159b..8a30d72d4c 100644
>> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
>> @@ -329,7 +329,6 @@ intel_miptree_create_layout(struct brw_context *brw,
>>     mt->logical_depth0 = depth0;
>>     mt->aux_disable = (layout_flags & MIPTREE_LAYOUT_DISABLE_AUX) != 0 ?
>>        INTEL_AUX_DISABLE_ALL : INTEL_AUX_DISABLE_NONE;
>> -   mt->aux_disable |= INTEL_AUX_DISABLE_CCS;
>>     mt->is_scanout = (layout_flags & MIPTREE_LAYOUT_FOR_SCANOUT) != 0;
>>     exec_list_make_empty(&mt->hiz_map);
>>     exec_list_make_empty(&mt->color_resolve_map);
>> @@ -522,6 +521,8 @@ intel_miptree_create_layout(struct brw_context *brw,
>>     } else if (brw->gen >= 9 && num_samples > 1) {
>>        layout_flags |= MIPTREE_LAYOUT_FORCE_HALIGN16;
>>     } else {
>> +      mt->aux_disable |= INTEL_AUX_DISABLE_CCS;
>> +
>>        const UNUSED bool is_lossless_compressed_aux =
>>           brw->gen >= 9 && num_samples == 1 &&
>>           mt->format == MESA_FORMAT_R_UINT32;
>> @@ -741,7 +742,6 @@ intel_miptree_create(struct brw_context *brw,
>>      */
>>     if (intel_tiling_supports_non_msrt_mcs(brw, mt->tiling) &&
>>         intel_miptree_supports_non_msrt_fast_clear(brw, mt)) {
>> -      mt->aux_disable &= ~INTEL_AUX_DISABLE_CCS;
>>        assert(brw->gen < 8 || mt->halign == 16 || num_samples <= 1);
>>
>>        /* On Gen9+ clients are not currently capable of consuming compressed
>> @@ -755,8 +755,11 @@ intel_miptree_create(struct brw_context *brw,
>>           intel_miptree_supports_lossless_compressed(brw, mt);
>>
>>        if (is_lossless_compressed) {
>> +         mt->aux_disable &= ~INTEL_AUX_DISABLE_CCS;
>
>Leftover?
>

I don't think so. Can you explain?

>>           intel_miptree_alloc_non_msrt_mcs(brw, mt, is_lossless_compressed);
>>        }
>> +   } else {
>> +      mt->aux_disable |= INTEL_AUX_DISABLE_CCS;
>>     }
>>
>>     return mt;
>> --
>> 2.11.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list