1/**************************************************************************
2
3Copyright (C) 2004 Nicolai Haehnle.
4Copyright (C) The Weather Channel, Inc.  2002.  All Rights Reserved.
5
6The Weather Channel (TM) funded Tungsten Graphics to develop the
7initial release of the Radeon 8500 driver under the XFree86 license.
8This notice must be preserved.
9
10All Rights Reserved.
11
12Permission is hereby granted, free of charge, to any person obtaining a
13copy of this software and associated documentation files (the "Software"),
14to deal in the Software without restriction, including without limitation
15on the rights to use, copy, modify, merge, publish, distribute, sub
16license, and/or sell copies of the Software, and to permit persons to whom
17the Software is furnished to do so, subject to the following conditions:
18
19The above copyright notice and this permission notice (including the next
20paragraph) shall be included in all copies or substantial portions of the
21Software.
22
23THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
26ATI, VA LINUX SYSTEMS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
27DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
28OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
29USE OR OTHER DEALINGS IN THE SOFTWARE.
30
31**************************************************************************/
32
33#ifndef RADEON_DMA_H
34#define RADEON_DMA_H
35
36void radeonEmitVec4(uint32_t *out, const GLvoid * data, int stride, int count);
37void radeonEmitVec8(uint32_t *out, const GLvoid * data, int stride, int count);
38void radeonEmitVec12(uint32_t *out, const GLvoid * data, int stride, int count);
39void radeonEmitVec16(uint32_t *out, const GLvoid * data, int stride, int count);
40
41void rcommon_emit_vector(struct gl_context * ctx, struct radeon_aos *aos,
42			 const GLvoid * data, int size, int stride, int count);
43void rcommon_emit_vecfog(struct gl_context *ctx, struct radeon_aos *aos,
44			 GLvoid *data, int stride, int count);
45
46void radeonReturnDmaRegion(radeonContextPtr rmesa, int return_bytes);
47void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size);
48void radeon_init_dma(radeonContextPtr rmesa);
49void radeonReturnDmaRegion(radeonContextPtr rmesa, int return_bytes);
50void radeonAllocDmaRegion(radeonContextPtr rmesa,
51			  struct radeon_bo **pbo, int *poffset,
52			  int bytes, int alignment);
53void radeonReleaseDmaRegions(radeonContextPtr rmesa);
54
55void rcommon_flush_last_swtcl_prim(struct gl_context *ctx);
56
57void *rcommonAllocDmaLowVerts(radeonContextPtr rmesa, int nverts, int vsize);
58void radeonFreeDmaRegions(radeonContextPtr rmesa);
59void radeonReleaseArrays( struct gl_context *ctx, GLuint newinputs );
60#endif
61