X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fimage.h;h=b606545b7fb18a50020c626a7f0574f017b6d24a;hb=9ec5050898877baa6120fd9a04464651c7cb28ad;hp=c30f56e6d4aa9b454438c5a283010a9923078028;hpb=6b998c5584b7b4be84551a7811d04dcff8487cc9;p=mesa.git diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index c30f56e6d4a..b606545b7fb 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.5.2 + * Version: 7.1 * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -27,8 +27,10 @@ #define IMAGE_H -#include "mtypes.h" +#include "glheader.h" +struct gl_context; +struct gl_pixelstore_attrib; extern void _mesa_swap2( GLushort *p, GLuint n ); @@ -36,6 +38,9 @@ _mesa_swap2( GLushort *p, GLuint n ); extern void _mesa_swap4( GLuint *p, GLuint n ); +extern GLboolean +_mesa_type_is_packed(GLenum type); + extern GLint _mesa_sizeof_type( GLenum type ); @@ -49,8 +54,38 @@ extern GLint _mesa_bytes_per_pixel( GLenum format, GLenum type ); extern GLboolean -_mesa_is_legal_format_and_type( GLcontext *ctx, GLenum format, GLenum type ); +_mesa_is_legal_format_and_type(const struct gl_context *ctx, + GLenum format, GLenum type); +extern GLboolean +_mesa_is_color_format(GLenum format); + +extern GLboolean +_mesa_is_depth_format(GLenum format); + +extern GLboolean +_mesa_is_stencil_format(GLenum format); + +extern GLboolean +_mesa_is_ycbcr_format(GLenum format); + +extern GLboolean +_mesa_is_depthstencil_format(GLenum format); + +extern GLboolean +_mesa_is_depth_or_stencil_format(GLenum format); + +extern GLboolean +_mesa_is_dudv_format(GLenum format); + +extern GLboolean +_mesa_is_integer_format(GLenum format); + +extern GLboolean +_mesa_is_compressed_format(struct gl_context *ctx, GLenum format); + +extern GLboolean +_mesa_base_format_has_channel(GLenum base_format, GLenum pname); extern GLvoid * _mesa_image_address( GLuint dimensions, @@ -92,107 +127,13 @@ _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing, GLint width, GLint height, GLenum format, GLenum type ); -extern void -_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32], - const struct gl_pixelstore_attrib *unpacking ); - - -extern void -_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest, - const struct gl_pixelstore_attrib *packing ); - - -extern GLvoid * -_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels, - const struct gl_pixelstore_attrib *packing ); - -extern void -_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source, - GLubyte *dest, const struct gl_pixelstore_attrib *packing ); - - -extern void -_mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLuint transferOps, - GLuint n, GLfloat rgba[][4]); extern void -_mesa_pack_rgba_span_float( GLcontext *ctx, - GLuint n, CONST GLfloat rgba[][4], - GLenum dstFormat, GLenum dstType, GLvoid *dstAddr, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ); - - -extern void -_mesa_unpack_color_span_chan( GLcontext *ctx, - GLuint n, GLenum dstFormat, GLchan dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ); - - -extern void -_mesa_unpack_color_span_float( GLcontext *ctx, - GLuint n, GLenum dstFormat, GLfloat dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ); - - -extern void -_mesa_unpack_index_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ); - - -extern void -_mesa_pack_index_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, const GLuint *source, - const struct gl_pixelstore_attrib *dstPacking, - GLuint transferOps ); - - -extern void -_mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLuint transferOps ); - -extern void -_mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, const GLstencil *source, - const struct gl_pixelstore_attrib *dstPacking ); - - -extern void -_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, - GLenum dstType, GLvoid *dest, GLfloat depthScale, - GLenum srcType, const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking ); - -extern void -_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, - GLenum dstType, const GLfloat *depthSpan, - const struct gl_pixelstore_attrib *dstPacking ); - - -extern void -_mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest, - const GLfloat *depthVals, - const GLstencil *stencilVals, - const struct gl_pixelstore_attrib *dstPacking); - - -extern void * -_mesa_unpack_image( GLuint dimensions, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *unpack ); +_mesa_expand_bitmap(GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap, + GLubyte *destBuffer, GLint destStride, + GLubyte onValue); extern void @@ -202,22 +143,34 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, extern GLboolean -_mesa_clip_drawpixels(const GLcontext *ctx, +_mesa_clip_drawpixels(const struct gl_context *ctx, GLint *destX, GLint *destY, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *unpack); extern GLboolean -_mesa_clip_readpixels(const GLcontext *ctx, - GLint *destX, GLint *destY, +_mesa_clip_readpixels(const struct gl_context *ctx, + GLint *srcX, GLint *srcY, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *pack); +extern GLboolean +_mesa_clip_copytexsubimage(const struct gl_context *ctx, + GLint *destX, GLint *destY, + GLint *srcX, GLint *srcY, + GLsizei *width, GLsizei *height); + extern GLboolean _mesa_clip_to_region(GLint xmin, GLint ymin, GLint xmax, GLint ymax, GLint *x, GLint *y, GLsizei *width, GLsizei *height ); +extern GLboolean +_mesa_clip_blit(struct gl_context *ctx, + GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1, + GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1); + + #endif