diff options
author | Brian Paul <[email protected]> | 2011-09-17 14:50:48 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-09-17 14:57:40 -0600 |
commit | a1661dc8957a35899d653e9fffd97f166c56be56 (patch) | |
tree | 0662287501323357f391c31dae72a01edd824ec3 /src/mesa/swrast/s_context.h | |
parent | 20177a620ef123ae7cdbc7252fd41a48f5b76acc (diff) |
mesa: move gl_texture_image::FetchTexel fields to swrast
This also involves passing swrast_texture_image instead of gl_texture_image
into all the fetch functions.
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r-- | src/mesa/swrast/s_context.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 687480ed285..8357483a27f 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -109,6 +109,27 @@ 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, @@ -118,7 +139,25 @@ struct swrast_texture_image { struct gl_texture_image Base; - /* XXX new members coming soon */ +#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 }; @@ -137,7 +176,6 @@ swrast_texture_image_const(const struct gl_texture_image *img) } - /** * \struct SWcontext * \brief Per-context state that's private to the software rasterizer module. |