diff options
author | Ian Romanick <[email protected]> | 2015-09-14 11:50:28 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-09-23 21:09:41 +0100 |
commit | 8be6b32d6558109fce4b63c90b434dd834819907 (patch) | |
tree | 07202be67728301a6a2ceb7a80ebe4e187bc5ae3 /src/mesa | |
parent | 0e0d008b2b836441cd848365afecbcc32c86c235 (diff) |
t_dd_dmatmp: Use '& 3' instead of '% 4' everywhere
No piglit regressions on i915 (G33) or radeon (Radeon 7500).
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Cc: "10.6 11.0" <[email protected]>
(cherry picked from commit 0d475ee2b989ac1697720ca391913e9158156bdc)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/tnl_dd/t_dd_dmatmp.h | 4 |
1 files 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 b6f6e84e540..a7cabc24977 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; |