1f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/* 2f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Mesa 3-D graphics library 3f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Version: 6.5.1 4f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 5f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. 6f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright (c) 2008 VMware, Inc. 7f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 8f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Permission is hereby granted, free of charge, to any person obtaining a 9f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * copy of this software and associated documentation files (the "Software"), 10f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * to deal in the Software without restriction, including without limitation 11f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * the rights to use, copy, modify, merge, publish, distribute, sublicense, 12f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * and/or sell copies of the Software, and to permit persons to whom the 13f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Software is furnished to do so, subject to the following conditions: 14f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 15f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * The above copyright notice and this permission notice shall be included 16f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * in all copies or substantial portions of the Software. 17f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 18f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 22f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 25f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 26f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 27f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 28f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \file texstore.h 29f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Texture image storage routines. 30f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 31f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \author Brian Paul 32f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 33f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 34f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 35f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#ifndef TEXSTORE_H 36f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define TEXSTORE_H 37f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 38f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 39f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "mtypes.h" 40f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include "formats.h" 41f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 42f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 43f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/** 44f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * This macro defines the (many) parameters to the texstore functions. 45f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param dims either 1 or 2 or 3 46f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param baseInternalFormat user-specified base internal format 47f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param dstFormat destination Mesa texture format 48f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param dstX/Y/Zoffset destination x/y/z offset (ala TexSubImage), in texels 49f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param dstRowStride destination image row stride, in bytes 50f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param dstSlices array of addresses of image slices (for 3D, array texture) 51f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param srcWidth/Height/Depth source image size, in pixels 52f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param srcFormat incoming image format 53f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param srcType incoming image data type 54f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param srcAddr source image address 55f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * \param srcPacking source image packing parameters 56f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 57f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define TEXSTORE_PARAMS \ 58f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct gl_context *ctx, GLuint dims, \ 59f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum baseInternalFormat, \ 60f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org gl_format dstFormat, \ 61f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint dstRowStride, \ 62f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLubyte **dstSlices, \ 63f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint srcWidth, GLint srcHeight, GLint srcDepth, \ 64f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum srcFormat, GLenum srcType, \ 65f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const GLvoid *srcAddr, \ 66f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const struct gl_pixelstore_attrib *srcPacking 67f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 68f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 69f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern GLboolean 70f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_mesa_texstore(TEXSTORE_PARAMS); 71f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 72f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 73f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern GLubyte * 74f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_mesa_make_temp_ubyte_image(struct gl_context *ctx, GLuint dims, 75f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum logicalBaseFormat, 76f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum textureBaseFormat, 77f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint srcWidth, GLint srcHeight, GLint srcDepth, 78f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum srcFormat, GLenum srcType, 79f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const GLvoid *srcAddr, 80f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const struct gl_pixelstore_attrib *srcPacking); 81f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 82f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgGLfloat * 83f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims, 84f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum logicalBaseFormat, 85f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum textureBaseFormat, 86f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint srcWidth, GLint srcHeight, GLint srcDepth, 87f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum srcFormat, GLenum srcType, 88f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const GLvoid *srcAddr, 89f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const struct gl_pixelstore_attrib *srcPacking, 90f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLbitfield transferOps); 91f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 92f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 93f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_mesa_store_teximage(struct gl_context *ctx, 94f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLuint dims, 95f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct gl_texture_image *texImage, 96f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum format, GLenum type, const GLvoid *pixels, 97f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const struct gl_pixelstore_attrib *packing); 98f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 99f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 100f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 101f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_mesa_store_texsubimage(struct gl_context *ctx, GLuint dims, 102f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct gl_texture_image *texImage, 103f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint xoffset, GLint yoffset, GLint zoffset, 104f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint width, GLint height, GLint depth, 105f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum format, GLenum type, const GLvoid *pixels, 106f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const struct gl_pixelstore_attrib *packing); 107f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 108f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 109f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 110f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims, 111f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct gl_texture_image *texImage, 112f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLsizei imageSize, const GLvoid *data); 113f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 114f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 115f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 116f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org_mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims, 117f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct gl_texture_image *texImage, 118f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLint xoffset, GLint yoffset, GLint zoffset, 119f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLsizei width, GLsizei height, GLsizei depth, 120f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLenum format, 121f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org GLsizei imageSize, const GLvoid *data); 122f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 123f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 124f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#endif 125