[PATCH 2/2] wined3d: Pass a wined3d_device pointer to wined3d_from_cs().

Henri Verbeet hverbeet at gmail.com
Fri Jul 2 08:48:35 CDT 2021

On Fri, 2 Jul 2021 at 00:35, Zebediah Figura <z.figura12 at gmail.com> wrote:
>  static BOOL wined3d_cs_queue_is_empty(const struct wined3d_cs *cs, const struct wined3d_cs_queue *queue)
>  {
> -    wined3d_from_cs(cs);
> +    wined3d_from_cs(cs->c.device);
>      return *(volatile LONG *)&queue->head == queue->tail;
>  }
This introduces a race though. If wined3d_cs_run() gets to
wined3d_cs_queue_is_empty() before wined3d_device_init() gets to the
"device->cs" assignment, wined3d_from_cs() will dereference a NULL

More information about the wine-devel mailing list