diff options
author | marha <marha@users.sourceforge.net> | 2011-09-19 13:39:03 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-19 13:39:03 +0200 |
commit | 1678a69116d1c6ce900fe15f7813613bb28416dd (patch) | |
tree | 9589536f6b4bd60b34f90cf5ed20240d40bbb38c /mesalib/src/mesa/swrast/s_context.h | |
parent | 9d911bc1246139019e555f443e934677a067bc0a (diff) | |
parent | b2c925e360e2c366526de15b44603f855f94139c (diff) | |
download | vcxsrv-1678a69116d1c6ce900fe15f7813613bb28416dd.tar.gz vcxsrv-1678a69116d1c6ce900fe15f7813613bb28416dd.tar.bz2 vcxsrv-1678a69116d1c6ce900fe15f7813613bb28416dd.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libfontenc/src/fontenc.c
Diffstat (limited to 'mesalib/src/mesa/swrast/s_context.h')
-rw-r--r-- | mesalib/src/mesa/swrast/s_context.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.h b/mesalib/src/mesa/swrast/s_context.h index 8d7458c2d..8357483a2 100644 --- a/mesalib/src/mesa/swrast/s_context.h +++ b/mesalib/src/mesa/swrast/s_context.h @@ -109,6 +109,73 @@ typedef void (*validate_texture_image_func)(struct gl_context *ctx, _NEW_DEPTH) +struct swrast_texture_image; + + +typedef void (*FetchTexelFuncC)(const struct swrast_texture_image *texImage, + GLint col, GLint row, GLint img, + GLchan *texelOut); + +/** + * As above, but returns floats. + * Used for depth component images and for upcoming signed/float + * texture images. + */ +typedef void (*FetchTexelFuncF)(const struct swrast_texture_image *texImage, + GLint col, GLint row, GLint img, + GLfloat *texelOut); + + +typedef void (*StoreTexelFunc)(struct swrast_texture_image *texImage, + GLint col, GLint row, GLint img, + const void *texel); + +/** + * Subclass of gl_texture_image. + * We need extra fields/info to keep tracking of mapped texture buffers, + * strides and Fetch/Store functions. + */ +struct swrast_texture_image +{ + struct gl_texture_image Base; + +#if 0 + /** used for mipmap LOD computation */ + GLfloat WidthScale, HeightScale, DepthScale; + GLboolean _IsPowerOfTwo; /**< Are all dimensions powers of two? */ + + GLubyte *Data; /**< The actual texture data in malloc'd memory */ + + GLint TexelSize; /**< bytes per texel block */ +#endif + + FetchTexelFuncC FetchTexelc; + FetchTexelFuncF FetchTexelf; + StoreTexelFunc Store; + +#if 0 + /** These fields only valid when texture memory is mapped */ + GLubyte **SliceMaps; /**< points to OneMap or a malloc'd array */ + GLint RowStride; /**< bytes per row of blocks */ +#endif +}; + + +/** cast wrapper */ +static INLINE struct swrast_texture_image * +swrast_texture_image(struct gl_texture_image *img) +{ + return (struct swrast_texture_image *) img; +} + +/** cast wrapper */ +static INLINE const struct swrast_texture_image * +swrast_texture_image_const(const struct gl_texture_image *img) +{ + return (const struct swrast_texture_image *) img; +} + + /** * \struct SWcontext * \brief Per-context state that's private to the software rasterizer module. |