From: Ilia Mirkin Date: Thu, 6 Mar 2014 03:34:27 +0000 (-0500) Subject: mesa/st: only compare the one scissor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3649800009bffc7787f08c32cfee355b8e874b20;p=mesa.git 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 --- 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;