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
@@ -189,6 +189,7 @@ dri3_create_surface(_EGLDisplay *disp, EGLint type, _EGLConfig *conf,
|
||||
if (loader_dri3_drawable_init(dri2_dpy->conn, drawable,
|
||||
egl_to_loader_dri3_drawable_type(type),
|
||||
dri2_dpy->dri_screen,
|
||||
dri2_dpy->dri_screen_display_gpu,
|
||||
dri2_dpy->is_different_gpu,
|
||||
dri2_dpy->multibuffers_available,
|
||||
true,
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -378,6 +378,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
xcb_drawable_t drawable,
|
||||
enum loader_dri3_drawable_type type,
|
||||
__DRIscreen *dri_screen,
|
||||
__DRIscreen *dri_screen_display_gpu,
|
||||
bool is_different_gpu,
|
||||
bool multiplanes_available,
|
||||
bool prefer_back_buffer_reuse,
|
||||
@@ -397,6 +398,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
draw->type = type;
|
||||
draw->region = 0;
|
||||
draw->dri_screen = dri_screen;
|
||||
draw->dri_screen_display_gpu = dri_screen_display_gpu;
|
||||
draw->is_different_gpu = is_different_gpu;
|
||||
draw->multiplanes_available = multiplanes_available;
|
||||
draw->prefer_back_buffer_reuse = prefer_back_buffer_reuse;
|
||||
|
@@ -208,6 +208,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
|
||||
xcb_drawable_t drawable,
|
||||
enum loader_dri3_drawable_type type,
|
||||
__DRIscreen *dri_screen,
|
||||
__DRIscreen *dri_screen_display_gpu,
|
||||
bool is_different_gpu,
|
||||
bool is_multiplanes_available,
|
||||
bool prefer_back_buffer_reuse,
|
||||
|
Reference in New Issue
Block a user