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:
https://www.khronos.org/registry/webgl/sdk/tests/conformance2/renderbuffers/invalidate-framebuffer.html?webglVersion=2&quiet=0&quick=1

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111756Reviewed-By: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
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)
return;
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