loader,glx,egl/x11: init dri_screen_display_gpu in struct loader_dri3_drawable
Initialize dri_screendisplay_gpu variable in struct laoder_dri3_drawable. Also make dri_screen_display_gpu variable as input parameter to function loader_dri3_drawable_init() since dri_screen variable is initialized this way. This also helps to avoid duplicate initializing dri_screen_display_gpu in glx and egl code. Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
This commit is contained in:

committed by
Marge Bot

parent
5519dd0bd1
commit
94946251d0
@@ -364,7 +364,7 @@ dri3_create_drawable(struct glx_screen *base, XID xDrawable,
|
||||
if (loader_dri3_drawable_init(XGetXCBConnection(base->dpy),
|
||||
xDrawable,
|
||||
glx_to_loader_dri3_drawable_type(type),
|
||||
psc->driScreen,
|
||||
psc->driScreen, psc->driScreenDisplayGPU,
|
||||
psc->is_different_gpu, has_multibuffer,
|
||||
psc->prefer_back_buffer_reuse,
|
||||
config->driConfig,
|
||||
@@ -374,7 +374,6 @@ dri3_create_drawable(struct glx_screen *base, XID xDrawable,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pdraw->loader_drawable.dri_screen_display_gpu = psc->driScreenDisplayGPU;
|
||||
return &pdraw->base;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user