[cairo] [PATCH 3/3] gl: Remove fixed-function related code paths

Eric Anholt eric at anholt.net
Mon Jan 31 16:08:52 PST 2011


On Sun, 30 Jan 2011 14:08:01 +0200, Alexandros Frantzis <alexandros.frantzis at linaro.org> wrote:
> On Sun, Jan 30, 2011 at 05:47:38PM +1000, Eric Anholt wrote:
> > On Fri, 28 Jan 2011 15:02:54 +0200, Alexandros Frantzis <alexandros.frantzis at linaro.org> wrote:
> > > Fixed-function related code paths are no longer used, as we require shader
> > > support for the gl backend.
> > > ---
> > >  src/cairo-gl-composite.c |  106 +--------------------------------------------
> > >  src/cairo-gl-device.c    |    6 ---
> > >  src/cairo-gl-private.h   |    1 -
> > >  3 files changed, 3 insertions(+), 110 deletions(-)
> > 
> > [...]
> > 
> > >      case CAIRO_GL_OPERAND_TEXTURE:
> > >          glActiveTexture (GL_TEXTURE0 + tex_unit);
> > >          glBindTexture (ctx->tex_target, operand->texture.tex);
> > > -        glEnable (ctx->tex_target);
> > >          _cairo_gl_texture_set_extend (ctx, ctx->tex_target,
> > >                                        operand->texture.attributes.extend);
> > >          _cairo_gl_texture_set_filter (ctx, ctx->tex_target,
> > > @@ -642,7 +569,6 @@ _cairo_gl_context_setup_operand (cairo_gl_context_t *ctx,
> > >          glBindTexture (GL_TEXTURE_1D, operand->gradient.gradient->tex);
> > >          _cairo_gl_texture_set_extend (ctx, GL_TEXTURE_1D, operand->gradient.extend);
> > >          _cairo_gl_texture_set_filter (ctx, GL_TEXTURE_1D, CAIRO_FILTER_BILINEAR);
> > > -        glEnable (GL_TEXTURE_1D);
> > >  
> > >  	glClientActiveTexture (GL_TEXTURE0 + tex_unit);
> > >  	glTexCoordPointer (2, GL_FLOAT, vertex_size,
> > 
> > Have you run this through the testsuite?  It doesn't seem like this
> > should work with all the glEnable() of the texturing stripped out.
> 
> glEnable(GL_TEXTURE_*) calls have no effect in this case, since we use
> shaders exclusively (so texturing is explicitly handled in the fragment
> shader).

I had never realized this feature of using shaders, despite having
actually hacked on code right next to it in Mesa.

I've reviewed and pushed your changes, since we seem to have consensus.
Thanks for the cleanup!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110131/4abb23f3/attachment.pgp>


More information about the cairo mailing list