meta: Use _mesa_get_format_bits() to get the GL_RED_BITS
authorAnuj Phogat <anuj.phogat@gmail.com>
Thu, 12 Jun 2014 01:07:36 +0000 (18:07 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Tue, 5 Aug 2014 00:19:41 +0000 (17:19 -0700)
commit7de90890c64d019c56e5a06e427b207220729997
tree7f9fe7a909d51aaa4ecb969dc1f4f3e6d48e442d
parent9796a1726545eebb6cf387945cd076bb49de2598
meta: Use _mesa_get_format_bits() to get the GL_RED_BITS

We currently get red bits from ctx->DrawBuffer->Visual.redBits
by making a false assumption that the texture we're writing to
(in glCopyTexImage2D()) is used as a DrawBuffer.

Fixes many failures in gles3 Khronos CTS test:
copy_tex_image_conversions_required

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/common/meta.c