stfb->iface is always non-NULL for an st_framebuffer. These checks
were incorrect, relying on out-of-bounds memory access in the
surface-less case of EGL_KHR_surfaceless_context.
v2: remove redundant stread check (Marek)
Reviewed-by: Marek Olšák <marek@olsak@amd.com> (v2)
stdraw = st_ws_framebuffer(st->ctx->DrawBuffer);
stread = st_ws_framebuffer(st->ctx->ReadBuffer);
- if (stdraw && stdraw->iface)
+ if (stdraw)
stdraw->iface_stamp = p_atomic_read(&stdraw->iface->stamp) - 1;
- if (stread && stread != stdraw && stread->iface)
+ if (stread && stread != stdraw)
stread->iface_stamp = p_atomic_read(&stread->iface->stamp) - 1;
}
boolean changed = FALSE;
int32_t new_stamp;
- /* Check for incomplete framebuffers (e.g. EGL_KHR_surfaceless_context) */
- if (!stfb->iface)
- return;
-
new_stamp = p_atomic_read(&stfb->iface->stamp);
if (stfb->iface_stamp == new_stamp)
return;
enum pipe_format format;
boolean sw;
- if (!stfb->iface)
- return FALSE;
-
assert(_mesa_is_winsys_fbo(&stfb->Base));
/* do not distinguish depth/stencil buffers */