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

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i810/i810ioctl.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/i810/i810ioctl.h,v 1.7 2002/10/30 12:51:33 alanh Exp $ */
 
2
 
 
3
#ifndef I810_IOCTL_H
 
4
#define I810_IOCTL_H
 
5
 
 
6
#include "i810context.h"
 
7
 
 
8
void i810EmitPrim( i810ContextPtr imesa );
 
9
void i810FlushPrims( i810ContextPtr mmesa ); 
 
10
void i810FlushPrimsLocked( i810ContextPtr mmesa );
 
11
void i810FlushPrimsGetBuffer( i810ContextPtr imesa );
 
12
 
 
13
void i810WaitAgeLocked( i810ContextPtr imesa, int age );
 
14
void i810WaitAge( i810ContextPtr imesa, int age );
 
15
void i810DmaFinish( i810ContextPtr imesa );
 
16
void i810RegetLockQuiescent( i810ContextPtr imesa );
 
17
void i810InitIoctlFuncs( struct dd_function_table *functions );
 
18
void i810CopyBuffer( const __DRIdrawablePrivate *dpriv );
 
19
void i810PageFlip( const __DRIdrawablePrivate *dpriv );
 
20
int i810_check_copy(int fd);
 
21
 
 
22
#define I810_STATECHANGE(imesa, flag)                           \
 
23
do {                                                            \
 
24
   if (imesa->vertex_low != imesa->vertex_last_prim)            \
 
25
      i810FlushPrims(imesa);                                    \
 
26
   imesa->dirty |= flag;                                        \
 
27
} while (0)                                                     \
 
28
 
 
29
 
 
30
#define I810_FIREVERTICES(imesa)                                \
 
31
do {                                                            \
 
32
   if (imesa->vertex_buffer) {                                  \
 
33
      i810FlushPrims(imesa);                                    \
 
34
   }                                                            \
 
35
} while (0)
 
36
 
 
37
static __inline GLuint *i810AllocDmaLow( i810ContextPtr imesa, int bytes )
 
38
{
 
39
   if (imesa->vertex_low + bytes > imesa->vertex_high) 
 
40
      i810FlushPrimsGetBuffer( imesa );
 
41
 
 
42
   {
 
43
      GLuint *start = (GLuint *)(imesa->vertex_addr + imesa->vertex_low);
 
44
      imesa->vertex_low += bytes;
 
45
      return start;
 
46
   }
 
47
}
 
48
 
 
49
#endif