[Mesa-dev] [PATCH mesa] egl: properly count configs

Emil Velikov emil.l.velikov at gmail.com
Tue Jun 20 07:59:49 UTC 2017


On 16 June 2017 at 00:55, Eric Engestrom <eric at engestrom.ch> wrote:
> dri2_conf represents a similar config (which shouldn't be counted)
> if its config has the ID EGL_DONT_CARE.
>
> Reported-by: Liu Zhiquan <zhiquan.liu at intel.com>
> Signed-off-by: Eric Engestrom <eric at engestrom.ch>
> ---
>
> Re-implemented Liu Zhiquan's fix, without all the unnecessary changes,
> and applied to all platforms, but with one major change: compare against
> the one value that means the config shouldn't be counted.
>
Thanks Eric. I'm not sure if comparing against DONT_CARE is correct here.

Upon calling dri2_add_config() the "base" config ID is set to "count +
1" via a) restored. At a later stage ConfigID is discarded for the
config search (_eglFilterArray) and depending on the result we a)
restore the ID no existing config found or b) reuse the existing egl
config, attaching the dri config to it.

Since one cannot have a config with ConfigID == EGL_DON_CARE (props to
_eglValidateConfig) the new code will trigger even when not needed.

Although I could be missing something?
-Emil


More information about the mesa-dev mailing list