[Mesa-dev] [PATCH 1/3] gallium/radeon: add separate stencil level dirty flags

Marek Olšák maraeo at gmail.com
Thu Sep 24 11:37:43 PDT 2015


On Wed, Sep 9, 2015 at 10:07 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 07.09.2015 07:17, Marek Olšák wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> We will only do depth-only or stencil-only decompress blits, whichever is
>> needed by textures, instead of always doing both.
>> ---
>>  src/gallium/drivers/r600/evergreen_state.c    | 4 ++--
>>  src/gallium/drivers/r600/r600_state_common.c  | 3 +++
>>  src/gallium/drivers/radeon/r600_pipe_common.h | 1 +
>>  src/gallium/drivers/radeonsi/cik_sdma.c       | 4 ++--
>>  src/gallium/drivers/radeonsi/si_dma.c         | 4 ++--
>>  src/gallium/drivers/radeonsi/si_state_draw.c  | 3 +++
>>  6 files changed, 13 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
>> index 6f4cb55..8ecc498 100644
>> --- a/src/gallium/drivers/r600/evergreen_state.c
>> +++ b/src/gallium/drivers/r600/evergreen_state.c
>> @@ -3372,11 +3372,11 @@ static void evergreen_dma_copy(struct pipe_context *ctx,
>>       }
>>
>>       if (src->format != dst->format || src_box->depth > 1 ||
>> -         rdst->dirty_level_mask != 0) {
>> +         (rdst->dirty_level_mask | rdst->stencil_dirty_level_mask) & (1 << dst_level)) {
>>               goto fallback;
>>       }
>>
>> -     if (rsrc->dirty_level_mask) {
>> +     if ((rsrc->dirty_level_mask | rsrc->stencil_dirty_level_mask) & (1 << src_level)) {
>>               ctx->flush_resource(ctx, src);
>>       }
>
> AFAICT ctx->flush_resource only decompresses colour resources, so is the
> second change really necessary? Same in si_dma_copy().

Yes, you're right. I'll fix that.

Marek


More information about the mesa-dev mailing list