mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
zink: rework zink_kopper_update() assert
the dt might have been killed, so just assert that it's a display target
fixes #6317
Fixes: 8ade5588e3 ("zink: add kopper api")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16017>
This commit is contained in:
parent
9ecdc2e985
commit
3d97367a60
1 changed files with 3 additions and 1 deletions
|
|
@ -681,7 +681,9 @@ zink_kopper_update(struct pipe_screen *pscreen, struct pipe_resource *pres, int
|
|||
{
|
||||
struct zink_resource *res = zink_resource(pres);
|
||||
struct zink_screen *screen = zink_screen(pscreen);
|
||||
assert(res->obj->dt);
|
||||
assert(pres->bind & PIPE_BIND_DISPLAY_TARGET);
|
||||
if (!res->obj->dt)
|
||||
return false;
|
||||
struct kopper_displaytarget *cdt = kopper_displaytarget(res->obj->dt);
|
||||
if (cdt->type != KOPPER_X11) {
|
||||
*w = res->base.b.width0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue