~ubuntu-branches/ubuntu/quantal/mesa-glw/quantal

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/ffb/ffb_pointtmp.h

  • Committer: Bazaar Package Importer
  • Author(s): Morten Kjeldgaard
  • Date: 2008-05-06 16:19:15 UTC
  • Revision ID: james.westby@ubuntu.com-20080506161915-uynz7nftmfixu6bq
Tags: upstream-7.0.3
ImportĀ upstreamĀ versionĀ 7.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $XFree86: xc/lib/GL/mesa/src/drv/ffb/ffb_pointtmp.h,v 1.3 2002/02/22 21:32:59 dawes Exp $ */
 
2
 
 
3
static __inline void TAG(ffb_draw_point)(GLcontext *ctx, ffb_vertex *tmp )
 
4
{
 
5
        ffbContextPtr fmesa = FFB_CONTEXT(ctx);
 
6
        ffb_fbcPtr ffb = fmesa->regs;
 
7
        FFB_DELAYED_VIEWPORT_VARS;
 
8
 
 
9
#ifdef FFB_POINT_TRACE
 
10
        fprintf(stderr, "FFB: ffb_point ["
 
11
#if (IND & FFB_POINT_AA_BIT)
 
12
                "AA"
 
13
#endif
 
14
                "] X(%f) Y(%f) Z(%f)\n",
 
15
                tmp->x, tmp->y, tmp->z);
 
16
#endif
 
17
 
 
18
#if (IND & FFB_POINT_AA_BIT)
 
19
        FFBFifo(fmesa, 4);
 
20
                        
 
21
        ffb->fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( tmp->color[0] );
 
22
        ffb->z = FFB_GET_Z(tmp);
 
23
        ffb->y = FFB_GET_Y(tmp) + 0x8000 /* FIX ME */;
 
24
        ffb->x = FFB_GET_X(tmp) + 0x8000 /* FIX ME */;
 
25
#else
 
26
        {
 
27
                unsigned int const_fg, const_z, h, w;
 
28
 
 
29
                const_fg = FFB_PACK_CONST_UBYTE_ARGB_COLOR( tmp->color[0] );
 
30
                const_z = Z_FROM_MESA(FFB_Z_TO_FLOAT(FFB_GET_Z(tmp)));
 
31
                h = FFB_GET_Y(tmp) >> 16;
 
32
                w = FFB_GET_X(tmp) >> 16;
 
33
#ifdef FFB_POINT_TRACE
 
34
                fprintf(stderr, "FFB: ffb_point fg(%08x) z(%08x) h(%08x) w(%08x)\n",
 
35
                        const_fg, const_z, h, w);
 
36
#endif
 
37
                FFBFifo(fmesa, 4);
 
38
                ffb->fg = const_fg;
 
39
                ffb->constz = const_z;
 
40
                ffb->bh = h;
 
41
                ffb->bw = w;
 
42
        }
 
43
#endif
 
44
 
 
45
        fmesa->ffbScreen->rp_active = 1;
 
46
}
 
47
 
 
48
 
 
49
static void TAG(init)(void)
 
50
{
 
51
        ffb_point_tab[IND] = TAG(ffb_draw_point);
 
52
}
 
53
 
 
54
#undef IND
 
55
#undef TAG