X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_context.h;h=1e0bfc0f9743be1d0dba7a490a72840b9e24fb3c;hb=c5943d6c1cc4eedbea088bc1f611abc153e90524;hp=687480ed285776ccbc251c13afe21161abcc0c26;hpb=1da896803cdd09293c7bb0048a2116e237a51766;p=mesa.git diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 687480ed285..1e0bfc0f974 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,26 @@ struct swrast_texture_image { struct gl_texture_image Base; - /* XXX new members coming soon */ + GLboolean _IsPowerOfTwo; /**< Are all dimensions powers of two? */ + + /** used for mipmap LOD computation */ + GLfloat WidthScale, HeightScale, DepthScale; + +#if 0 + 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 +177,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.