Commit ec81f19b authored by Kenneth Graunke's avatar Kenneth Graunke

st/mesa: Bail on incomplete attachments in discard_framebuffer

Incomplete attachments don't have an associated pipe_surface, so
this would crash.

Fixes a WebGL conformance test that uses incomplete attachments:

Bugzilla: Tapani Pälli's avatarTapani Pälli <>
parent d2147787
......@@ -778,7 +778,7 @@ st_discard_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
struct st_context *st = st_context(ctx);
struct pipe_resource *prsc;
if (!att->Renderbuffer)
if (!att->Renderbuffer || !att->Complete)
prsc = st_renderbuffer(att->Renderbuffer)->surface->texture;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment