133a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul/* 233a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * Mesa 3-D graphics library 333a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * Version: 7.6 433a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * 533a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * Copyright (C) 2009 VMware, Inc. All Rights Reserved. 633a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * 733a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * Permission is hereby granted, free of charge, to any person obtaining a 833a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * copy of this software and associated documentation files (the "Software"), 933a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * to deal in the Software without restriction, including without limitation 1033a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1133a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * and/or sell copies of the Software, and to permit persons to whom the 1233a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * Software is furnished to do so, subject to the following conditions: 1333a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * 1433a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * The above copyright notice and this permission notice shall be included 1533a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * in all copies or substantial portions of the Software. 1633a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * 1733a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1833a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1933a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2033a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 2133a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2233a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2333a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul */ 2433a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 2533a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 2633a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul#ifndef META_H 2733a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul#define META_H 2833a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 29deff7fff494a04314fe9ad859029f0436bcc9e9fChad Versace#include "main/mtypes.h" 30deff7fff494a04314fe9ad859029f0436bcc9e9fChad Versace 31f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace/** 32f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace * \name Flags for meta operations 33f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace * \{ 34f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace * 35f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace * These flags are passed to _mesa_meta_begin(). 36f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace */ 37f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_ALL ~0x0 38f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_ALPHA_TEST 0x1 39f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_BLEND 0x2 /**< includes logicop */ 40f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_COLOR_MASK 0x4 41f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_DEPTH_TEST 0x8 42f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_FOG 0x10 43f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_PIXEL_STORE 0x20 44f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_PIXEL_TRANSFER 0x40 45f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_RASTERIZATION 0x80 46f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_SCISSOR 0x100 47f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_SHADER 0x200 48f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_STENCIL_TEST 0x400 49f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_TRANSFORM 0x800 /**< modelview/projection matrix state */ 50f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_TEXTURE 0x1000 51f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_VERTEX 0x2000 52f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_VIEWPORT 0x4000 53f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_CLAMP_FRAGMENT_COLOR 0x8000 54f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_CLAMP_VERTEX_COLOR 0x10000 55f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_CONDITIONAL_RENDER 0x20000 56f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace#define MESA_META_CLIP 0x40000 57c5f4024a793f1209b1693aed9a46be9374ba4741Chad Versace#define MESA_META_SELECT_FEEDBACK 0x80000 58f34764ea5308221dc35479bd118142a0e249049cPaul Berry#define MESA_META_MULTISAMPLE 0x100000 59f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace/**\}*/ 6033a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 6133a838beb913c011b5ee8158c2717b7c8c351b17Brian Paulextern void 62f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_init(struct gl_context *ctx); 6333a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 6433a838beb913c011b5ee8158c2717b7c8c351b17Brian Paulextern void 65f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_free(struct gl_context *ctx); 6633a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 6733a838beb913c011b5ee8158c2717b7c8c351b17Brian Paulextern void 68f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace_mesa_meta_begin(struct gl_context *ctx, GLbitfield state); 69f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace 70f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versaceextern void 71f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace_mesa_meta_end(struct gl_context *ctx); 72f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versace 73163611d7b21670de6074c09d37bdf93bad494036Paul Berryextern GLboolean 74163611d7b21670de6074c09d37bdf93bad494036Paul Berry_mesa_meta_in_progress(struct gl_context *ctx); 75163611d7b21670de6074c09d37bdf93bad494036Paul Berry 76f23c3ebeccc5c591b79c10cbdb693270ef27a2f5Chad Versaceextern void 77f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_BlitFramebuffer(struct gl_context *ctx, 784de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, 794de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, 804de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul GLbitfield mask, GLenum filter); 8133a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 8233a838beb913c011b5ee8158c2717b7c8c351b17Brian Paulextern void 83f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers); 8433a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul 85c16fa388d3f1b941fbee2909a92b6fea10ef4bfeBrian Paulextern void 86eee570290aebc8a339acd063033e3daefcef2bc6Eric Anholt_mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers); 87eee570290aebc8a339acd063033e3daefcef2bc6Eric Anholt 88eee570290aebc8a339acd063033e3daefcef2bc6Eric Anholtextern void 89f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, 904de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul GLsizei width, GLsizei height, 914de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul GLint dstx, GLint dsty, GLenum type); 92c16fa388d3f1b941fbee2909a92b6fea10ef4bfeBrian Paul 93dba6d52ba060246fbe04e4aa0875eb1efc53b1abBrian Paulextern void 94f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_DrawPixels(struct gl_context *ctx, 954de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul GLint x, GLint y, GLsizei width, GLsizei height, 964de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul GLenum format, GLenum type, 974de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul const struct gl_pixelstore_attrib *unpack, 984de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul const GLvoid *pixels); 99dba6d52ba060246fbe04e4aa0875eb1efc53b1abBrian Paul 100bcb62ae78a9d2f4d08001e9f207b6f1291443968Brian Paulextern void 101f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_Bitmap(struct gl_context *ctx, 102bcb62ae78a9d2f4d08001e9f207b6f1291443968Brian Paul GLint x, GLint y, GLsizei width, GLsizei height, 103bcb62ae78a9d2f4d08001e9f207b6f1291443968Brian Paul const struct gl_pixelstore_attrib *unpack, 104bcb62ae78a9d2f4d08001e9f207b6f1291443968Brian Paul const GLubyte *bitmap); 105bcb62ae78a9d2f4d08001e9f207b6f1291443968Brian Paul 106f1cab802b8e78906413f219ad354f5d5500b4d3fBrian Paulextern GLboolean 107f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target, 108f1cab802b8e78906413f219ad354f5d5500b4d3fBrian Paul struct gl_texture_object *texObj); 109f1cab802b8e78906413f219ad354f5d5500b4d3fBrian Paul 11023663ae9148b9a976b8a95e48af8404cbda046feBrian Paulextern void 111f9995b30756140724f41daf963fa06167912be7fKristian Høgsberg_mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, 1124de8e2123ebeb50db252b2bb57fb167058fa4683Brian Paul struct gl_texture_object *texObj); 113bcb62ae78a9d2f4d08001e9f207b6f1291443968Brian Paul 1141d8fbef4f2b1bccb49b40375891b66caf5395b15Brian Paulextern void 115cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886dBrian Paul_mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims, 116cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886dBrian Paul struct gl_texture_image *texImage, 117cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886dBrian Paul GLint xoffset, GLint yoffset, GLint zoffset, 118cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886dBrian Paul struct gl_renderbuffer *rb, 119cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886dBrian Paul GLint x, GLint y, 120cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886dBrian Paul GLsizei width, GLsizei height); 1211d8fbef4f2b1bccb49b40375891b66caf5395b15Brian Paul 122e3dc78e57a7effbd30dc9539b3ea05ad85ac34e5Brian Paulextern void 1234368a657670f1f3f13d8497f749cb5439f91529eBrian Paul_mesa_meta_GetTexImage(struct gl_context *ctx, 124e3dc78e57a7effbd30dc9539b3ea05ad85ac34e5Brian Paul GLenum format, GLenum type, GLvoid *pixels, 125e3dc78e57a7effbd30dc9539b3ea05ad85ac34e5Brian Paul struct gl_texture_image *texImage); 126e3dc78e57a7effbd30dc9539b3ea05ad85ac34e5Brian Paul 127b4dc35d9bc879c104faac043b640ae2673763b93Chia-I Wuextern void 128b4dc35d9bc879c104faac043b640ae2673763b93Chia-I Wu_mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, 129b4dc35d9bc879c104faac043b640ae2673763b93Chia-I Wu GLfloat width, GLfloat height); 130e3dc78e57a7effbd30dc9539b3ea05ad85ac34e5Brian Paul 13133a838beb913c011b5ee8158c2717b7c8c351b17Brian Paul#endif /* META_H */ 132