mesa: Add missing includes to meta.h
[mesa.git] / src / mesa / drivers / common / meta.h
1 /*
2 * Mesa 3-D graphics library
3 * Version: 7.6
4 *
5 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 #ifndef META_H
27 #define META_H
28
29 #include "main/mtypes.h"
30
31 /**
32 * \name Flags for meta operations
33 * \{
34 *
35 * These flags are passed to _mesa_meta_begin().
36 */
37 #define MESA_META_ALL ~0x0
38 #define MESA_META_ALPHA_TEST 0x1
39 #define MESA_META_BLEND 0x2 /**< includes logicop */
40 #define MESA_META_COLOR_MASK 0x4
41 #define MESA_META_DEPTH_TEST 0x8
42 #define MESA_META_FOG 0x10
43 #define MESA_META_PIXEL_STORE 0x20
44 #define MESA_META_PIXEL_TRANSFER 0x40
45 #define MESA_META_RASTERIZATION 0x80
46 #define MESA_META_SCISSOR 0x100
47 #define MESA_META_SHADER 0x200
48 #define MESA_META_STENCIL_TEST 0x400
49 #define MESA_META_TRANSFORM 0x800 /**< modelview/projection matrix state */
50 #define MESA_META_TEXTURE 0x1000
51 #define MESA_META_VERTEX 0x2000
52 #define MESA_META_VIEWPORT 0x4000
53 #define MESA_META_CLAMP_FRAGMENT_COLOR 0x8000
54 #define MESA_META_CLAMP_VERTEX_COLOR 0x10000
55 #define MESA_META_CONDITIONAL_RENDER 0x20000
56 #define MESA_META_CLIP 0x40000
57 /**\}*/
58
59 extern void
60 _mesa_meta_init(struct gl_context *ctx);
61
62 extern void
63 _mesa_meta_free(struct gl_context *ctx);
64
65 extern void
66 _mesa_meta_begin(struct gl_context *ctx, GLbitfield state);
67
68 extern void
69 _mesa_meta_end(struct gl_context *ctx);
70
71 extern void
72 _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
73 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
74 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
75 GLbitfield mask, GLenum filter);
76
77 extern void
78 _mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers);
79
80 extern void
81 _mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers);
82
83 extern void
84 _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
85 GLsizei width, GLsizei height,
86 GLint dstx, GLint dsty, GLenum type);
87
88 extern void
89 _mesa_meta_DrawPixels(struct gl_context *ctx,
90 GLint x, GLint y, GLsizei width, GLsizei height,
91 GLenum format, GLenum type,
92 const struct gl_pixelstore_attrib *unpack,
93 const GLvoid *pixels);
94
95 extern void
96 _mesa_meta_Bitmap(struct gl_context *ctx,
97 GLint x, GLint y, GLsizei width, GLsizei height,
98 const struct gl_pixelstore_attrib *unpack,
99 const GLubyte *bitmap);
100
101 extern GLboolean
102 _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
103 struct gl_texture_object *texObj);
104
105 extern void
106 _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
107 struct gl_texture_object *texObj);
108
109 extern void
110 _mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
111 GLint xoffset,
112 GLint x, GLint y, GLsizei width);
113
114 extern void
115 _mesa_meta_CopyTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
116 GLint xoffset, GLint yoffset,
117 GLint x, GLint y,
118 GLsizei width, GLsizei height);
119
120 extern void
121 _mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, GLenum target, GLint level,
122 GLint xoffset, GLint yoffset, GLint zoffset,
123 GLint x, GLint y,
124 GLsizei width, GLsizei height);
125
126 extern void
127 _mesa_meta_GetTexImage(struct gl_context *ctx, GLenum target, GLint level,
128 GLenum format, GLenum type, GLvoid *pixels,
129 struct gl_texture_object *texObj,
130 struct gl_texture_image *texImage);
131
132
133 #endif /* META_H */