Mesa (master): intel: Add support for blit copies of >32bpp formats.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Apr 20 17:51:24 UTC 2011
Module: Mesa
Branch: master
Commit: 0bbbeba2db0f3fd382d2f591bebc248c5ed40fb5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0bbbeba2db0f3fd382d2f591bebc248c5ed40fb5
Author: Eric Anholt <eric at anholt.net>
Date: Fri Apr 15 18:15:59 2011 -0700
intel: Add support for blit copies of >32bpp formats.
The blitter only does up 32bpp at a time, so we handle it by mangling
coordinates and calling the surface 32bpp.
Fixes ARB_texture_rg/fbo-generatemipmap-formats-float with ARB_texture_float.
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/mesa/drivers/dri/intel/intel_blit.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 487c9ea..579a45b 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -146,6 +146,17 @@ intelEmitCopyBlit(struct intel_context *intel,
src_pitch *= cpp;
dst_pitch *= cpp;
+ /* For big formats (such as floating point), do the copy using 32bpp and
+ * multiply the coordinates.
+ */
+ if (cpp > 4) {
+ assert(cpp % 4 == 0);
+ dst_x *= cpp / 4;
+ dst_x2 *= cpp / 4;
+ src_x *= cpp / 4;
+ cpp = 4;
+ }
+
BR13 = br13_for_cpp(cpp) | translate_raster_op(logic_op) << 16;
switch (cpp) {
More information about the mesa-commit
mailing list