#if DIM == 1
#define TEXEL_ADDR( type, image, i, j, k, size ) \
- ((void) (j), (void) (k), ((type *)(image)->Data + (i) * (size)))
+ ((void) (j), (void) (k), ((type *)(image)->Base.Data + (i) * (size)))
#define FETCH(x) fetch_texel_1d_##x
#define TEXEL_ADDR( type, image, i, j, k, size ) \
((void) (k), \
- ((type *)(image)->Data + ((image)->RowStride * (j) + (i)) * (size)))
+ ((type *)(image)->Base.Data + ((image)->Base.RowStride * (j) + (i)) * (size)))
#define FETCH(x) fetch_texel_2d_##x
#elif DIM == 3
#define TEXEL_ADDR( type, image, i, j, k, size ) \
- ((type *)(image)->Data + ((image)->ImageOffsets[k] \
- + (image)->RowStride * (j) + (i)) * (size))
+ ((type *)(image)->Base.Data + ((image)->Base.ImageOffsets[k] \
+ + (image)->Base.RowStride * (j) + (i)) * (size))
#define FETCH(x) fetch_texel_3d_##x
* returning 1 GLfloat.
* Note: no GLchan version of this function.
*/
-static void FETCH(f_z32)( const struct gl_texture_image *texImage,
+static void FETCH(f_z32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_z32(struct gl_texture_image *texImage,
+static void store_texel_z32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLuint *depth = (const GLuint *) texel;
* returning 1 GLfloat.
* Note: no GLchan version of this function.
*/
-static void FETCH(f_z16)(const struct gl_texture_image *texImage,
+static void FETCH(f_z16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_z16(struct gl_texture_image *texImage,
+static void store_texel_z16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLushort *depth = (const GLushort *) texel;
/* Fetch texel from 1D, 2D or 3D RGBA_FLOAT32 texture, returning 4 GLfloats.
*/
-static void FETCH(f_rgba_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgba_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 4);
}
#if DIM == 3
-static void store_texel_rgba_f32(struct gl_texture_image *texImage,
+static void store_texel_rgba_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *depth = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D RGBA_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_rgba_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgba_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 4);
}
#if DIM == 3
-static void store_texel_rgba_f16(struct gl_texture_image *texImage,
+static void store_texel_rgba_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *src = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D RGB_FLOAT32 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_rgb_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgb_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 3);
}
#if DIM == 3
-static void store_texel_rgb_f32(struct gl_texture_image *texImage,
+static void store_texel_rgb_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *src = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D RGB_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_rgb_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgb_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 3);
}
#if DIM == 3
-static void store_texel_rgb_f16(struct gl_texture_image *texImage,
+static void store_texel_rgb_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *src = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D ALPHA_FLOAT32 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_alpha_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_alpha_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_alpha_f32(struct gl_texture_image *texImage,
+static void store_texel_alpha_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D ALPHA_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_alpha_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_alpha_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_alpha_f16(struct gl_texture_image *texImage,
+static void store_texel_alpha_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D LUMINANCE_FLOAT32 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_luminance_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_luminance_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_luminance_f32(struct gl_texture_image *texImage,
+static void store_texel_luminance_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D LUMINANCE_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_luminance_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_luminance_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_luminance_f16(struct gl_texture_image *texImage,
+static void store_texel_luminance_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D LUMINANCE_ALPHA_FLOAT32 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_luminance_alpha_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_luminance_alpha_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2);
}
#if DIM == 3
-static void store_texel_luminance_alpha_f32(struct gl_texture_image *texImage,
+static void store_texel_luminance_alpha_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D LUMINANCE_ALPHA_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_luminance_alpha_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_luminance_alpha_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 2);
}
#if DIM == 3
-static void store_texel_luminance_alpha_f16(struct gl_texture_image *texImage,
+static void store_texel_luminance_alpha_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D INTENSITY_FLOAT32 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_intensity_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_intensity_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_intensity_f32(struct gl_texture_image *texImage,
+static void store_texel_intensity_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D INTENSITY_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_intensity_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_intensity_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_intensity_f16(struct gl_texture_image *texImage,
+static void store_texel_intensity_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D R_FLOAT32 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_r_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_r_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_r_f32(struct gl_texture_image *texImage,
+static void store_texel_r_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D R_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_r_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_r_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_r_f16(struct gl_texture_image *texImage,
+static void store_texel_r_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D RG_FLOAT32 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_rg_f32)( const struct gl_texture_image *texImage,
+static void FETCH(f_rg_f32)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2);
}
#if DIM == 3
-static void store_texel_rg_f32(struct gl_texture_image *texImage,
+static void store_texel_rg_f32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* Fetch texel from 1D, 2D or 3D RG_FLOAT16 texture,
* returning 4 GLfloats.
*/
-static void FETCH(f_rg_f16)( const struct gl_texture_image *texImage,
+static void FETCH(f_rg_f16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLhalfARB *src = TEXEL_ADDR(GLhalfARB, texImage, i, j, k, 2);
}
#if DIM == 3
-static void store_texel_rg_f16(struct gl_texture_image *texImage,
+static void store_texel_rg_f16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *rgba = (const GLfloat *) texel;
/* MESA_FORMAT_RGBA8888 ******************************************************/
/* Fetch texel from 1D, 2D or 3D rgba8888 texture, return 4 GLfloats */
-static void FETCH(f_rgba8888)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgba8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
#if DIM == 3
-static void store_texel_rgba8888(struct gl_texture_image *texImage,
+static void store_texel_rgba8888(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RGBA888_REV ***************************************************/
/* Fetch texel from 1D, 2D or 3D abgr8888 texture, return 4 GLchans */
-static void FETCH(f_rgba8888_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgba8888_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rgba8888_rev(struct gl_texture_image *texImage,
+static void store_texel_rgba8888_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_ARGB8888 ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb8888 texture, return 4 GLchans */
-static void FETCH(f_argb8888)( const struct gl_texture_image *texImage,
+static void FETCH(f_argb8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_argb8888(struct gl_texture_image *texImage,
+static void store_texel_argb8888(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_ARGB8888_REV **************************************************/
/* Fetch texel from 1D, 2D or 3D argb8888_rev texture, return 4 GLfloats */
-static void FETCH(f_argb8888_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_argb8888_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_argb8888_rev(struct gl_texture_image *texImage,
+static void store_texel_argb8888_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_XRGB8888 ******************************************************/
/* Fetch texel from 1D, 2D or 3D xrgb8888 texture, return 4 GLchans */
-static void FETCH(f_xrgb8888)( const struct gl_texture_image *texImage,
+static void FETCH(f_xrgb8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_xrgb8888(struct gl_texture_image *texImage,
+static void store_texel_xrgb8888(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_XRGB8888_REV **************************************************/
/* Fetch texel from 1D, 2D or 3D xrgb8888_rev texture, return 4 GLfloats */
-static void FETCH(f_xrgb8888_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_xrgb8888_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_xrgb8888_rev(struct gl_texture_image *texImage,
+static void store_texel_xrgb8888_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RGB888 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb888 texture, return 4 GLchans */
-static void FETCH(f_rgb888)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgb888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 3);
}
#if DIM == 3
-static void store_texel_rgb888(struct gl_texture_image *texImage,
+static void store_texel_rgb888(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_BGR888 ********************************************************/
/* Fetch texel from 1D, 2D or 3D bgr888 texture, return 4 GLchans */
-static void FETCH(f_bgr888)( const struct gl_texture_image *texImage,
+static void FETCH(f_bgr888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 3);
}
#if DIM == 3
-static void store_texel_bgr888(struct gl_texture_image *texImage,
+static void store_texel_bgr888(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RGB565 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565 texture, return 4 GLchans */
-static void FETCH(f_rgb565)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgb565)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rgb565(struct gl_texture_image *texImage,
+static void store_texel_rgb565(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RGB565_REV ****************************************************/
/* Fetch texel from 1D, 2D or 3D rgb565_rev texture, return 4 GLchans */
-static void FETCH(f_rgb565_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgb565_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rgb565_rev(struct gl_texture_image *texImage,
+static void store_texel_rgb565_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_ARGB4444 ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb444 texture, return 4 GLchans */
-static void FETCH(f_argb4444)( const struct gl_texture_image *texImage,
+static void FETCH(f_argb4444)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_argb4444(struct gl_texture_image *texImage,
+static void store_texel_argb4444(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_ARGB4444_REV **************************************************/
/* Fetch texel from 1D, 2D or 3D argb4444_rev texture, return 4 GLchans */
-static void FETCH(f_argb4444_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_argb4444_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_argb4444_rev(struct gl_texture_image *texImage,
+static void store_texel_argb4444_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_RGBA5551 ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
-static void FETCH(f_rgba5551)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgba5551)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rgba5551(struct gl_texture_image *texImage,
+static void store_texel_rgba5551(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_ARGB1555 ******************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555 texture, return 4 GLchans */
-static void FETCH(f_argb1555)( const struct gl_texture_image *texImage,
+static void FETCH(f_argb1555)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_argb1555(struct gl_texture_image *texImage,
+static void store_texel_argb1555(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_ARGB1555_REV **************************************************/
/* Fetch texel from 1D, 2D or 3D argb1555_rev texture, return 4 GLchans */
-static void FETCH(f_argb1555_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_argb1555_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_argb1555_rev(struct gl_texture_image *texImage,
+static void store_texel_argb1555_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_ARGB2101010 ***************************************************/
/* Fetch texel from 1D, 2D or 3D argb2101010 texture, return 4 GLchans */
-static void FETCH(f_argb2101010)( const struct gl_texture_image *texImage,
+static void FETCH(f_argb2101010)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_argb2101010(struct gl_texture_image *texImage,
+static void store_texel_argb2101010(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_RG88 **********************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
-static void FETCH(f_rg88)( const struct gl_texture_image *texImage,
+static void FETCH(f_rg88)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rg88(struct gl_texture_image *texImage,
+static void store_texel_rg88(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RG88_REV ******************************************************/
/* Fetch texel from 1D, 2D or 3D rg88_rev texture, return 4 GLchans */
-static void FETCH(f_rg88_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_rg88_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rg88_rev(struct gl_texture_image *texImage,
+static void store_texel_rg88_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_AL44 **********************************************************/
/* Fetch texel from 1D, 2D or 3D al44 texture, return 4 GLchans */
-static void FETCH(f_al44)( const struct gl_texture_image *texImage,
+static void FETCH(f_al44)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte s = *TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_al44(struct gl_texture_image *texImage,
+static void store_texel_al44(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_AL88 **********************************************************/
/* Fetch texel from 1D, 2D or 3D al88 texture, return 4 GLchans */
-static void FETCH(f_al88)( const struct gl_texture_image *texImage,
+static void FETCH(f_al88)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_al88(struct gl_texture_image *texImage,
+static void store_texel_al88(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_R8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D rg88 texture, return 4 GLchans */
-static void FETCH(f_r8)(const struct gl_texture_image *texImage,
+static void FETCH(f_r8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLubyte s = *TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_r8(struct gl_texture_image *texImage,
+static void store_texel_r8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_R16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D r16 texture, return 4 GLchans */
-static void FETCH(f_r16)(const struct gl_texture_image *texImage,
+static void FETCH(f_r16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_r16(struct gl_texture_image *texImage,
+static void store_texel_r16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_AL88_REV ******************************************************/
/* Fetch texel from 1D, 2D or 3D al88_rev texture, return 4 GLchans */
-static void FETCH(f_al88_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_al88_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_al88_rev(struct gl_texture_image *texImage,
+static void store_texel_al88_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RG1616 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rg1616 texture, return 4 GLchans */
-static void FETCH(f_rg1616)( const struct gl_texture_image *texImage,
+static void FETCH(f_rg1616)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rg1616(struct gl_texture_image *texImage,
+static void store_texel_rg1616(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_RG1616_REV ****************************************************/
/* Fetch texel from 1D, 2D or 3D rg1616_rev texture, return 4 GLchans */
-static void FETCH(f_rg1616_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_rg1616_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rg1616_rev(struct gl_texture_image *texImage,
+static void store_texel_rg1616_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_AL1616 ********************************************************/
/* Fetch texel from 1D, 2D or 3D al1616 texture, return 4 GLchans */
-static void FETCH(f_al1616)( const struct gl_texture_image *texImage,
+static void FETCH(f_al1616)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_al1616(struct gl_texture_image *texImage,
+static void store_texel_al1616(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_AL1616_REV ****************************************************/
/* Fetch texel from 1D, 2D or 3D al1616_rev texture, return 4 GLchans */
-static void FETCH(f_al1616_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_al1616_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_al1616_rev(struct gl_texture_image *texImage,
+static void store_texel_al1616_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLushort *rgba = (const GLushort *) texel;
/* MESA_FORMAT_RGB332 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb332 texture, return 4 GLchans */
-static void FETCH(f_rgb332)( const struct gl_texture_image *texImage,
+static void FETCH(f_rgb332)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rgb332(struct gl_texture_image *texImage,
+static void store_texel_rgb332(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_A8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
-static void FETCH(f_a8)( const struct gl_texture_image *texImage,
+static void FETCH(f_a8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_a8(struct gl_texture_image *texImage,
+static void store_texel_a8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_A16 ************************************************************/
/* Fetch texel from 1D, 2D or 3D a8 texture, return 4 GLchans */
-static void FETCH(f_a16)( const struct gl_texture_image *texImage,
+static void FETCH(f_a16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_a16(struct gl_texture_image *texImage,
+static void store_texel_a16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_L8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D l8 texture, return 4 GLchans */
-static void FETCH(f_l8)( const struct gl_texture_image *texImage,
+static void FETCH(f_l8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_l8(struct gl_texture_image *texImage,
+static void store_texel_l8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_L16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D l16 texture, return 4 GLchans */
-static void FETCH(f_l16)( const struct gl_texture_image *texImage,
+static void FETCH(f_l16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_l16(struct gl_texture_image *texImage,
+static void store_texel_l16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLushort *rgba = (const GLushort *) texel;
/* MESA_FORMAT_I8 ************************************************************/
/* Fetch texel from 1D, 2D or 3D i8 texture, return 4 GLchans */
-static void FETCH(f_i8)( const struct gl_texture_image *texImage,
+static void FETCH(f_i8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_i8(struct gl_texture_image *texImage,
+static void store_texel_i8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_I16 ***********************************************************/
/* Fetch texel from 1D, 2D or 3D i16 texture, return 4 GLchans */
-static void FETCH(f_i16)( const struct gl_texture_image *texImage,
+static void FETCH(f_i16)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_i16(struct gl_texture_image *texImage,
+static void store_texel_i16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLushort *rgba = (const GLushort *) texel;
/* Fetch texel from 1D, 2D or 3D srgb8 texture, return 4 GLfloats */
/* Note: component order is same as for MESA_FORMAT_RGB888 */
-static void FETCH(srgb8)(const struct gl_texture_image *texImage,
+static void FETCH(srgb8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 3);
}
#if DIM == 3
-static void store_texel_srgb8(struct gl_texture_image *texImage,
+static void store_texel_srgb8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
#endif
/* Fetch texel from 1D, 2D or 3D srgba8 texture, return 4 GLfloats */
-static void FETCH(srgba8)(const struct gl_texture_image *texImage,
+static void FETCH(srgba8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_srgba8(struct gl_texture_image *texImage,
+static void store_texel_srgba8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
#endif
/* Fetch texel from 1D, 2D or 3D sargb8 texture, return 4 GLfloats */
-static void FETCH(sargb8)(const struct gl_texture_image *texImage,
+static void FETCH(sargb8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_sargb8(struct gl_texture_image *texImage,
+static void store_texel_sargb8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
#endif
/* Fetch texel from 1D, 2D or 3D sl8 texture, return 4 GLfloats */
-static void FETCH(sl8)(const struct gl_texture_image *texImage,
+static void FETCH(sl8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_sl8(struct gl_texture_image *texImage,
+static void store_texel_sl8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
#endif
/* Fetch texel from 1D, 2D or 3D sla8 texture, return 4 GLfloats */
-static void FETCH(sla8)(const struct gl_texture_image *texImage,
+static void FETCH(sla8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 2);
}
#if DIM == 3
-static void store_texel_sla8(struct gl_texture_image *texImage,
+static void store_texel_sla8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RGBA_INT8 **************************************************/
static void
-FETCH(rgba_int8)(const struct gl_texture_image *texImage,
+FETCH(rgba_int8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLbyte *src = TEXEL_ADDR(GLbyte, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_rgba_int8(struct gl_texture_image *texImage,
+store_texel_rgba_int8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rgba = (const GLbyte *) texel;
/* MESA_FORMAT_RGBA_INT16 **************************************************/
static void
-FETCH(rgba_int16)(const struct gl_texture_image *texImage,
+FETCH(rgba_int16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLshort *src = TEXEL_ADDR(GLshort, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_rgba_int16(struct gl_texture_image *texImage,
+store_texel_rgba_int16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLshort *rgba = (const GLshort *) texel;
/* MESA_FORMAT_RGBA_INT32 **************************************************/
static void
-FETCH(rgba_int32)(const struct gl_texture_image *texImage,
+FETCH(rgba_int32)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLint *src = TEXEL_ADDR(GLint, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_rgba_int32(struct gl_texture_image *texImage,
+store_texel_rgba_int32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLint *rgba = (const GLint *) texel;
/* MESA_FORMAT_RGBA_UINT8 **************************************************/
static void
-FETCH(rgba_uint8)(const struct gl_texture_image *texImage,
+FETCH(rgba_uint8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLubyte *src = TEXEL_ADDR(GLubyte, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_rgba_uint8(struct gl_texture_image *texImage,
+store_texel_rgba_uint8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_RGBA_UINT16 **************************************************/
static void
-FETCH(rgba_uint16)(const struct gl_texture_image *texImage,
+FETCH(rgba_uint16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_rgba_uint16(struct gl_texture_image *texImage,
+store_texel_rgba_uint16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLushort *rgba = (const GLushort *) texel;
/* MESA_FORMAT_RGBA_UINT32 **************************************************/
static void
-FETCH(rgba_uint32)(const struct gl_texture_image *texImage,
+FETCH(rgba_uint32)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_rgba_uint32(struct gl_texture_image *texImage,
+store_texel_rgba_uint32(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLuint *rgba = (const GLuint *) texel;
/* this format by definition produces 0,0,0,1 as rgba values,
however we'll return the dudv values as rg and fix up elsewhere */
-static void FETCH(dudv8)(const struct gl_texture_image *texImage,
+static void FETCH(dudv8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLbyte *src = TEXEL_ADDR(GLbyte, texImage, i, j, k, 2);
/* MESA_FORMAT_SIGNED_R8 ***********************************************/
-static void FETCH(signed_r8)( const struct gl_texture_image *texImage,
+static void FETCH(signed_r8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLbyte s = *TEXEL_ADDR(GLbyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_r8(struct gl_texture_image *texImage,
+static void store_texel_signed_r8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rgba = (const GLbyte *) texel;
/* MESA_FORMAT_SIGNED_A8 ***********************************************/
-static void FETCH(signed_a8)( const struct gl_texture_image *texImage,
+static void FETCH(signed_a8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLbyte s = *TEXEL_ADDR(GLbyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_a8(struct gl_texture_image *texImage,
+static void store_texel_signed_a8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rgba = (const GLbyte *) texel;
/* MESA_FORMAT_SIGNED_L8 ***********************************************/
-static void FETCH(signed_l8)( const struct gl_texture_image *texImage,
+static void FETCH(signed_l8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLbyte s = *TEXEL_ADDR(GLbyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_l8(struct gl_texture_image *texImage,
+static void store_texel_signed_l8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rgba = (const GLbyte *) texel;
/* MESA_FORMAT_SIGNED_I8 ***********************************************/
-static void FETCH(signed_i8)( const struct gl_texture_image *texImage,
+static void FETCH(signed_i8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLbyte s = *TEXEL_ADDR(GLbyte, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_i8(struct gl_texture_image *texImage,
+static void store_texel_signed_i8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rgba = (const GLbyte *) texel;
/* MESA_FORMAT_SIGNED_RG88_REV ***********************************************/
-static void FETCH(signed_rg88_rev)( const struct gl_texture_image *texImage,
+static void FETCH(signed_rg88_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_rg88_rev(struct gl_texture_image *texImage,
+static void store_texel_signed_rg88_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rg = (const GLbyte *) texel;
/* MESA_FORMAT_SIGNED_AL88 ***********************************************/
-static void FETCH(signed_al88)( const struct gl_texture_image *texImage,
+static void FETCH(signed_al88)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_al88(struct gl_texture_image *texImage,
+static void store_texel_signed_al88(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rg = (const GLbyte *) texel;
/* MESA_FORMAT_SIGNED_RGBX8888 ***********************************************/
-static void FETCH(signed_rgbx8888)( const struct gl_texture_image *texImage,
+static void FETCH(signed_rgbx8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_rgbx8888(struct gl_texture_image *texImage,
+static void store_texel_signed_rgbx8888(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rgba = (const GLbyte *) texel;
/* MESA_FORMAT_SIGNED_RGBA8888 ***********************************************/
-static void FETCH(signed_rgba8888)( const struct gl_texture_image *texImage,
+static void FETCH(signed_rgba8888)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_rgba8888(struct gl_texture_image *texImage,
+static void store_texel_signed_rgba8888(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLbyte *rgba = (const GLbyte *) texel;
}
#endif
-static void FETCH(signed_rgba8888_rev)( const struct gl_texture_image *texImage,
+static void FETCH(signed_rgba8888_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_signed_rgba8888_rev(struct gl_texture_image *texImage,
+static void store_texel_signed_rgba8888_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLubyte *rgba = (const GLubyte *) texel;
/* MESA_FORMAT_SIGNED_R16 ***********************************************/
static void
-FETCH(signed_r16)(const struct gl_texture_image *texImage,
+FETCH(signed_r16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
#if DIM == 3
static void
-store_texel_signed_r16(struct gl_texture_image *texImage,
+store_texel_signed_r16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLshort *rgba = (const GLshort *) texel;
/* MESA_FORMAT_SIGNED_A16 ***********************************************/
static void
-FETCH(signed_a16)(const struct gl_texture_image *texImage,
+FETCH(signed_a16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
#if DIM == 3
static void
-store_texel_signed_a16(struct gl_texture_image *texImage,
+store_texel_signed_a16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLshort *rgba = (const GLshort *) texel;
/* MESA_FORMAT_SIGNED_L16 ***********************************************/
static void
-FETCH(signed_l16)(const struct gl_texture_image *texImage,
+FETCH(signed_l16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
#if DIM == 3
static void
-store_texel_signed_l16(struct gl_texture_image *texImage,
+store_texel_signed_l16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLshort *rgba = (const GLshort *) texel;
/* MESA_FORMAT_SIGNED_I16 ***********************************************/
static void
-FETCH(signed_i16)(const struct gl_texture_image *texImage,
+FETCH(signed_i16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1);
#if DIM == 3
static void
-store_texel_signed_i16(struct gl_texture_image *texImage,
+store_texel_signed_i16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLshort *rgba = (const GLshort *) texel;
/* MESA_FORMAT_SIGNED_RG1616 ***********************************************/
static void
-FETCH(signed_rg1616)(const struct gl_texture_image *texImage,
+FETCH(signed_rg1616)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 2);
#if DIM == 3
static void
-store_texel_signed_rg1616(struct gl_texture_image *texImage,
+store_texel_signed_rg1616(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_SIGNED_AL1616 ***********************************************/
static void
-FETCH(signed_al1616)(const struct gl_texture_image *texImage,
+FETCH(signed_al1616)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 2);
#if DIM == 3
static void
-store_texel_signed_al1616(struct gl_texture_image *texImage,
+store_texel_signed_al1616(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_SIGNED_RGB_16 ***********************************************/
static void
-FETCH(signed_rgb_16)(const struct gl_texture_image *texImage,
+FETCH(signed_rgb_16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 3);
#if DIM == 3
static void
-store_texel_signed_rgb_16(struct gl_texture_image *texImage,
+store_texel_signed_rgb_16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_SIGNED_RGBA_16 ***********************************************/
static void
-FETCH(signed_rgba_16)(const struct gl_texture_image *texImage,
+FETCH(signed_rgba_16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_signed_rgba_16(struct gl_texture_image *texImage,
+store_texel_signed_rgba_16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* MESA_FORMAT_RGBA_16 ***********************************************/
static void
-FETCH(rgba_16)(const struct gl_texture_image *texImage,
+FETCH(rgba_16)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLushort *s = TEXEL_ADDR(GLushort, texImage, i, j, k, 4);
#if DIM == 3
static void
-store_texel_rgba_16(struct gl_texture_image *texImage,
+store_texel_rgba_16(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLchan *rgba = (const GLchan *) texel;
/* Fetch texel from 1D, 2D or 3D ycbcr texture, return 4 GLfloats.
* We convert YCbCr to RGB here.
*/
-static void FETCH(f_ycbcr)( const struct gl_texture_image *texImage,
+static void FETCH(f_ycbcr)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src0 = TEXEL_ADDR(GLushort, texImage, (i & ~1), j, k, 1); /* even */
}
#if DIM == 3
-static void store_texel_ycbcr(struct gl_texture_image *texImage,
+static void store_texel_ycbcr(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
(void) texImage;
/* Fetch texel from 1D, 2D or 3D ycbcr_rev texture, return 4 GLfloats.
* We convert YCbCr to RGB here.
*/
-static void FETCH(f_ycbcr_rev)( const struct gl_texture_image *texImage,
+static void FETCH(f_ycbcr_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort *src0 = TEXEL_ADDR(GLushort, texImage, (i & ~1), j, k, 1); /* even */
}
#if DIM == 3
-static void store_texel_ycbcr_rev(struct gl_texture_image *texImage,
+static void store_texel_ycbcr_rev(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
(void) texImage;
/* MESA_TEXFORMAT_Z24_S8 ***************************************************/
-static void FETCH(f_z24_s8)( const struct gl_texture_image *texImage,
+static void FETCH(f_z24_s8)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
/* only return Z, not stencil data */
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLfloat scale = 1.0F / (GLfloat) 0xffffff;
texel[0] = ((*src) >> 8) * scale;
- ASSERT(texImage->TexFormat == MESA_FORMAT_Z24_S8 ||
- texImage->TexFormat == MESA_FORMAT_Z24_X8);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_Z24_S8 ||
+ texImage->Base.TexFormat == MESA_FORMAT_Z24_X8);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
#if DIM == 3
-static void store_texel_z24_s8(struct gl_texture_image *texImage,
+static void store_texel_z24_s8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
/* only store Z, not stencil */
/* MESA_TEXFORMAT_S8_Z24 ***************************************************/
-static void FETCH(f_s8_z24)( const struct gl_texture_image *texImage,
+static void FETCH(f_s8_z24)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
/* only return Z, not stencil data */
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
const GLfloat scale = 1.0F / (GLfloat) 0xffffff;
texel[0] = ((*src) & 0x00ffffff) * scale;
- ASSERT(texImage->TexFormat == MESA_FORMAT_S8_Z24 ||
- texImage->TexFormat == MESA_FORMAT_X8_Z24);
+ ASSERT(texImage->Base.TexFormat == MESA_FORMAT_S8_Z24 ||
+ texImage->Base.TexFormat == MESA_FORMAT_X8_Z24);
ASSERT(texel[0] >= 0.0F);
ASSERT(texel[0] <= 1.0F);
}
#if DIM == 3
-static void store_texel_s8_z24(struct gl_texture_image *texImage,
+static void store_texel_s8_z24(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
/* only store Z, not stencil */
/* MESA_FORMAT_RGB9_E5 ******************************************************/
-static void FETCH(rgb9_e5)( const struct gl_texture_image *texImage,
+static void FETCH(rgb9_e5)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_rgb9_e5(struct gl_texture_image *texImage,
+static void store_texel_rgb9_e5(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *src = (const GLfloat *) texel;
/* MESA_FORMAT_R11_G11_B10_FLOAT *********************************************/
-static void FETCH(r11_g11_b10f)( const struct gl_texture_image *texImage,
+static void FETCH(r11_g11_b10f)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
}
#if DIM == 3
-static void store_texel_r11_g11_b10f(struct gl_texture_image *texImage,
+static void store_texel_r11_g11_b10f(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *src = (const GLfloat *) texel;
/* MESA_FORMAT_Z32_FLOAT_X24S8 ***********************************************/
-static void FETCH(z32f_x24s8)(const struct gl_texture_image *texImage,
+static void FETCH(z32f_x24s8)(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel)
{
const GLfloat *src = TEXEL_ADDR(GLfloat, texImage, i, j, k, 2);
}
#if DIM == 3
-static void store_texel_z32f_x24s8(struct gl_texture_image *texImage,
+static void store_texel_z32f_x24s8(struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, const void *texel)
{
const GLfloat *src = (const GLfloat *) texel;
const struct gl_texture_image *img,
const GLfloat texcoord[4], GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2; /* without border, power of two */
GLint i;
i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]);
get_border_color(tObj, img, rgba);
}
else {
- img->FetchTexelf(img, i, 0, 0, rgba);
+ swImg->FetchTexelf(swImg, i, 0, 0, rgba);
}
}
const struct gl_texture_image *img,
const GLfloat texcoord[4], GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2;
GLint i0, i1;
GLbitfield useBorderColor = 0x0;
get_border_color(tObj, img, t0);
}
else {
- img->FetchTexelf(img, i0, 0, 0, t0);
+ swImg->FetchTexelf(swImg, i0, 0, 0, t0);
}
if (useBorderColor & I1BIT) {
get_border_color(tObj, img, t1);
}
else {
- img->FetchTexelf(img, i1, 0, 0, t1);
+ swImg->FetchTexelf(swImg, i1, 0, 0, t1);
}
lerp_rgba(rgba, a, t0, t1);
const GLfloat texcoord[4],
GLfloat rgba[])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2; /* without border, power of two */
const GLint height = img->Height2; /* without border, power of two */
GLint i, j;
get_border_color(tObj, img, rgba);
}
else {
- img->FetchTexelf(img, i, j, 0, rgba);
+ swImg->FetchTexelf(swImg, i, j, 0, rgba);
}
}
const GLfloat texcoord[4],
GLfloat rgba[])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2;
const GLint height = img->Height2;
GLint i0, j0, i1, j1;
get_border_color(tObj, img, t00);
}
else {
- img->FetchTexelf(img, i0, j0, 0, t00);
+ swImg->FetchTexelf(swImg, i0, j0, 0, t00);
}
if (useBorderColor & (I1BIT | J0BIT)) {
get_border_color(tObj, img, t10);
}
else {
- img->FetchTexelf(img, i1, j0, 0, t10);
+ swImg->FetchTexelf(swImg, i1, j0, 0, t10);
}
if (useBorderColor & (I0BIT | J1BIT)) {
get_border_color(tObj, img, t01);
}
else {
- img->FetchTexelf(img, i0, j1, 0, t01);
+ swImg->FetchTexelf(swImg, i0, j1, 0, t01);
}
if (useBorderColor & (I1BIT | J1BIT)) {
get_border_color(tObj, img, t11);
}
else {
- img->FetchTexelf(img, i1, j1, 0, t11);
+ swImg->FetchTexelf(swImg, i1, j1, 0, t11);
}
lerp_rgba_2d(rgba, a, b, t00, t10, t01, t11);
const GLfloat texcoord[4],
GLfloat rgba[])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2;
const GLint height = img->Height2;
GLint i0, j0, i1, j1;
linear_repeat_texel_location(width, texcoord[0], &i0, &i1, &wi);
linear_repeat_texel_location(height, texcoord[1], &j0, &j1, &wj);
- img->FetchTexelf(img, i0, j0, 0, t00);
- img->FetchTexelf(img, i1, j0, 0, t10);
- img->FetchTexelf(img, i0, j1, 0, t01);
- img->FetchTexelf(img, i1, j1, 0, t11);
+ swImg->FetchTexelf(swImg, i0, j0, 0, t00);
+ swImg->FetchTexelf(swImg, i1, j0, 0, t10);
+ swImg->FetchTexelf(swImg, i0, j1, 0, t01);
+ swImg->FetchTexelf(swImg, i1, j1, 0, t11);
lerp_rgba_2d(rgba, wi, wj, t00, t10, t01, t11);
}
const GLfloat texcoord[4],
GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2; /* without border, power of two */
const GLint height = img->Height2; /* without border, power of two */
const GLint depth = img->Depth2; /* without border, power of two */
get_border_color(tObj, img, rgba);
}
else {
- img->FetchTexelf(img, i, j, k, rgba);
+ swImg->FetchTexelf(swImg, i, j, k, rgba);
}
}
const GLfloat texcoord[4],
GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2;
const GLint height = img->Height2;
const GLint depth = img->Depth2;
get_border_color(tObj, img, t000);
}
else {
- img->FetchTexelf(img, i0, j0, k0, t000);
+ swImg->FetchTexelf(swImg, i0, j0, k0, t000);
}
if (useBorderColor & (I1BIT | J0BIT | K0BIT)) {
get_border_color(tObj, img, t100);
}
else {
- img->FetchTexelf(img, i1, j0, k0, t100);
+ swImg->FetchTexelf(swImg, i1, j0, k0, t100);
}
if (useBorderColor & (I0BIT | J1BIT | K0BIT)) {
get_border_color(tObj, img, t010);
}
else {
- img->FetchTexelf(img, i0, j1, k0, t010);
+ swImg->FetchTexelf(swImg, i0, j1, k0, t010);
}
if (useBorderColor & (I1BIT | J1BIT | K0BIT)) {
get_border_color(tObj, img, t110);
}
else {
- img->FetchTexelf(img, i1, j1, k0, t110);
+ swImg->FetchTexelf(swImg, i1, j1, k0, t110);
}
if (useBorderColor & (I0BIT | J0BIT | K1BIT)) {
get_border_color(tObj, img, t001);
}
else {
- img->FetchTexelf(img, i0, j0, k1, t001);
+ swImg->FetchTexelf(swImg, i0, j0, k1, t001);
}
if (useBorderColor & (I1BIT | J0BIT | K1BIT)) {
get_border_color(tObj, img, t101);
}
else {
- img->FetchTexelf(img, i1, j0, k1, t101);
+ swImg->FetchTexelf(swImg, i1, j0, k1, t101);
}
if (useBorderColor & (I0BIT | J1BIT | K1BIT)) {
get_border_color(tObj, img, t011);
}
else {
- img->FetchTexelf(img, i0, j1, k1, t011);
+ swImg->FetchTexelf(swImg, i0, j1, k1, t011);
}
if (useBorderColor & (I1BIT | J1BIT | K1BIT)) {
get_border_color(tObj, img, t111);
}
else {
- img->FetchTexelf(img, i1, j1, k1, t111);
+ swImg->FetchTexelf(swImg, i1, j1, k1, t111);
}
/* trilinear interpolation of samples */
GLfloat rgba[][4])
{
const struct gl_texture_image *img = tObj->Image[0][0];
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width;
const GLint height = img->Height;
GLuint i;
if (col < 0 || col >= width || row < 0 || row >= height)
get_border_color(tObj, img, rgba[i]);
else
- img->FetchTexelf(img, col, row, 0, rgba[i]);
+ swImg->FetchTexelf(swImg, col, row, 0, rgba[i]);
}
}
const GLfloat lambda[], GLfloat rgba[][4])
{
const struct gl_texture_image *img = tObj->Image[0][0];
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width;
const GLint height = img->Height;
GLuint i;
if (useBorderColor & (I0BIT | J0BIT))
get_border_color(tObj, img, t00);
else
- img->FetchTexelf(img, i0, j0, 0, t00);
+ swImg->FetchTexelf(swImg, i0, j0, 0, t00);
if (useBorderColor & (I1BIT | J0BIT))
get_border_color(tObj, img, t10);
else
- img->FetchTexelf(img, i1, j0, 0, t10);
+ swImg->FetchTexelf(swImg, i1, j0, 0, t10);
if (useBorderColor & (I0BIT | J1BIT))
get_border_color(tObj, img, t01);
else
- img->FetchTexelf(img, i0, j1, 0, t01);
+ swImg->FetchTexelf(swImg, i0, j1, 0, t01);
if (useBorderColor & (I1BIT | J1BIT))
get_border_color(tObj, img, t11);
else
- img->FetchTexelf(img, i1, j1, 0, t11);
+ swImg->FetchTexelf(swImg, i1, j1, 0, t11);
lerp_rgba_2d(rgba[i], a, b, t00, t10, t01, t11);
}
const GLfloat texcoord[4],
GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2; /* without border, power of two */
const GLint height = img->Height2; /* without border, power of two */
const GLint depth = img->Depth;
get_border_color(tObj, img, rgba);
}
else {
- img->FetchTexelf(img, i, j, array, rgba);
+ swImg->FetchTexelf(swImg, i, j, array, rgba);
}
}
const GLfloat texcoord[4],
GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2;
const GLint height = img->Height2;
const GLint depth = img->Depth;
get_border_color(tObj, img, t00);
}
else {
- img->FetchTexelf(img, i0, j0, array, t00);
+ swImg->FetchTexelf(swImg, i0, j0, array, t00);
}
if (useBorderColor & (I1BIT | J0BIT)) {
get_border_color(tObj, img, t10);
}
else {
- img->FetchTexelf(img, i1, j0, array, t10);
+ swImg->FetchTexelf(swImg, i1, j0, array, t10);
}
if (useBorderColor & (I0BIT | J1BIT)) {
get_border_color(tObj, img, t01);
}
else {
- img->FetchTexelf(img, i0, j1, array, t01);
+ swImg->FetchTexelf(swImg, i0, j1, array, t01);
}
if (useBorderColor & (I1BIT | J1BIT)) {
get_border_color(tObj, img, t11);
}
else {
- img->FetchTexelf(img, i1, j1, array, t11);
+ swImg->FetchTexelf(swImg, i1, j1, array, t11);
}
/* trilinear interpolation of samples */
const GLfloat texcoord[4],
GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2; /* without border, power of two */
const GLint height = img->Height;
GLint i;
get_border_color(tObj, img, rgba);
}
else {
- img->FetchTexelf(img, i, array, 0, rgba);
+ swImg->FetchTexelf(swImg, i, array, 0, rgba);
}
}
const GLfloat texcoord[4],
GLfloat rgba[4])
{
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width2;
const GLint height = img->Height;
GLint i0, i1;
get_border_color(tObj, img, t0);
}
else {
- img->FetchTexelf(img, i0, array, 0, t0);
+ swImg->FetchTexelf(swImg, i0, array, 0, t0);
}
if (useBorderColor & (I1BIT | K0BIT)) {
get_border_color(tObj, img, t1);
}
else {
- img->FetchTexelf(img, i1, array, 0, t1);
+ swImg->FetchTexelf(swImg, i1, array, 0, t1);
}
/* bilinear interpolation of samples */
{
const GLint level = choose_depth_texture_level(tObj, lambda[0]);
const struct gl_texture_image *img = tObj->Image[0][level];
+ const struct swrast_texture_image *swImg = swrast_texture_image_const(img);
const GLint width = img->Width;
const GLint height = img->Height;
const GLint depth = img->Depth;
if (col >= 0 && row >= 0 && col < width && row < height &&
slice >= 0 && slice < depth) {
- img->FetchTexelf(img, col, row, slice, &depthSample);
+ swImg->FetchTexelf(swImg, col, row, slice, &depthSample);
}
else {
depthSample = tObj->Sampler.BorderColor.f[0];
depth00 = tObj->Sampler.BorderColor.f[0];
}
else {
- img->FetchTexelf(img, i0, j0, slice, &depth00);
+ swImg->FetchTexelf(swImg, i0, j0, slice, &depth00);
}
if (useBorderTexel & (I1BIT | J0BIT)) {
depth10 = tObj->Sampler.BorderColor.f[0];
}
else {
- img->FetchTexelf(img, i1, j0, slice, &depth10);
+ swImg->FetchTexelf(swImg, i1, j0, slice, &depth10);
}
if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) {
depth01 = tObj->Sampler.BorderColor.f[0];
}
else {
- img->FetchTexelf(img, i0, j1, slice, &depth01);
+ swImg->FetchTexelf(swImg, i0, j1, slice, &depth01);
}
if (useBorderTexel & (I1BIT | J1BIT)) {
depth11 = tObj->Sampler.BorderColor.f[0];
}
else {
- img->FetchTexelf(img, i1, j1, slice, &depth11);
+ swImg->FetchTexelf(swImg, i1, j1, slice, &depth11);
}
}
else {