[Mesa-dev] [PATCH 11/11] loader_dri3: Make sure we have an updated back

Michel Dänzer michel at daenzer.net
Tue Aug 15 07:32:44 UTC 2017


On 11/08/17 11:14 PM, Thomas Hellstrom wrote:
> With GLX_SWAP_COPY_OML and GLX_SWAP_EXCHANGE_OML it may happen in situations
> when glXSwapBuffers() is immediately followed by for example another
> glXSwapBuffers() or glXCopyBuffers() or back buffer age querying, that we
> haven't yet allocated and initialized a new back buffer because there was
> no GL rendering in between.
> 
> Make sure that we have a back buffer in those situations.
> 
> Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
> ---
>  src/loader/loader_dri3_helper.c | 64 ++++++++++++++++++++++++++++++++++-------
>  src/loader/loader_dri3_helper.h |  3 ++
>  2 files changed, 57 insertions(+), 10 deletions(-)
> 
> diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
> index dee0df8..0440633 100644
> --- a/src/loader/loader_dri3_helper.c
> +++ b/src/loader/loader_dri3_helper.c
> @@ -35,6 +35,7 @@
>  #include <c11/threads.h>
>  #include "loader_dri3_helper.h"
>  
> +
>  /* From xmlpool/options.h, user exposed so should be stable */
>  #define DRI_CONF_VBLANK_NEVER 0
>  #define DRI_CONF_VBLANK_DEF_INTERVAL_0 1

Drop this hunk.


> diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h
> index c8f63fd..b06a9ad 100644
> --- a/src/loader/loader_dri3_helper.h
> +++ b/src/loader/loader_dri3_helper.h
> @@ -159,6 +159,9 @@ struct loader_dri3_drawable {
>  
>     bool have_image_blit;
>     unsigned int swap_method;
> +
> +   bool have_back_format;
> +   unsigned int back_format;
>  };

Is 0 a valid value for the back_format field? If not, the
have_back_format field is redundant.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list