[Mesa-dev] [PATCH] st/dri: Invalidate drawables on context switch

Benjamin Franzke benjaminfranzke at googlemail.com
Tue Jun 21 04:40:48 PDT 2011


Actually I wasnt sure, but theres nothing like that in glx/dri2_glx.c
or egl_dri2.
Furthermore the intel driver does sth similar.

2011/6/21 Jakob Bornecrantz <wallbraker at gmail.com>:
> On Tue, Jun 21, 2011 at 1:32 PM, Benjamin Franzke
> <benjaminfranzke at googlemail.com> wrote:
>> ---
>>  .../state_trackers/dri/common/dri_context.c        |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
>> index e23c1bc..0f9e4e5 100644
>> --- a/src/gallium/state_trackers/dri/common/dri_context.c
>> +++ b/src/gallium/state_trackers/dri/common/dri_context.c
>> @@ -192,6 +192,11 @@ dri_make_current(__DRIcontext * cPriv,
>>    }
>>
>>    ctx->stapi->make_current(ctx->stapi, ctx->st, &draw->base, &read->base);
>> +   if (old_st && old_st != ctx->st) {
>> +      ctx->st->notify_invalid_framebuffer(ctx->st, &draw->base);
>> +      if (draw != read)
>> +         ctx->st->notify_invalid_framebuffer(ctx->st, &read->base);
>> +   }
>
> Shouldn't the client api state tracker be smart enough to do this in
> the make_current call?
>
> Cheers Jakob.
>


More information about the mesa-dev mailing list