On Fri, Nov 27, 2015 at 11:03:05AM +0100, Neil Roberts wrote:
> "Pohjolainen, Topi" <topi.pohjolai...@intel.com> writes:
> 
> >>    glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo);
> >>    piglit_draw_rect(offset * 16 * 2.0f / piglit_width - 1.0f,
> >
> > This is a question regarding the existing logic. Earlier the test
> > calls "glBindFramebuffer(GL_FRAMEBUFFER, fbo)" and clears the
> > framebuffer desigbated by "fbo". Then just above the test sets the
> > target framebuffer to "piglit_winsys_fbo", and blits into
> > "piglit_winsys_fbo" using piglit_draw_rect(). Please bare with me, but
> > I understand the idea being that the cleared values from "fbo" are
> > blit to "piglit_winsys_fbo". But "glBindFramebuffer(GL_FRAMEBUFFER,
> > piglit_winsys_fbo)" sets "piglit_winsys_fbo" both as source and
> > destination, doesn't it?
> 
> That is correct, but the read buffer is only used for a blit, ie when
> calling glBlitFramebuffer. This is not actually doing a blit but is
> instead drawing a regular rectangle while using the texture from the
> test framebuffer as a texture source. That means only the draw
> framebuffer is actually used. The idea of the test is to test sampling
> from the surface so that we can be sure the clear color programmed in
> the texture surface state works correctly, so I think it makes sense
> here to explicitly use the surface as a texture source rather than a
> blit.

Thanks for the explanation, it makes sense now. The patch is:

Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com>
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to