[Bf-codereview] [PATCH] Fix FDO 34495: Selecting objects in Blender slow due to GL_SELECT

Antony Riakiotakis kalast at gmail.com
Sat Sep 5 08:40:53 CEST 2015


Hi Laura, the two modes are not equivalent. GL Select is more precise
than occlusion queries, that's why we tend to prefer one over the
other.

On 5 September 2015 at 06:45, Laura Ekstrand <laura at jlekstrand.net> wrote:
> Refer to bug: https://bugs.freedesktop.org/show_bug.cgi?id=34495, Comment 78
>
> The default selection mode (File > User Preferences > System > Selection) of
> Automatic preferred using glRenderMode(GL_SELECT) unless the user's GPU was an
> ATI. Since glRenderMode(GL_SELECT) is deprecated, driver developers rely on
> software fallbacks for its implementation.  These software fallbacks are slow.
>
> Since all drivers (including all open source drivers) now implement
> GL_ARB_OCCLUSION_QUERY, this patch sets the selection mode to always
> use occlusion query unless:
>
> 1. GL_ARB_OCCLUSION_QUERY is not present in the driver, or
> 2. The user has selected the GL_SELECT selection mode manually using File >
> User Preferences > System > Selection.
> ---
>  source/blender/gpu/intern/gpu_select.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/source/blender/gpu/intern/gpu_select.c b/source/blender/gpu/intern/gpu_select.c
> index 4978229..0d0dd33 100644
> --- a/source/blender/gpu/intern/gpu_select.c
> +++ b/source/blender/gpu/intern/gpu_select.c
> @@ -243,6 +243,5 @@ bool GPU_select_query_check_support(void)
>  bool GPU_select_query_check_active(void)
>  {
>         return GLEW_ARB_occlusion_query &&
> -              ((U.gpu_select_method == USER_SELECT_USE_OCCLUSION_QUERY) ||
> -               ((U.gpu_select_method == USER_SELECT_AUTO) && GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY)));
> +               (U.gpu_select_method != USER_SELECT_USE_SELECT_RENDERMODE);
>  }
> --
> 2.4.3
>
> _______________________________________________
> Bf-codereview mailing list
> Bf-codereview at blender.org
> http://lists.blender.org/mailman/listinfo/bf-codereview


More information about the Bf-codereview mailing list