~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_linetmp.h,v 1.2 2002/02/22 21:32:58 dawes Exp $ */
 
2
 
 
3
static __inline void TAG(ffb_line)(GLcontext *ctx, ffb_vertex *v0, 
 
4
                                   ffb_vertex *v1 )
 
5
{
 
6
        ffbContextPtr fmesa = FFB_CONTEXT(ctx);
 
7
        ffb_fbcPtr ffb = fmesa->regs;
 
8
#if (IND & FFB_LINE_FLAT_BIT)
 
9
        const GLuint const_fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( v1->color[0] );
 
10
#endif
 
11
        FFB_DELAYED_VIEWPORT_VARS;
 
12
 
 
13
#ifdef FFB_LINE_TRACE
 
14
        fprintf(stderr, "FFB: ffb_line ["
 
15
#if (IND & FFB_LINE_FLAT_BIT)
 
16
                " FLAT"
 
17
#endif
 
18
#if (IND & FFB_LINE_ALPHA_BIT)
 
19
                " ALPHA"
 
20
#endif
 
21
                " ]\n");
 
22
#endif
 
23
 
 
24
#if (IND & FFB_LINE_FLAT_BIT)
 
25
        FFBFifo(fmesa, 1);
 
26
        ffb->fg = const_fg;
 
27
#ifdef FFB_LINE_TRACE
 
28
        fprintf(stderr, "FFB: ffb_line confg_fg[%08x]\n", const_fg);
 
29
#endif
 
30
#endif
 
31
 
 
32
#if (IND & FFB_LINE_FLAT_BIT)
 
33
        /* (2 * 3) + 1 */
 
34
        FFBFifo(fmesa, 7);
 
35
#else
 
36
#if (IND & FFB_LINE_ALPHA_BIT)
 
37
        /* (2 * 7) + 1 */
 
38
        FFBFifo(fmesa, 15);
 
39
#else
 
40
        /* (2 * 6) + 1 */
 
41
        FFBFifo(fmesa, 13);
 
42
#endif
 
43
#endif
 
44
 
 
45
        /* Using DDLINE or AALINE, init the line pattern state. */
 
46
        ffb->lpat = fmesa->lpat;
 
47
 
 
48
#if !(IND & FFB_LINE_FLAT_BIT)
 
49
#if (IND & FFB_LINE_ALPHA_BIT)
 
50
        ffb->alpha      = FFB_GET_ALPHA(v0);
 
51
#endif
 
52
        ffb->red        = FFB_GET_RED(v0);
 
53
        ffb->green      = FFB_GET_GREEN(v0);
 
54
        ffb->blue       = FFB_GET_BLUE(v0);
 
55
#endif
 
56
        ffb->z          = FFB_GET_Z(v0);
 
57
        ffb->ryf        = FFB_GET_Y(v0);
 
58
        ffb->rxf        = FFB_GET_X(v0);
 
59
 
 
60
#if !(IND & FFB_LINE_FLAT_BIT)
 
61
#if (IND & FFB_LINE_ALPHA_BIT)
 
62
        ffb->alpha      = FFB_GET_ALPHA(v1);
 
63
#endif
 
64
        ffb->red        = FFB_GET_RED(v1);
 
65
        ffb->green      = FFB_GET_GREEN(v1);
 
66
        ffb->blue       = FFB_GET_BLUE(v1);
 
67
#endif
 
68
        ffb->z          = FFB_GET_Z(v1);
 
69
        ffb->y          = FFB_GET_Y(v1);
 
70
        ffb->x          = FFB_GET_X(v1);
 
71
 
 
72
        fmesa->ffbScreen->rp_active = 1;
 
73
}
 
74
 
 
75
static void TAG(init)(void)
 
76
{
 
77
        ffb_line_tab[IND] = TAG(ffb_line);
 
78
}
 
79
 
 
80
#undef IND
 
81
#undef TAG