[Mesa-dev] [PATCH] intel: Don't advertise GLX_SWAP_COPY_OML
Ian Romanick
idr at freedesktop.org
Thu Aug 9 16:41:34 PDT 2012
The tail should not wag the dog. If the application requests such a config, we should not page flip. There are cases where the copy is preferable because it leaves the backbuffer intact.
On Aug 9, 2012, at 9:11 AM, Chad Versace <chad.versace at linux.intel.com> wrote:
> This patch removes all gl_config's with swapMethod=GLX_SWAP_COPY_OML. When
> page flipping, we are unable to comply with swap-copy semantics.
>
> CC: Eric Anholt <eric at anholt.net>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
> src/mesa/drivers/dri/intel/intel_screen.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
> index 3c595bc..1010615 100644
> --- a/src/mesa/drivers/dri/intel/intel_screen.c
> +++ b/src/mesa/drivers/dri/intel/intel_screen.c
> @@ -822,8 +822,9 @@ intel_detect_swizzling(struct intel_screen *screen)
> static __DRIconfig**
> intel_screen_make_configs(__DRIscreen *dri_screen)
> {
> + /* GLX_SWAP_COPY_OML is not supported due to page flipping. */
> static const GLenum back_buffer_modes[] = {
> - GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
> + GLX_SWAP_UNDEFINED_OML, GLX_NONE,
> };
>
> static const uint8_t singlesample_samples[1] = {0};
> @@ -868,8 +869,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
> depth_bits,
> stencil_bits,
> num_depth_stencil_bits,
> - back_buffer_modes,
> - ARRAY_SIZE(back_buffer_modes),
> + back_buffer_modes, 2,
> singlesample_samples, 1,
> false);
> configs = driConcatConfigs(configs, new_configs);
> @@ -891,7 +891,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
>
> new_configs = driCreateConfigs(fb_format[i], fb_type[i],
> depth_bits, stencil_bits, 1,
> - back_buffer_modes + 1, 1,
> + back_buffer_modes, 1,
> singlesample_samples, 1,
> true);
> configs = driConcatConfigs(configs, new_configs);
> @@ -908,7 +908,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
> *
> * Only doublebuffer configs with GLX_SWAP_UNDEFINED_OML behavior are
> * supported. Singlebuffer configs are not supported because no one wants
> - * them. GLX_SWAP_COPY_OML is not supported due to page flipping.
> + * them.
> */
> for (int i = 0; i < ARRAY_SIZE(fb_format); i++) {
> if (screen->gen < 6)
> @@ -938,7 +938,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
> depth_bits,
> stencil_bits,
> num_depth_stencil_bits,
> - back_buffer_modes + 1, 1,
> + back_buffer_modes, 1,
> multisample_samples,
> num_msaa_modes,
> false);
> --
> 1.7.11.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list