From 3649800009bffc7787f08c32cfee355b8e874b20 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Wed, 5 Mar 2014 22:34:27 -0500 Subject: [PATCH] mesa/st: only compare the one scissor sizeof(scissor) returns the size of the full array rather than a single element. Fix it to consider just the one element. Fixes: 0705fa35 ("st/mesa: add support for GL_ARB_viewport_array (v0.2)") Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie --- src/mesa/state_tracker/st_atom_scissor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_scissor.c b/src/mesa/state_tracker/st_atom_scissor.c index a19ade1fafe..b7203094406 100644 --- a/src/mesa/state_tracker/st_atom_scissor.c +++ b/src/mesa/state_tracker/st_atom_scissor.c @@ -85,7 +85,7 @@ update_scissor( struct st_context *st ) scissor[i].maxy = maxy; } - if (memcmp(&scissor[i], &st->state.scissor[i], sizeof(scissor)) != 0) { + if (memcmp(&scissor[i], &st->state.scissor[i], sizeof(scissor[0])) != 0) { /* state has changed */ st->state.scissor[i] = scissor[i]; /* struct copy */ changed = true; -- 2.30.2