From 3316a542050182d159ed5e5e07aa62839f293b69 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 12 Oct 2010 14:08:00 -0700 Subject: 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 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c index 6efb2ddc55..d59b8711f2 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); -- cgit v1.2.3