[Piglit] [PATCH 1/4] mulitsample-fast-clear: Test enabling GL_FRAMEBUFFER_SRGB

Neil Roberts neil at linux.intel.com
Fri Nov 27 02:03:05 PST 2015


"Pohjolainen, Topi" <topi.pohjolainen at 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.

Regards,
- Neil


More information about the Piglit mailing list