summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pack.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2012-06-20 14:47:46 -0700
committerJordan Justen <[email protected]>2012-07-21 16:49:42 -0700
commit8c265cf5ef47ac8ae8565456d8ac023d6c847d57 (patch)
tree384b930a71b0d79cdf4cb7c33c656abc38c0db96 /src/mesa/main/pack.c
parent9ad8f431b2a47060bf05517246ab0fa8d249c800 (diff)
mesa pack: use _mesa_problem instead of assert
If the pack type is not supported, use _mesa_problem rather than asserting. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/pack.c')
-rw-r--r--src/mesa/main/pack.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index a674f683112..83192c1574c 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -514,26 +514,29 @@ _mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4],
{
switch(dstType) {
case GL_UNSIGNED_INT:
- pack_uint_from_uint_rgba(dstAddr, dstFormat, rgba, n);
+ pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n);
break;
case GL_INT:
/* No conversion necessary. */
- pack_uint_from_uint_rgba(dstAddr, dstFormat, rgba, n);
+ pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n);
break;
case GL_UNSIGNED_SHORT:
- pack_ushort_from_uint_rgba(dstAddr, dstFormat, rgba, n);
+ pack_ushort_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n);
break;
case GL_SHORT:
- pack_short_from_uint_rgba(dstAddr, dstFormat, rgba, n);
+ pack_short_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n);
break;
case GL_UNSIGNED_BYTE:
- pack_ubyte_from_uint_rgba(dstAddr, dstFormat, rgba, n);
+ pack_ubyte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n);
break;
case GL_BYTE:
- pack_byte_from_uint_rgba(dstAddr, dstFormat, rgba, n);
+ pack_byte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n);
break;
default:
- assert(0);
+ _mesa_problem(ctx,
+ "Unsupported type (%s) for format (%s)",
+ _mesa_lookup_enum_by_nr(dstType),
+ _mesa_lookup_enum_by_nr(dstFormat));
return;
}
}