meta: Fix transfer operations check in meta pbo path for readpixels
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 20 May 2015 17:21:39 +0000 (10:21 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 24 Jul 2015 17:48:58 +0000 (10:48 -0700)
commit1252d53c19ec005c17ca666cecb7db072d77e5ce
treefc6b24a7f50f3a3b35a4cc0f5b3adfb53457d91c
parent7974e23be9ff7586e5250cff321b6ec7749ecc44
meta: Fix transfer operations check in meta pbo path for readpixels

Currently used ctx->_ImageTransferState check is not sufficient
because it doesn't include the read color clamping enabled with
GL_CLAMP_READ_COLOR. So, use the helper function
_mesa_get_readpixels_transfer_ops().

Also, transfer operations don't affect glGetTexImage(). So, do
the check only for glReadPixles.

Without this patch, arb_color_buffer_float-readpixels test fails, when
forced to use meta pbo path.

V2: Add a comment and bump up the commit message.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/common/meta_tex_subimage.c