mesa: Restore 78-column wrapping of license text in C-style comments.
[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 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
21 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
22 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26
27 #ifndef META_H
28 #define META_H
29
30 #include "main/mtypes.h"
31
32 /**
33 * \name Flags for meta operations
34 * \{
35 *
36 * These flags are passed to _mesa_meta_begin().
37 */
38 #define MESA_META_ALL ~0x0
39 #define MESA_META_ALPHA_TEST 0x1
40 #define MESA_META_BLEND 0x2 /**< includes logicop */
41 #define MESA_META_COLOR_MASK 0x4
42 #define MESA_META_DEPTH_TEST 0x8
43 #define MESA_META_FOG 0x10
44 #define MESA_META_PIXEL_STORE 0x20
45 #define MESA_META_PIXEL_TRANSFER 0x40
46 #define MESA_META_RASTERIZATION 0x80
47 #define MESA_META_SCISSOR 0x100
48 #define MESA_META_SHADER 0x200
49 #define MESA_META_STENCIL_TEST 0x400
50 #define MESA_META_TRANSFORM 0x800 /**< modelview/projection matrix state */
51 #define MESA_META_TEXTURE 0x1000
52 #define MESA_META_VERTEX 0x2000
53 #define MESA_META_VIEWPORT 0x4000
54 #define MESA_META_CLAMP_FRAGMENT_COLOR 0x8000
55 #define MESA_META_CLAMP_VERTEX_COLOR 0x10000
56 #define MESA_META_CONDITIONAL_RENDER 0x20000
57 #define MESA_META_CLIP 0x40000
58 #define MESA_META_SELECT_FEEDBACK 0x80000
59 #define MESA_META_MULTISAMPLE 0x100000
60 #define MESA_META_FRAMEBUFFER_SRGB 0x200000
61 #define MESA_META_OCCLUSION_QUERY 0x400000
62 /**\}*/
63
64 extern void
65 _mesa_meta_init(struct gl_context *ctx);
66
67 extern void
68 _mesa_meta_free(struct gl_context *ctx);
69
70 extern void
71 _mesa_meta_begin(struct gl_context *ctx, GLbitfield state);
72
73 extern void
74 _mesa_meta_end(struct gl_context *ctx);
75
76 extern GLboolean
77 _mesa_meta_in_progress(struct gl_context *ctx);
78
79 extern void
80 _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
81 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
82 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
83 GLbitfield mask, GLenum filter);
84
85 extern void
86 _mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers);
87
88 extern void
89 _mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers);
90
91 extern void
92 _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
93 GLsizei width, GLsizei height,
94 GLint dstx, GLint dsty, GLenum type);
95
96 extern void
97 _mesa_meta_DrawPixels(struct gl_context *ctx,
98 GLint x, GLint y, GLsizei width, GLsizei height,
99 GLenum format, GLenum type,
100 const struct gl_pixelstore_attrib *unpack,
101 const GLvoid *pixels);
102
103 extern void
104 _mesa_meta_Bitmap(struct gl_context *ctx,
105 GLint x, GLint y, GLsizei width, GLsizei height,
106 const struct gl_pixelstore_attrib *unpack,
107 const GLubyte *bitmap);
108
109 extern GLboolean
110 _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
111 struct gl_texture_object *texObj);
112
113 extern void
114 _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
115 struct gl_texture_object *texObj);
116
117 extern void
118 _mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
119 struct gl_texture_image *texImage,
120 GLint xoffset, GLint yoffset, GLint zoffset,
121 struct gl_renderbuffer *rb,
122 GLint x, GLint y,
123 GLsizei width, GLsizei height);
124
125 extern void
126 _mesa_meta_GetTexImage(struct gl_context *ctx,
127 GLenum format, GLenum type, GLvoid *pixels,
128 struct gl_texture_image *texImage);
129
130 extern void
131 _mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
132 GLfloat width, GLfloat height);
133
134 #endif /* META_H */