mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 17:29:02 +02:00
fix PR_* definitions to match original definitions
This commit is contained in:
parent
3f1341a7fb
commit
e7ce909f8f
4 changed files with 24 additions and 32 deletions
|
|
@ -790,12 +790,10 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev,
|
|||
if (sarea_priv->dirty)
|
||||
i810EmitState( dev );
|
||||
|
||||
DRM_DEBUG("dispatch vertex addr 0x%lx, used 0x%x nbox %d\n",
|
||||
address, used, nbox);
|
||||
|
||||
if (buf_priv->currently_mapped == I810_BUF_MAPPED) {
|
||||
*(u32 *)buf_priv->virtual = (GFX_OP_PRIMITIVE |
|
||||
sarea_priv->vertex_prim |
|
||||
unsigned int prim = (sarea_priv->vertex_prim & PR_MASK);
|
||||
|
||||
*(u32 *)buf_priv->virtual = (GFX_OP_PRIMITIVE | prim |
|
||||
((used/4)-2));
|
||||
|
||||
if (used & 4) {
|
||||
|
|
@ -965,9 +963,6 @@ int i810_dma_vertex(struct inode *inode, struct file *filp,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
DRM_DEBUG("i810 dma vertex, idx %d used %d discard %d\n",
|
||||
vertex.idx, vertex.used, vertex.discard);
|
||||
|
||||
if(vertex.idx < 0 || vertex.idx > dma->buf_count) return -EINVAL;
|
||||
|
||||
i810_dma_dispatch_vertex( dev,
|
||||
|
|
|
|||
|
|
@ -191,14 +191,15 @@ typedef struct _drm_i810_copy_t {
|
|||
void *address; /* Address to copy from */
|
||||
} drm_i810_copy_t;
|
||||
|
||||
#define PR_TRIANGLES (0x0)
|
||||
#define PR_TRISTRIP_0 (0x1)
|
||||
#define PR_TRISTRIP_1 (0x2)
|
||||
#define PR_TRIFAN (0x3)
|
||||
#define PR_POLYGON (0x4)
|
||||
#define PR_LINES (0x5)
|
||||
#define PR_LINESTRIP (0x6)
|
||||
#define PR_RECTS (0x7)
|
||||
#define PR_TRIANGLES (0x0<<18)
|
||||
#define PR_TRISTRIP_0 (0x1<<18)
|
||||
#define PR_TRISTRIP_1 (0x2<<18)
|
||||
#define PR_TRIFAN (0x3<<18)
|
||||
#define PR_POLYGON (0x4<<18)
|
||||
#define PR_LINES (0x5<<18)
|
||||
#define PR_LINESTRIP (0x6<<18)
|
||||
#define PR_RECTS (0x7<<18)
|
||||
#define PR_MASK (0x7<<18)
|
||||
|
||||
|
||||
typedef struct drm_i810_dma {
|
||||
|
|
|
|||
|
|
@ -790,12 +790,10 @@ static void i810_dma_dispatch_vertex(drm_device_t *dev,
|
|||
if (sarea_priv->dirty)
|
||||
i810EmitState( dev );
|
||||
|
||||
DRM_DEBUG("dispatch vertex addr 0x%lx, used 0x%x nbox %d\n",
|
||||
address, used, nbox);
|
||||
|
||||
if (buf_priv->currently_mapped == I810_BUF_MAPPED) {
|
||||
*(u32 *)buf_priv->virtual = (GFX_OP_PRIMITIVE |
|
||||
sarea_priv->vertex_prim |
|
||||
unsigned int prim = (sarea_priv->vertex_prim & PR_MASK);
|
||||
|
||||
*(u32 *)buf_priv->virtual = (GFX_OP_PRIMITIVE | prim |
|
||||
((used/4)-2));
|
||||
|
||||
if (used & 4) {
|
||||
|
|
@ -965,9 +963,6 @@ int i810_dma_vertex(struct inode *inode, struct file *filp,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
DRM_DEBUG("i810 dma vertex, idx %d used %d discard %d\n",
|
||||
vertex.idx, vertex.used, vertex.discard);
|
||||
|
||||
if(vertex.idx < 0 || vertex.idx > dma->buf_count) return -EINVAL;
|
||||
|
||||
i810_dma_dispatch_vertex( dev,
|
||||
|
|
|
|||
|
|
@ -191,14 +191,15 @@ typedef struct _drm_i810_copy_t {
|
|||
void *address; /* Address to copy from */
|
||||
} drm_i810_copy_t;
|
||||
|
||||
#define PR_TRIANGLES (0x0)
|
||||
#define PR_TRISTRIP_0 (0x1)
|
||||
#define PR_TRISTRIP_1 (0x2)
|
||||
#define PR_TRIFAN (0x3)
|
||||
#define PR_POLYGON (0x4)
|
||||
#define PR_LINES (0x5)
|
||||
#define PR_LINESTRIP (0x6)
|
||||
#define PR_RECTS (0x7)
|
||||
#define PR_TRIANGLES (0x0<<18)
|
||||
#define PR_TRISTRIP_0 (0x1<<18)
|
||||
#define PR_TRISTRIP_1 (0x2<<18)
|
||||
#define PR_TRIFAN (0x3<<18)
|
||||
#define PR_POLYGON (0x4<<18)
|
||||
#define PR_LINES (0x5<<18)
|
||||
#define PR_LINESTRIP (0x6<<18)
|
||||
#define PR_RECTS (0x7<<18)
|
||||
#define PR_MASK (0x7<<18)
|
||||
|
||||
|
||||
typedef struct drm_i810_dma {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue