On Mon, Aug 17, 2015 at 3:38 PM, Eric Anholt <e...@anholt.net> wrote: > Rob Clark <robdcl...@gmail.com> writes: > >> From: Rob Clark <robcl...@freedesktop.org> >> >> We can use same Driver hook for these, in addition to >> DiscardFramebufferEXT() >> >> Signed-off-by: Rob Clark <robcl...@freedesktop.org> >> --- >> src/mesa/main/fbobject.c | 25 ++++++++++++++++++++++--- >> 1 file changed, 22 insertions(+), 3 deletions(-) >> >> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c >> index 42eec89..bac10e6 100644 >> --- a/src/mesa/main/fbobject.c >> +++ b/src/mesa/main/fbobject.c >> @@ -4003,9 +4003,28 @@ invalidate_framebuffer_storage(struct gl_context *ctx, >> } >> } >> >> - /* We don't actually do anything for this yet. Just return after >> - * validating the parameters and generating the required errors. >> - */ >> + if ((x != 0) || (y != 0)) >> + return; >> + >> + if ((width != fb->Width) || (height != fb->Height)) >> + return; > > I think you want "(width < fb->Width) || (height < fb->Height)" since > _mesa_InvalidateFramebuffer passes MAX_VIEWPORT_WIDTH/HEIGHT.
oh, heh, yeah.. > The loop also looks a lot like the loop in the previous patch. I think > you could just reuse invalidate_framebuffer_storage from > DiscardFramebufferEXT -- DFEXT doesn't explicitly specify the > INVALID_OPERATION for > MaxColorAttachments, but it seems reasonable and > then the new loop only appears once. DFEXT did check for color != attach0 (although I'm not sure if that restriction *should* be dropped if MRT extension supported?) maybe it is safer just to split out a common helper? BR, -R _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev