mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-23 06:43:07 +00:00
glamor_egl: Don't pass an (offset) pointer to glamor_egl's screen private to DRI3
dri3 registers it's own screen private, which invalidates the pointer glamor egl passes. Caught with asan Signed-off-by: stefan11111 <stefan11111github@gmail.com>
This commit is contained in:
parent
df2695a184
commit
916e677e7b
1 changed files with 3 additions and 1 deletions
|
|
@ -1726,6 +1726,8 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
|
|||
* to stay out of the way and let it init DRI3 on its own.
|
||||
*/
|
||||
if (!(glamor_priv->flags & GLAMOR_NO_DRI3)) {
|
||||
const dri3_screen_info_rec dri3_info = glamor_egl->dri3_info;
|
||||
|
||||
/* To do DRI3 device FD generation, we need to open a new fd
|
||||
* to the same device we were handed in originally.
|
||||
*/
|
||||
|
|
@ -1733,7 +1735,7 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
|
|||
if (!glamor_egl->device_path)
|
||||
glamor_egl->device_path = drmGetDeviceNameFromFd2(glamor_egl->fd);
|
||||
|
||||
if (!dri3_screen_init(screen, &glamor_egl->dri3_info)) {
|
||||
if (!dri3_screen_init(screen, &dri3_info)) {
|
||||
GLAMOR_LOG_STR(screen->myNum, X_ERROR,
|
||||
"Failed to initialize DRI3.\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue