[Mesa-dev] [PATCH 03/24] t_dd_dmatmp.h: Use '& 3' instead of '% 4' everywhere
Ian Romanick
idr at freedesktop.org
Mon Sep 14 18:01:09 PDT 2015
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>
---
src/mesa/tnl_dd/t_dd_dmatmp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index ce16e62..2fab69c 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -553,7 +553,7 @@ static void TAG(render_quads_verts)( struct gl_context *ctx,
/* Emit whole number of quads in total. dmasz is already a multiple
* of 4.
*/
- count -= count % 4;
+ count -= count & 3;
currentsz = (GET_CURRENT_VB_MAX_VERTS()/4) * 4;
if (currentsz < 8)
@@ -1082,7 +1082,7 @@ static void TAG(render_quads_elts)( struct gl_context *ctx,
currentsz = GET_CURRENT_VB_MAX_ELTS()/4*4;
- count -= count % 4;
+ count -= count & 3;
if (currentsz < 8)
currentsz = dmasz;
--
2.1.0
More information about the mesa-dev
mailing list