summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pack.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-11-10 09:55:18 +0100
committerIago Toral Quiroga <[email protected]>2015-01-12 11:20:29 +0100
commit3ba92bac7630eaf894da74d6c17c35ecf8b61e1a (patch)
tree90c6a61dead1ed4e20ed99af1b71d9c74535bd96 /src/mesa/main/pack.c
parent2280fdeb610405d9236aa99dc6452aa47d592e94 (diff)
mesa: Remove (signed) integer pack and span functions.
These are no longer used now that we moved to _mesa_format_convert. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main/pack.c')
-rw-r--r--src/mesa/main/pack.c225
1 files changed, 0 insertions, 225 deletions
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index cd1d90ba83b..7363e416488 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -358,231 +358,6 @@ get_type_min_max(GLenum type, GLfloat *min, GLfloat *max)
}
}
-/* Customization of unsigned integer packing.
- */
-#define SRC_TYPE GLuint
-
-#define DST_TYPE GLuint
-#define SRC_CONVERT(x) (x)
-#define FN_NAME pack_uint_from_uint_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLint
-#define SRC_CONVERT(x) MIN2(x, 0x7fffffff)
-#define FN_NAME pack_int_from_uint_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLushort
-#define SRC_CONVERT(x) MIN2(x, 0xffff)
-#define FN_NAME pack_ushort_from_uint_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLshort
-#define SRC_CONVERT(x) CLAMP((int)x, -32768, 32767)
-#define FN_NAME pack_short_from_uint_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLubyte
-#define SRC_CONVERT(x) MIN2(x, 0xff)
-#define FN_NAME pack_ubyte_from_uint_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLbyte
-#define SRC_CONVERT(x) CLAMP((int)x, -128, 127)
-#define FN_NAME pack_byte_from_uint_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#undef SRC_TYPE
-
-static void
-_pack_rgba_span_from_uints_problem(struct gl_context *ctx,
- GLenum dstFormat, GLenum dstType)
-{
- _mesa_problem(ctx,
- "Unsupported type (%s) / format (%s) "
- "in _mesa_pack_rgba_span_from_uints",
- _mesa_lookup_enum_by_nr(dstType),
- _mesa_lookup_enum_by_nr(dstFormat));
-}
-
-void
-_mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][4],
- GLenum dstFormat, GLenum dstType,
- GLvoid *dstAddr)
-{
- uint32_t dstMesaFormat;
-
- switch(dstType) {
- case GL_UNSIGNED_INT:
- pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_INT:
- pack_int_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_UNSIGNED_SHORT:
- pack_ushort_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_SHORT:
- pack_short_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_UNSIGNED_BYTE:
- pack_ubyte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_BYTE:
- pack_byte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- dstMesaFormat = _mesa_format_from_format_and_type(dstFormat, dstType);
- if (!(dstMesaFormat & MESA_ARRAY_FORMAT_BIT)) {
- _mesa_pack_uint_rgba_row(dstMesaFormat, n, (void *)rgba[0], (void *)dstAddr);
- break;
- } else {
- /* Fall through */
- }
- default:
- _pack_rgba_span_from_uints_problem(ctx, dstFormat, dstType);
- return;
- }
-}
-
-/* Customization of signed integer packing.
- */
-#define SRC_TYPE GLint
-
-#define DST_TYPE GLuint
-#define SRC_CONVERT(x) MAX2(x, 0)
-#define FN_NAME pack_uint_from_int_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLushort
-#define SRC_CONVERT(x) MAX2(x, 0)
-#define FN_NAME pack_ushort_from_int_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLshort
-#define SRC_CONVERT(x) CLAMP(x, -0x8000, 0x7fff)
-#define FN_NAME pack_short_from_int_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLubyte
-#define SRC_CONVERT(x) MAX2(x, 0)
-#define FN_NAME pack_ubyte_from_int_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#define DST_TYPE GLbyte
-#define SRC_CONVERT(x) CLAMP(x, -0x80, 0x7f)
-#define FN_NAME pack_byte_from_int_rgba
-#include "pack_tmp.h"
-#undef DST_TYPE
-#undef SRC_CONVERT
-#undef FN_NAME
-
-#undef SRC_TYPE
-
-static void
-_pack_rgba_span_from_ints_problem(struct gl_context *ctx,
- GLenum dstFormat, GLenum dstType)
-{
- _mesa_problem(ctx,
- "Unsupported type (%s) / format (%s) "
- "in _mesa_pack_rgba_span_from_ints",
- _mesa_lookup_enum_by_nr(dstType),
- _mesa_lookup_enum_by_nr(dstFormat));
-}
-
-void
-_mesa_pack_rgba_span_from_ints(struct gl_context *ctx, GLuint n, GLint rgba[][4],
- GLenum dstFormat, GLenum dstType,
- GLvoid *dstAddr)
-{
- uint32_t dstMesaFormat;
-
- switch(dstType) {
- case GL_UNSIGNED_INT:
- pack_uint_from_int_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_INT:
- /* No conversion necessary. */
- pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, (GLuint (*)[4]) rgba, NULL, n);
- break;
- case GL_UNSIGNED_SHORT:
- pack_ushort_from_int_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_SHORT:
- pack_short_from_int_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_UNSIGNED_BYTE:
- pack_ubyte_from_int_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_BYTE:
- pack_byte_from_int_rgba(ctx, dstAddr, dstFormat, rgba, NULL, n);
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- dstMesaFormat = _mesa_format_from_format_and_type(dstFormat, dstType);
- if (!(dstMesaFormat & MESA_ARRAY_FORMAT_BIT)) {
- _mesa_pack_int_rgba_row(dstMesaFormat, n, (void *)rgba[0], (void *)dstAddr);
- break;
- } else {
- /* Fall through */
- }
- default:
- _pack_rgba_span_from_ints_problem(ctx, dstFormat, dstType);
- return;
- }
-}
-
/* Customization of float packing.
*/
#define SRC_TYPE GLfloat