Mesa (master): intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.

Eric Anholt anholt at kemper.freedesktop.org
Tue Oct 12 21:09:32 UTC 2010


Module: Mesa
Branch: master
Commit: 3316a542050182d159ed5e5e07aa62839f293b69
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3316a542050182d159ed5e5e07aa62839f293b69

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Oct 12 14:08:00 2010 -0700

intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.

The format selection of the CopyTexSubImage is pretty bogus still, but
this at least avoids software fallbacks in nexuiz, bringing
performance from 7.5fps to 12.8fps on my machine.

---

 src/mesa/drivers/dri/intel/intel_tex_copy.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 6efb2dd..d59b871 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -72,6 +72,7 @@ get_teximage_source(struct intel_context *intel, GLenum internalFormat)
       if (irb && irb->region && irb->region->cpp == 4)
          return irb->region;
       return NULL;
+   case 4:
    case GL_RGBA:
    case GL_RGBA8:
       irb = intel_renderbuffer(intel->ctx.ReadBuffer->_ColorReadBuffer);
@@ -82,6 +83,7 @@ get_teximage_source(struct intel_context *intel, GLenum internalFormat)
       if (irb->Base._BaseFormat == GL_RGB)
 	 return NULL;
       return irb->region;
+   case 3:
    case GL_RGB:
    case GL_RGB8:
       return intel_readbuf_region(intel);




More information about the mesa-commit mailing list