summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-10-12 14:08:00 -0700
committerEric Anholt <[email protected]>2010-10-12 14:08:00 -0700
commit3316a542050182d159ed5e5e07aa62839f293b69 (patch)
tree801de4117eff419a4b80e6eee1c1be0e2de05065
parent080e7aface81e6a055ac61988ca27a88ad70f879 (diff)
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.
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c2
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 6efb2ddc553..d59b8711f23 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);