diff options
author | Brian Paul <[email protected]> | 2012-01-12 07:30:48 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-12 07:30:58 -0700 |
commit | 9a548c27aa704236cc1d8a5d4ebf68cea9c5c99c (patch) | |
tree | cdb18d78dd7dc3724d183361618212f274acb675 /src/mesa/drivers/dri/intel | |
parent | 87118d84ff11c040f677c7506afb813def1b9ff9 (diff) |
mesa: remove _mesa_ffs(), implement ffs() for non-GNU platforms
Call ffs() and ffsll() everywhere. Define our own ffs(), ffsll()
functions when the platform doesn't have them.
v2: remove #ifdef _WIN32, __IBMC__, __IBMCPP_ tests inside ffs()
implementation. The #else clause was recursive.
Reviewed-by: Kenneth Graunke <[email protected]>
Tested-by: Alexander von Gluck <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_blit.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_clear.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index 1369e63ba55..e484fd34bfd 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -261,7 +261,7 @@ intelClearWithBlit(struct gl_context *ctx, GLbitfield mask) /* Loop over all renderbuffers */ mask &= (1 << BUFFER_COUNT) - 1; while (mask) { - GLuint buf = _mesa_ffs(mask) - 1; + GLuint buf = ffs(mask) - 1; bool is_depth_stencil = buf == BUFFER_DEPTH || buf == BUFFER_STENCIL; struct intel_renderbuffer *irb; int x1, y1, x2, y2; diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c index e60fa662566..dee4956d9d4 100644 --- a/src/mesa/drivers/dri/intel/intel_clear.c +++ b/src/mesa/drivers/dri/intel/intel_clear.c @@ -171,7 +171,7 @@ intelClear(struct gl_context *ctx, GLbitfield mask) * buffer with it. */ if (mask & (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL)) { - int color_bit = _mesa_ffs(mask & BUFFER_BITS_COLOR); + int color_bit = ffs(mask & BUFFER_BITS_COLOR); if (color_bit != 0) { tri_mask |= blit_mask & (1 << (color_bit - 1)); blit_mask &= ~(1 << (color_bit - 1)); |