[Mesa-dev] [PATCH 5/5] meta: Add an assertion check for datatype of integer formats

Anuj Phogat anuj.phogat at gmail.com
Wed Jul 30 19:11:27 PDT 2014


Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
 src/mesa/drivers/common/meta.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index fdac546..78bfd57 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2877,6 +2877,7 @@ _mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
 
    type = get_temp_image_type(ctx, texImage->TexFormat);
    if (_mesa_is_format_integer_color(texImage->TexFormat)) {
+      assert(type == GL_INT || type == GL_UNSIGNED_INT);
       format = _mesa_base_format_to_integer_format(format);
    }
    bpp = _mesa_bytes_per_pixel(format, type);
-- 
1.9.3



More information about the mesa-dev mailing list