diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-01-28 23:28:14 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-01-28 23:28:14 +0000 |
commit | 4c5acef241de8e7250dc7ea48fa212677ae1e7db (patch) | |
tree | aa28290246c0ce7cd32e30f3271aeccdd1e41732 | |
parent | 9839e272cfd1ab21911238c7b32c8e771d011f44 (diff) |
Get hardware-accelerated CopyTexSubImage working well enough to run
Brian's gearbox demo.
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_tex.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_tex_copy.c | 20 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tex.c b/src/mesa/drivers/dri/i915/intel_tex.c index 7d481cf534..fb542ed7b5 100644 --- a/src/mesa/drivers/dri/i915/intel_tex.c +++ b/src/mesa/drivers/dri/i915/intel_tex.c @@ -65,6 +65,10 @@ void intelInitTextureFuncs(struct dd_function_table * functions) functions->TexImage2D = intelTexImage2D; functions->TexSubImage1D = intelTexSubImage1D; functions->TexSubImage2D = intelTexSubImage2D; + functions->CopyTexImage1D = intelCopyTexImage1D; + functions->CopyTexImage2D = intelCopyTexImage2D; + functions->CopyTexSubImage1D = intelCopyTexSubImage1D; + functions->CopyTexSubImage2D = intelCopyTexSubImage2D; functions->NewTextureObject = intelNewTextureObject; functions->NewTextureImage = intelNewTextureImage; functions->DeleteTexture = _mesa_delete_texture_object; diff --git a/src/mesa/drivers/dri/i915/intel_tex_copy.c b/src/mesa/drivers/dri/i915/intel_tex_copy.c index 40e1b950bd..127a029d58 100644 --- a/src/mesa/drivers/dri/i915/intel_tex_copy.c +++ b/src/mesa/drivers/dri/i915/intel_tex_copy.c @@ -45,6 +45,9 @@ static struct intel_region *get_teximage_source( struct intel_context *intel, GLenum internalFormat ) { + DBG("%s %s\n", __FUNCTION__, + _mesa_lookup_enum_by_nr(internalFormat)); + switch (internalFormat) { case GL_DEPTH_COMPONENT: case GL_DEPTH_COMPONENT16_ARB: @@ -67,6 +70,21 @@ static struct intel_region *get_teximage_source( struct intel_context *intel, } } +static GLboolean check_copytex_fragment_ops( const GLcontext *ctx ) +{ + return !(ctx->Color.AlphaEnabled || +/* ctx->Depth.Test || */ + ctx->Fog.Enabled || +/* ctx->Scissor.Enabled || */ + ctx->Stencil.Enabled || + !ctx->Color.ColorMask[0] || + !ctx->Color.ColorMask[1] || + !ctx->Color.ColorMask[2] || + !ctx->Color.ColorMask[3] || + ctx->Color.ColorLogicOpEnabled || + ctx->Texture._EnabledUnits); +} + static GLboolean do_copy_texsubimage( struct intel_context *intel, struct intel_texture_image *intelImage, @@ -82,7 +100,7 @@ static GLboolean do_copy_texsubimage( struct intel_context *intel, if (!intelImage->mt) return GL_FALSE; - if (!intel_check_color_per_fragment_ops( ctx )) + if (!check_copytex_fragment_ops( ctx )) return GL_FALSE; |