[Mesa-dev] st/dri: Clear drawable texture_mask in dri2_invalidate_drawable

Submitted by Michel Dänzer on June 9, 2016, 6:44 a.m.

Details

Message ID 1465454687-28410-1-git-send-email-michel@daenzer.net
State Accepted
Commit 9ee3f097b65398250e836785a7e87520eda8298d
Headers show
Series "st/dri: Clear drawable texture_mask in dri2_invalidate_drawable" ( rev: 1 ) in Mesa (DEPRECATED - USE GITLAB)

Not browsing as part of any series.

Commit Message

Michel Dänzer June 9, 2016, 6:44 a.m.
From: Michel Dänzer <michel.daenzer@amd.com>

This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att
will re-create the front left attachment buffer after the drawable got
invalidated.

Fixes window contents not updating until the window is resized when
using DRI2 PRIME.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 src/gallium/state_trackers/dri/dri2.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 28f8078..c22a8cd 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -167,6 +167,7 @@  dri2_invalidate_drawable(__DRIdrawable *dPriv)
 
    dri2InvalidateDrawable(dPriv);
    drawable->dPriv->lastStamp = drawable->dPriv->dri2.stamp;
+   drawable->texture_mask = 0;
 
    p_atomic_inc(&drawable->base.stamp);
 }

Comments

Looks reasonable.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>

On 09.06.2016 08:44, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att
> will re-create the front left attachment buffer after the drawable got
> invalidated.
>
> Fixes window contents not updating until the window is resized when
> using DRI2 PRIME.
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
> ---
>   src/gallium/state_trackers/dri/dri2.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
> index 28f8078..c22a8cd 100644
> --- a/src/gallium/state_trackers/dri/dri2.c
> +++ b/src/gallium/state_trackers/dri/dri2.c
> @@ -167,6 +167,7 @@ dri2_invalidate_drawable(__DRIdrawable *dPriv)
>
>      dri2InvalidateDrawable(dPriv);
>      drawable->dPriv->lastStamp = drawable->dPriv->dri2.stamp;
> +   drawable->texture_mask = 0;
>
>      p_atomic_inc(&drawable->base.stamp);
>   }
>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
On Jun 9, 2016 10:26 AM, "Nicolai Hähnle" <nhaehnle@gmail.com> wrote:

> Looks reasonable.
>
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
>
> On 09.06.2016 08:44, Michel Dänzer wrote:
>
>> From: Michel Dänzer <michel.daenzer@amd.com>
>>
>> This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att
>> will re-create the front left attachment buffer after the drawable got
>> invalidated.
>>
>> Fixes window contents not updating until the window is resized when
>> using DRI2 PRIME.
>>
>> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
>> ---
>>   src/gallium/state_trackers/dri/dri2.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/src/gallium/state_trackers/dri/dri2.c
>> b/src/gallium/state_trackers/dri/dri2.c
>> index 28f8078..c22a8cd 100644
>> --- a/src/gallium/state_trackers/dri/dri2.c
>> +++ b/src/gallium/state_trackers/dri/dri2.c
>> @@ -167,6 +167,7 @@ dri2_invalidate_drawable(__DRIdrawable *dPriv)
>>
>>      dri2InvalidateDrawable(dPriv);
>>      drawable->dPriv->lastStamp = drawable->dPriv->dri2.stamp;
>> +   drawable->texture_mask = 0;
>>
>>      p_atomic_inc(&drawable->base.stamp);
>>   }
>>
>> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
On Thu, Jun 9, 2016 at 2:44 AM, Michel Dänzer <michel@daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att
> will re-create the front left attachment buffer after the drawable got
> invalidated.
>
> Fixes window contents not updating until the window is resized when
> using DRI2 PRIME.
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Stable material?

Alex

> ---
>  src/gallium/state_trackers/dri/dri2.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
> index 28f8078..c22a8cd 100644
> --- a/src/gallium/state_trackers/dri/dri2.c
> +++ b/src/gallium/state_trackers/dri/dri2.c
> @@ -167,6 +167,7 @@ dri2_invalidate_drawable(__DRIdrawable *dPriv)
>
>     dri2InvalidateDrawable(dPriv);
>     drawable->dPriv->lastStamp = drawable->dPriv->dri2.stamp;
> +   drawable->texture_mask = 0;
>
>     p_atomic_inc(&drawable->base.stamp);
>  }
> --
> 2.8.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
On 09.06.2016 22:39, Alex Deucher wrote:
> On Thu, Jun 9, 2016 at 2:44 AM, Michel Dänzer <michel@daenzer.net> wrote:
>> From: Michel Dänzer <michel.daenzer@amd.com>
>>
>> This makes sure that dri_set_tex_buffer2 -> dri_drawable_validate_att
>> will re-create the front left attachment buffer after the drawable got
>> invalidated.
>>
>> Fixes window contents not updating until the window is resized when
>> using DRI2 PRIME.
>>
>> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
> 
> Stable material?

Not sure. I'm a little nervous about this causing subtle breakage, and
the issue it fixes has been there for a looong time, so I feel like it
can wait for the next major release.