Reviewed-by: Iago Toral Quiroga <ito...@igalia.com> On Wed, 2015-07-22 at 11:54 -0700, Anuj Phogat wrote: > _mesa_meta_pbo_GetTexSubImage() uses _mesa_meta_BlitFrameBuffer(), > which will do fragment clamping if enabled. But fragment clamping > doesn't affect ReadPixels and GetTexImage. > > Without this patch, piglit test arb_color_buffer_float-clear fails, > when forced to use the meta pbo path. > > v2: Apply this fix to both glReadPixels and glGetTexImage. > > Cc: <mesa-sta...@lists.freedesktop.org> > Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> > --- > src/mesa/drivers/common/meta_tex_subimage.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/mesa/drivers/common/meta_tex_subimage.c > b/src/mesa/drivers/common/meta_tex_subimage.c > index 6d7c1eb..038d525 100644 > --- a/src/mesa/drivers/common/meta_tex_subimage.c > +++ b/src/mesa/drivers/common/meta_tex_subimage.c > @@ -25,6 +25,7 @@ > * Jason Ekstrand <jason.ekstr...@intel.com> > */ > > +#include "blend.h" > #include "bufferobj.h" > #include "buffers.h" > #include "fbobject.h" > @@ -331,6 +332,10 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, > GLuint dims, > _mesa_meta_begin(ctx, ~(MESA_META_PIXEL_TRANSFER | > MESA_META_PIXEL_STORE)); > > + /* GL_CLAMP_FRAGMENT_COLOR doesn't affect ReadPixels and GettexImage */ > + if (ctx->Extensions.ARB_color_buffer_float) > + _mesa_ClampColor(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE); > + > _mesa_GenFramebuffers(2, fbos); > > if (tex_image && tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev