summaryrefslogtreecommitdiff
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c67
1 files changed, 58 insertions, 9 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index a496cf8cbf..3cbc7c88f8 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -82,6 +82,13 @@ static void fetch_null_texelf( const struct gl_texture_image *texImage,
_mesa_warning(NULL, "fetch_null_texelf() called!");
}
+static void store_null_texel(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ /* no-op */
+}
+
+
/***************************************************************/
/** \name Default GLchan-based formats */
@@ -107,6 +114,7 @@ const struct gl_texture_format _mesa_texformat_rgba = {
fetch_texel_1d_f_rgba, /* FetchTexel1Df */
fetch_texel_2d_f_rgba, /* FetchTexel2Df */
fetch_texel_3d_f_rgba, /* FetchTexel3Df */
+ store_texel_rgba /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgb = {
@@ -129,6 +137,7 @@ const struct gl_texture_format _mesa_texformat_rgb = {
fetch_texel_1d_f_rgb, /* FetchTexel1Df */
fetch_texel_2d_f_rgb, /* FetchTexel2Df */
fetch_texel_3d_f_rgb, /* FetchTexel3Df */
+ store_texel_rgb /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_alpha = {
@@ -151,6 +160,7 @@ const struct gl_texture_format _mesa_texformat_alpha = {
fetch_texel_1d_f_alpha, /* FetchTexel1Df */
fetch_texel_2d_f_alpha, /* FetchTexel2Df */
fetch_texel_3d_f_alpha, /* FetchTexel3Df */
+ store_texel_alpha /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_luminance = {
@@ -173,6 +183,7 @@ const struct gl_texture_format _mesa_texformat_luminance = {
fetch_texel_1d_f_luminance, /* FetchTexel1Df */
fetch_texel_2d_f_luminance, /* FetchTexel2Df */
fetch_texel_3d_f_luminance, /* FetchTexel3Df */
+ store_texel_luminance /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_luminance_alpha = {
@@ -195,6 +206,7 @@ const struct gl_texture_format _mesa_texformat_luminance_alpha = {
fetch_texel_1d_f_luminance_alpha, /* FetchTexel1Df */
fetch_texel_2d_f_luminance_alpha, /* FetchTexel2Df */
fetch_texel_3d_f_luminance_alpha, /* FetchTexel3Df */
+ store_texel_luminance_alpha /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_intensity = {
@@ -217,6 +229,7 @@ const struct gl_texture_format _mesa_texformat_intensity = {
fetch_texel_1d_f_intensity, /* FetchTexel1Df */
fetch_texel_2d_f_intensity, /* FetchTexel2Df */
fetch_texel_3d_f_intensity, /* FetchTexel3Df */
+ store_texel_intensity /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_depth_component_float32 = {
@@ -239,6 +252,7 @@ const struct gl_texture_format _mesa_texformat_depth_component_float32 = {
fetch_texel_1d_f_depth_component_f32,/* FetchTexel1Df */
fetch_texel_2d_f_depth_component_f32,/* FetchTexel2Df */
fetch_texel_3d_f_depth_component_f32,/* FetchTexel3Df */
+ store_texel_depth_component_f32 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_depth_component16 = {
@@ -261,6 +275,7 @@ const struct gl_texture_format _mesa_texformat_depth_component16 = {
fetch_texel_1d_f_depth_component16, /* FetchTexel1Df */
fetch_texel_2d_f_depth_component16, /* FetchTexel2Df */
fetch_texel_3d_f_depth_component16, /* FetchTexel3Df */
+ store_texel_depth_component16 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgba_float32 = {
@@ -283,6 +298,7 @@ const struct gl_texture_format _mesa_texformat_rgba_float32 = {
fetch_texel_1d_f_rgba_f32, /* FetchTexel1Df */
fetch_texel_2d_f_rgba_f32, /* FetchTexel2Df */
fetch_texel_3d_f_rgba_f32, /* FetchTexel3Df */
+ store_texel_rgba_f32 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgba_float16 = {
@@ -305,6 +321,7 @@ const struct gl_texture_format _mesa_texformat_rgba_float16 = {
fetch_texel_1d_f_rgba_f16, /* FetchTexel1Df */
fetch_texel_2d_f_rgba_f16, /* FetchTexel2Df */
fetch_texel_3d_f_rgba_f16, /* FetchTexel3Df */
+ store_texel_rgba_f16 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgb_float32 = {
@@ -327,6 +344,7 @@ const struct gl_texture_format _mesa_texformat_rgb_float32 = {
fetch_texel_1d_f_rgb_f32, /* FetchTexel1Df */
fetch_texel_2d_f_rgb_f32, /* FetchTexel2Df */
fetch_texel_3d_f_rgb_f32, /* FetchTexel3Df */
+ store_texel_rgb_f32 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgb_float16 = {
@@ -348,7 +366,8 @@ const struct gl_texture_format _mesa_texformat_rgb_float16 = {
fetch_texel_3d_rgb_f16, /* FetchTexel1D */
fetch_texel_1d_f_rgb_f16, /* FetchTexel1Df */
fetch_texel_2d_f_rgb_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_rgb_f16 /* FetchTexel3Df */
+ fetch_texel_3d_f_rgb_f16, /* FetchTexel3Df */
+ store_texel_rgb_f16 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_alpha_float32 = {
@@ -370,7 +389,8 @@ const struct gl_texture_format _mesa_texformat_alpha_float32 = {
fetch_texel_3d_alpha_f32, /* FetchTexel1D */
fetch_texel_1d_f_alpha_f32, /* FetchTexel1Df */
fetch_texel_2d_f_alpha_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_alpha_f32 /* FetchTexel3Df */
+ fetch_texel_3d_f_alpha_f32, /* FetchTexel3Df */
+ store_texel_alpha_f32 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_alpha_float16 = {
@@ -392,7 +412,8 @@ const struct gl_texture_format _mesa_texformat_alpha_float16 = {
fetch_texel_3d_alpha_f16, /* FetchTexel1D */
fetch_texel_1d_f_alpha_f16, /* FetchTexel1Df */
fetch_texel_2d_f_alpha_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_alpha_f16 /* FetchTexel3Df */
+ fetch_texel_3d_f_alpha_f16, /* FetchTexel3Df */
+ store_texel_alpha_f16 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_luminance_float32 = {
@@ -414,7 +435,8 @@ const struct gl_texture_format _mesa_texformat_luminance_float32 = {
fetch_texel_3d_luminance_f32, /* FetchTexel3D */
fetch_texel_1d_f_luminance_f32, /* FetchTexel1Df */
fetch_texel_2d_f_luminance_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_luminance_f32 /* FetchTexel3Df */
+ fetch_texel_3d_f_luminance_f32, /* FetchTexel3Df */
+ store_texel_luminance_f32 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_luminance_float16 = {
@@ -436,7 +458,8 @@ const struct gl_texture_format _mesa_texformat_luminance_float16 = {
fetch_texel_3d_luminance_f16, /* FetchTexel3D */
fetch_texel_1d_f_luminance_f16, /* FetchTexel1Df */
fetch_texel_2d_f_luminance_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_luminance_f16 /* FetchTexel3Df */
+ fetch_texel_3d_f_luminance_f16, /* FetchTexel3Df */
+ store_texel_luminance_f16 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_luminance_alpha_float32 = {
@@ -458,7 +481,8 @@ const struct gl_texture_format _mesa_texformat_luminance_alpha_float32 = {
fetch_texel_3d_luminance_alpha_f32, /* FetchTexel3D */
fetch_texel_1d_f_luminance_alpha_f32,/* FetchTexel1Df */
fetch_texel_2d_f_luminance_alpha_f32,/* FetchTexel2Df */
- fetch_texel_3d_f_luminance_alpha_f32 /* FetchTexel3Df */
+ fetch_texel_3d_f_luminance_alpha_f32,/* FetchTexel3Df */
+ store_texel_luminance_alpha_f32 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_luminance_alpha_float16 = {
@@ -480,7 +504,8 @@ const struct gl_texture_format _mesa_texformat_luminance_alpha_float16 = {
fetch_texel_3d_luminance_alpha_f16, /* FetchTexel3D */
fetch_texel_1d_f_luminance_alpha_f16,/* FetchTexel1Df */
fetch_texel_2d_f_luminance_alpha_f16,/* FetchTexel2Df */
- fetch_texel_3d_f_luminance_alpha_f16 /* FetchTexel3Df */
+ fetch_texel_3d_f_luminance_alpha_f16,/* FetchTexel3Df */
+ store_texel_luminance_alpha_f16 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_intensity_float32 = {
@@ -502,7 +527,8 @@ const struct gl_texture_format _mesa_texformat_intensity_float32 = {
fetch_texel_3d_intensity_f32, /* FetchTexel3D */
fetch_texel_1d_f_intensity_f32, /* FetchTexel1Df */
fetch_texel_2d_f_intensity_f32, /* FetchTexel2Df */
- fetch_texel_3d_f_intensity_f32 /* FetchTexel3Df */
+ fetch_texel_3d_f_intensity_f32, /* FetchTexel3Df */
+ store_texel_intensity_f32 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_intensity_float16 = {
@@ -524,7 +550,8 @@ const struct gl_texture_format _mesa_texformat_intensity_float16 = {
fetch_texel_3d_intensity_f16, /* FetchTexel3D */
fetch_texel_1d_f_intensity_f16, /* FetchTexel1Df */
fetch_texel_2d_f_intensity_f16, /* FetchTexel2Df */
- fetch_texel_3d_f_intensity_f16 /* FetchTexel3Df */
+ fetch_texel_3d_f_intensity_f16, /* FetchTexel3Df */
+ store_texel_intensity_f16 /* StoreTexel */
};
@@ -555,6 +582,7 @@ const struct gl_texture_format _mesa_texformat_rgba8888 = {
fetch_texel_1d_f_rgba8888, /* FetchTexel1Df */
fetch_texel_2d_f_rgba8888, /* FetchTexel2Df */
fetch_texel_3d_f_rgba8888, /* FetchTexel3Df */
+ store_texel_rgba8888 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgba8888_rev = {
@@ -577,6 +605,7 @@ const struct gl_texture_format _mesa_texformat_rgba8888_rev = {
fetch_texel_1d_f_rgba8888_rev, /* FetchTexel1Df */
fetch_texel_2d_f_rgba8888_rev, /* FetchTexel2Df */
fetch_texel_3d_f_rgba8888_rev, /* FetchTexel3Df */
+ store_texel_rgba8888_rev /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_argb8888 = {
@@ -599,6 +628,7 @@ const struct gl_texture_format _mesa_texformat_argb8888 = {
fetch_texel_1d_f_argb8888, /* FetchTexel1Df */
fetch_texel_2d_f_argb8888, /* FetchTexel2Df */
fetch_texel_3d_f_argb8888, /* FetchTexel3Df */
+ store_texel_argb8888 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_argb8888_rev = {
@@ -621,6 +651,7 @@ const struct gl_texture_format _mesa_texformat_argb8888_rev = {
fetch_texel_1d_f_argb8888_rev, /* FetchTexel1Df */
fetch_texel_2d_f_argb8888_rev, /* FetchTexel2Df */
fetch_texel_3d_f_argb8888_rev, /* FetchTexel3Df */
+ store_texel_argb8888_rev /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgb888 = {
@@ -643,6 +674,7 @@ const struct gl_texture_format _mesa_texformat_rgb888 = {
fetch_texel_1d_f_rgb888, /* FetchTexel1Df */
fetch_texel_2d_f_rgb888, /* FetchTexel2Df */
fetch_texel_3d_f_rgb888, /* FetchTexel3Df */
+ store_texel_rgb888 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_bgr888 = {
@@ -665,6 +697,7 @@ const struct gl_texture_format _mesa_texformat_bgr888 = {
fetch_texel_1d_f_bgr888, /* FetchTexel1Df */
fetch_texel_2d_f_bgr888, /* FetchTexel2Df */
fetch_texel_3d_f_bgr888, /* FetchTexel3Df */
+ store_texel_bgr888 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgb565 = {
@@ -687,6 +720,7 @@ const struct gl_texture_format _mesa_texformat_rgb565 = {
fetch_texel_1d_f_rgb565, /* FetchTexel1Df */
fetch_texel_2d_f_rgb565, /* FetchTexel2Df */
fetch_texel_3d_f_rgb565, /* FetchTexel3Df */
+ store_texel_rgb565 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgb565_rev = {
@@ -709,6 +743,7 @@ const struct gl_texture_format _mesa_texformat_rgb565_rev = {
fetch_texel_1d_f_rgb565_rev, /* FetchTexel1Df */
fetch_texel_2d_f_rgb565_rev, /* FetchTexel2Df */
fetch_texel_3d_f_rgb565_rev, /* FetchTexel3Df */
+ store_texel_rgb565_rev /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_argb4444 = {
@@ -731,6 +766,7 @@ const struct gl_texture_format _mesa_texformat_argb4444 = {
fetch_texel_1d_f_argb4444, /* FetchTexel1Df */
fetch_texel_2d_f_argb4444, /* FetchTexel2Df */
fetch_texel_3d_f_argb4444, /* FetchTexel3Df */
+ store_texel_argb4444 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_argb4444_rev = {
@@ -753,6 +789,7 @@ const struct gl_texture_format _mesa_texformat_argb4444_rev = {
fetch_texel_1d_f_argb4444_rev, /* FetchTexel1Df */
fetch_texel_2d_f_argb4444_rev, /* FetchTexel2Df */
fetch_texel_3d_f_argb4444_rev, /* FetchTexel3Df */
+ store_texel_argb4444_rev /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_argb1555 = {
@@ -775,6 +812,7 @@ const struct gl_texture_format _mesa_texformat_argb1555 = {
fetch_texel_1d_f_argb1555, /* FetchTexel1Df */
fetch_texel_2d_f_argb1555, /* FetchTexel2Df */
fetch_texel_3d_f_argb1555, /* FetchTexel3Df */
+ store_texel_argb1555 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_argb1555_rev = {
@@ -797,6 +835,7 @@ const struct gl_texture_format _mesa_texformat_argb1555_rev = {
fetch_texel_1d_f_argb1555_rev, /* FetchTexel1Df */
fetch_texel_2d_f_argb1555_rev, /* FetchTexel2Df */
fetch_texel_3d_f_argb1555_rev, /* FetchTexel3Df */
+ store_texel_argb1555_rev /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_al88 = {
@@ -819,6 +858,7 @@ const struct gl_texture_format _mesa_texformat_al88 = {
fetch_texel_1d_f_al88, /* FetchTexel1Df */
fetch_texel_2d_f_al88, /* FetchTexel2Df */
fetch_texel_3d_f_al88, /* FetchTexel3Df */
+ store_texel_al88 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_al88_rev = {
@@ -841,6 +881,7 @@ const struct gl_texture_format _mesa_texformat_al88_rev = {
fetch_texel_1d_f_al88_rev, /* FetchTexel1Df */
fetch_texel_2d_f_al88_rev, /* FetchTexel2Df */
fetch_texel_3d_f_al88_rev, /* FetchTexel3Df */
+ store_texel_al88_rev /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_rgb332 = {
@@ -863,6 +904,7 @@ const struct gl_texture_format _mesa_texformat_rgb332 = {
fetch_texel_1d_f_rgb332, /* FetchTexel1Df */
fetch_texel_2d_f_rgb332, /* FetchTexel2Df */
fetch_texel_3d_f_rgb332, /* FetchTexel3Df */
+ store_texel_rgb332 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_a8 = {
@@ -885,6 +927,7 @@ const struct gl_texture_format _mesa_texformat_a8 = {
fetch_texel_1d_f_a8, /* FetchTexel1Df */
fetch_texel_2d_f_a8, /* FetchTexel2Df */
fetch_texel_3d_f_a8, /* FetchTexel3Df */
+ store_texel_a8 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_l8 = {
@@ -907,6 +950,7 @@ const struct gl_texture_format _mesa_texformat_l8 = {
fetch_texel_1d_f_l8, /* FetchTexel1Df */
fetch_texel_2d_f_l8, /* FetchTexel2Df */
fetch_texel_3d_f_l8, /* FetchTexel3Df */
+ store_texel_l8 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_i8 = {
@@ -929,6 +973,7 @@ const struct gl_texture_format _mesa_texformat_i8 = {
fetch_texel_1d_f_i8, /* FetchTexel1Df */
fetch_texel_2d_f_i8, /* FetchTexel2Df */
fetch_texel_3d_f_i8, /* FetchTexel3Df */
+ store_texel_i8 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_ci8 = {
@@ -951,6 +996,7 @@ const struct gl_texture_format _mesa_texformat_ci8 = {
fetch_texel_1d_f_ci8, /* FetchTexel1Df */
fetch_texel_2d_f_ci8, /* FetchTexel2Df */
fetch_texel_3d_f_ci8, /* FetchTexel3Df */
+ store_texel_ci8 /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_ycbcr = {
@@ -973,6 +1019,7 @@ const struct gl_texture_format _mesa_texformat_ycbcr = {
fetch_texel_1d_f_ycbcr, /* FetchTexel1Df */
fetch_texel_2d_f_ycbcr, /* FetchTexel2Df */
fetch_texel_3d_f_ycbcr, /* FetchTexel3Df */
+ store_texel_ycbcr /* StoreTexel */
};
const struct gl_texture_format _mesa_texformat_ycbcr_rev = {
@@ -995,6 +1042,7 @@ const struct gl_texture_format _mesa_texformat_ycbcr_rev = {
fetch_texel_1d_f_ycbcr_rev, /* FetchTexel1Df */
fetch_texel_2d_f_ycbcr_rev, /* FetchTexel2Df */
fetch_texel_3d_f_ycbcr_rev, /* FetchTexel3Df */
+ store_texel_ycbcr_rev /* StoreTexel */
};
/*@}*/
@@ -1024,6 +1072,7 @@ const struct gl_texture_format _mesa_null_texformat = {
fetch_null_texelf, /* FetchTexel1Df */
fetch_null_texelf, /* FetchTexel2Df */
fetch_null_texelf, /* FetchTexel3Df */
+ store_null_texel /* StoreTexel */
};
/*@}*/