OSDN Git Service

intel: Support blitting to multiple color draw buffers
authorAnuj Phogat <anuj.phogat@gmail.com>
Wed, 12 Dec 2012 03:36:05 +0000 (19:36 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 15 Jan 2013 23:08:55 +0000 (15:08 -0800)
commitb77243b9c245fd5957aa6d615a3d83d061f51cc1
treede3641a49b29210573ed52a9f93084d2082bfc13
parent0c535ae7fc703e10c1df7a108e8704263d7b75d3
intel: Support blitting to multiple color draw buffers

This patch enables blitting to multiple color attachments of a
framebuffer.  It also fixes a case when blitting to a framebuffer with
renderbuffer/texture attached to non-zero attachment point
i.e. GL_COLOR_ATTACHMENT{1, 2, ...}.  Earlier we were incorrectly
blitting to GL_COLOR_ATTACHMENT0 by default.

V2: Use intel_copy_texsubimage() for blitting only if all the color
attachments can blit using it.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/intel/intel_fbo.c