1bf215546Sopenharmony_ci/************************************************************************** 2bf215546Sopenharmony_ci * 3bf215546Sopenharmony_ci * Copyright 2007 VMware, Inc. 4bf215546Sopenharmony_ci * All Rights Reserved. 5bf215546Sopenharmony_ci * 6bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 7bf215546Sopenharmony_ci * copy of this software and associated documentation files (the 8bf215546Sopenharmony_ci * "Software"), to deal in the Software without restriction, including 9bf215546Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish, 10bf215546Sopenharmony_ci * distribute, sub license, and/or sell copies of the Software, and to 11bf215546Sopenharmony_ci * permit persons to whom the Software is furnished to do so, subject to 12bf215546Sopenharmony_ci * the following conditions: 13bf215546Sopenharmony_ci * 14bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the 15bf215546Sopenharmony_ci * next paragraph) shall be included in all copies or substantial portions 16bf215546Sopenharmony_ci * of the Software. 17bf215546Sopenharmony_ci * 18bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19bf215546Sopenharmony_ci * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20bf215546Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21bf215546Sopenharmony_ci * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 22bf215546Sopenharmony_ci * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23bf215546Sopenharmony_ci * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24bf215546Sopenharmony_ci * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25bf215546Sopenharmony_ci * 26bf215546Sopenharmony_ci **************************************************************************/ 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_ci 29bf215546Sopenharmony_ci#ifndef ST_CB_TEXTURE_H 30bf215546Sopenharmony_ci#define ST_CB_TEXTURE_H 31bf215546Sopenharmony_ci 32bf215546Sopenharmony_ci 33bf215546Sopenharmony_ci#include "main/glheader.h" 34bf215546Sopenharmony_ci 35bf215546Sopenharmony_cistruct dd_function_table; 36bf215546Sopenharmony_cistruct gl_context; 37bf215546Sopenharmony_cistruct gl_texture_object; 38bf215546Sopenharmony_cistruct gl_texture_image; 39bf215546Sopenharmony_cistruct pipe_context; 40bf215546Sopenharmony_cistruct st_context; 41bf215546Sopenharmony_cistruct gl_renderbuffer; 42bf215546Sopenharmony_cistruct gl_pixelstore_attrib; 43bf215546Sopenharmony_cistruct gl_memory_object; 44bf215546Sopenharmony_cistruct gl_sampler_object; 45bf215546Sopenharmony_ci 46bf215546Sopenharmony_ciextern enum pipe_texture_target 47bf215546Sopenharmony_cigl_target_to_pipe(GLenum target); 48bf215546Sopenharmony_ci 49bf215546Sopenharmony_ciunsigned 50bf215546Sopenharmony_cist_get_blit_mask(GLenum srcFormat, GLenum dstFormat); 51bf215546Sopenharmony_ci 52bf215546Sopenharmony_ciextern GLboolean 53bf215546Sopenharmony_cist_finalize_texture(struct gl_context *ctx, 54bf215546Sopenharmony_ci struct pipe_context *pipe, 55bf215546Sopenharmony_ci struct gl_texture_object *tObj, 56bf215546Sopenharmony_ci GLuint cubeMapFace); 57bf215546Sopenharmony_ci 58bf215546Sopenharmony_civoid st_FreeTextureImageBuffer(struct gl_context *ctx, 59bf215546Sopenharmony_ci struct gl_texture_image *texImage); 60bf215546Sopenharmony_civoid st_MapTextureImage(struct gl_context *ctx, 61bf215546Sopenharmony_ci struct gl_texture_image *texImage, 62bf215546Sopenharmony_ci GLuint slice, GLuint x, GLuint y, GLuint w, GLuint h, 63bf215546Sopenharmony_ci GLbitfield mode, 64bf215546Sopenharmony_ci GLubyte **mapOut, GLint *rowStrideOut); 65bf215546Sopenharmony_civoid st_UnmapTextureImage(struct gl_context *ctx, 66bf215546Sopenharmony_ci struct gl_texture_image *texImage, 67bf215546Sopenharmony_ci GLuint slice); 68bf215546Sopenharmony_ciGLboolean st_AllocTextureImageBuffer(struct gl_context *ctx, 69bf215546Sopenharmony_ci struct gl_texture_image *texImage); 70bf215546Sopenharmony_civoid st_TexSubImage(struct gl_context *ctx, GLuint dims, 71bf215546Sopenharmony_ci struct gl_texture_image *texImage, 72bf215546Sopenharmony_ci GLint xoffset, GLint yoffset, GLint zoffset, 73bf215546Sopenharmony_ci GLint width, GLint height, GLint depth, 74bf215546Sopenharmony_ci GLenum format, GLenum type, const void *pixels, 75bf215546Sopenharmony_ci const struct gl_pixelstore_attrib *unpack); 76bf215546Sopenharmony_civoid st_TexImage(struct gl_context * ctx, GLuint dims, 77bf215546Sopenharmony_ci struct gl_texture_image *texImage, 78bf215546Sopenharmony_ci GLenum format, GLenum type, const void *pixels, 79bf215546Sopenharmony_ci const struct gl_pixelstore_attrib *unpack); 80bf215546Sopenharmony_civoid st_CompressedTexSubImage(struct gl_context *ctx, GLuint dims, 81bf215546Sopenharmony_ci struct gl_texture_image *texImage, 82bf215546Sopenharmony_ci GLint x, GLint y, GLint z, 83bf215546Sopenharmony_ci GLsizei w, GLsizei h, GLsizei d, 84bf215546Sopenharmony_ci GLenum format, GLsizei imageSize, const void *data); 85bf215546Sopenharmony_civoid st_CompressedTexImage(struct gl_context *ctx, GLuint dims, 86bf215546Sopenharmony_ci struct gl_texture_image *texImage, 87bf215546Sopenharmony_ci GLsizei imageSize, const void *data); 88bf215546Sopenharmony_civoid st_GetTexSubImage(struct gl_context * ctx, 89bf215546Sopenharmony_ci GLint xoffset, GLint yoffset, GLint zoffset, 90bf215546Sopenharmony_ci GLsizei width, GLsizei height, GLint depth, 91bf215546Sopenharmony_ci GLenum format, GLenum type, void * pixels, 92bf215546Sopenharmony_ci struct gl_texture_image *texImage); 93bf215546Sopenharmony_civoid st_CopyTexSubImage(struct gl_context *ctx, GLuint dims, 94bf215546Sopenharmony_ci struct gl_texture_image *texImage, 95bf215546Sopenharmony_ci GLint destX, GLint destY, GLint slice, 96bf215546Sopenharmony_ci struct gl_renderbuffer *rb, 97bf215546Sopenharmony_ci GLint srcX, GLint srcY, GLsizei width, GLsizei height); 98bf215546Sopenharmony_ciGLboolean st_AllocTextureStorage(struct gl_context *ctx, 99bf215546Sopenharmony_ci struct gl_texture_object *texObj, 100bf215546Sopenharmony_ci GLsizei levels, GLsizei width, 101bf215546Sopenharmony_ci GLsizei height, GLsizei depth); 102bf215546Sopenharmony_ciGLboolean st_TestProxyTexImage(struct gl_context *ctx, GLenum target, 103bf215546Sopenharmony_ci GLuint numLevels, GLint level, 104bf215546Sopenharmony_ci mesa_format format, GLuint numSamples, 105bf215546Sopenharmony_ci GLint width, GLint height, GLint depth); 106bf215546Sopenharmony_ciGLboolean st_TextureView(struct gl_context *ctx, 107bf215546Sopenharmony_ci struct gl_texture_object *texObj, 108bf215546Sopenharmony_ci struct gl_texture_object *origTexObj); 109bf215546Sopenharmony_civoid st_ClearTexSubImage(struct gl_context *ctx, 110bf215546Sopenharmony_ci struct gl_texture_image *texImage, 111bf215546Sopenharmony_ci GLint xoffset, GLint yoffset, GLint zoffset, 112bf215546Sopenharmony_ci GLsizei width, GLsizei height, GLsizei depth, 113bf215546Sopenharmony_ci const void *clearValue); 114bf215546Sopenharmony_ciGLboolean st_SetTextureStorageForMemoryObject(struct gl_context *ctx, 115bf215546Sopenharmony_ci struct gl_texture_object *texObj, 116bf215546Sopenharmony_ci struct gl_memory_object *memObj, 117bf215546Sopenharmony_ci GLsizei levels, GLsizei width, 118bf215546Sopenharmony_ci GLsizei height, GLsizei depth, 119bf215546Sopenharmony_ci GLuint64 offset); 120bf215546Sopenharmony_ci 121bf215546Sopenharmony_ciGLboolean st_GetSparseTextureVirtualPageSize(struct gl_context *ctx, 122bf215546Sopenharmony_ci GLenum target, mesa_format format, 123bf215546Sopenharmony_ci unsigned index, int *x, int *y, int *z); 124bf215546Sopenharmony_civoid st_TexturePageCommitment(struct gl_context *ctx, 125bf215546Sopenharmony_ci struct gl_texture_object *tex_obj, 126bf215546Sopenharmony_ci int level, int xoffset, int yoffset, int zoffset, 127bf215546Sopenharmony_ci int width, int height, int depth, bool commit); 128bf215546Sopenharmony_ci#endif /* ST_CB_TEXTURE_H */ 129