mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
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: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit ca4e17e03e)
This commit is contained in:
parent
6321bf72be
commit
831bf63e6b
1 changed files with 5 additions and 0 deletions
|
|
@ -25,6 +25,7 @@
|
|||
* Jason Ekstrand <jason.ekstrand@intel.com>
|
||||
*/
|
||||
|
||||
#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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue