282e887149917e14c4895b6807a21b8b20f2d08c
[mesa.git] / src / mesa / drivers / dri / r128 / r128_texobj.h
1 /* $XFree86: xc/lib/GL/mesa/src/drv/r128/r128_texobj.h,v 1.5 2002/02/22 21:44:58 dawes Exp $ */
2 /**************************************************************************
3
4 Copyright 1999, 2000 ATI Technologies Inc. and Precision Insight, Inc.,
5 Cedar Park, Texas.
6 All Rights Reserved.
7
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the "Software"),
10 to deal in the Software without restriction, including without limitation
11 on the rights to use, copy, modify, merge, publish, distribute, sub
12 license, and/or sell copies of the Software, and to permit persons to whom
13 the Software is furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice (including the next
16 paragraph) shall be included in all copies or substantial portions of the
17 Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
22 ATI, PRECISION INSIGHT AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
23 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
25 USE OR OTHER DEALINGS IN THE SOFTWARE.
26
27 **************************************************************************/
28
29 /*
30 * Authors:
31 * Kevin E. Martin <martin@valinux.com>
32 * Gareth Hughes <gareth@valinux.com>
33 *
34 */
35
36 #ifndef _R128_TEXOBJ_H_
37 #define _R128_TEXOBJ_H_
38
39 #include "mm.h"
40
41 /* Individual texture image information.
42 */
43 typedef struct {
44 GLuint offset; /* Relative to local texture space */
45 GLuint width;
46 GLuint height;
47 } r128TexImage;
48
49 typedef struct r128_tex_obj r128TexObj, *r128TexObjPtr;
50
51 /* Texture object in locally shared texture space.
52 */
53 struct r128_tex_obj {
54 driTextureObject base;
55
56 u_int32_t bufAddr; /* Offset to start of locally
57 shared texture block */
58
59 GLuint age;
60 r128TexImage image[R128_MAX_TEXTURE_LEVELS]; /* Image data for all
61 mipmap levels */
62
63 u_int32_t textureFormat; /* Actual hardware format */
64
65 drm_r128_texture_regs_t setup; /* Setup regs for texture */
66 };
67
68 #endif /* _R128_TEXOBJ_H_ */