diff options
author | Anuj Phogat <[email protected]> | 2015-05-06 05:43:08 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-08-01 16:27:40 +0100 |
commit | 831bf63e6b55c4f1f610a2fb988906550157172a (patch) | |
tree | cdfaabe748dec4044c1e28b9de193f956430937b /src | |
parent | 6321bf72be877fe3efc81bd9e3c6d645d6b6ed9a (diff) |
meta: Don't do fragment color clamping in _mesa_meta_pbo_GetTexSubImage
_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: <[email protected]>
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
(cherry picked from commit ca4e17e03e9aeaa04fe6bb04bfe2d6f97991005b)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/common/meta_tex_subimage.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c index 679e1353264..f360ed45c3a 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 <[email protected]> */ +#include "blend.h" #include "bufferobj.h" #include "buffers.h" #include "fbobject.h" @@ -330,6 +331,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) { |