Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067>
|| (i > 0 && ctx->API == API_OPENGLES)) {
return NULL;
}
+ assert(BUFFER_COLOR0 + i < ARRAY_SIZE(fb->Attachment));
return &fb->Attachment[BUFFER_COLOR0 + i];
case GL_DEPTH_STENCIL_ATTACHMENT:
if (!_mesa_is_desktop_gl(ctx) && !_mesa_is_gles3(ctx))
const unsigned i = attachment - GL_COLOR_ATTACHMENT0;
if (i >= ctx->Const.MaxColorAttachments)
return NULL;
+ assert(BUFFER_COLOR0 + i < ARRAY_SIZE(fb->Attachment));
return &fb->Attachment[BUFFER_COLOR0 + i];
}
case GL_DEPTH: