diff options
author | Dylan Baker <[email protected]> | 2019-12-06 09:20:09 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2020-04-21 11:09:03 -0700 |
commit | f8e4542bad7dd9bb97b2990947ef74dbb2ee75e4 (patch) | |
tree | b112e07e3d9b13c32f3a4c1f55ddf9b448e554a7 /src/mesa | |
parent | e190e8cef2eaeabc16dda0cbd56addcd81968834 (diff) |
replace _mesa_logbase2 with util_logbase2
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_clip.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 2 | ||||
-rw-r--r-- | src/mesa/main/teximage.c | 12 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index 49c41d8c2e4..082724c82d1 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -112,7 +112,7 @@ brw_upload_clip_prog(struct brw_context *brw) key.pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION); /* _NEW_TRANSFORM (also part of VUE map)*/ if (ctx->Transform.ClipPlanesEnabled) - key.nr_userclip = _mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1; + key.nr_userclip = util_logbase2(ctx->Transform.ClipPlanesEnabled) + 1; if (devinfo->gen == 5) key.clip_mode = BRW_CLIP_MODE_KERNEL_CLIP; diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 6ce7a1ce889..b2e8c2225bd 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -265,7 +265,7 @@ brw_vs_populate_key(struct brw_context *brw, (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) && vp->program.info.clip_distance_array_size == 0) { key->nr_userclip_plane_consts = - _mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1; + util_logbase2(ctx->Transform.ClipPlanesEnabled) + 1; } if (devinfo->gen < 6) { diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index a2c43aa7b5b..3bf7a0dbec3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -681,7 +681,7 @@ static radeon_mipmap_tree *radeon_miptree_create_for_teximage(radeonContextPtr r texImage->Level == firstLevel) { lastLevel = firstLevel; } else { - lastLevel = firstLevel + _mesa_logbase2(MAX2(MAX2(width, height), depth)); + lastLevel = firstLevel + util_logbase2(MAX2(MAX2(width, height), depth)); } } diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 47220c917cf..986ee614915 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -718,7 +718,7 @@ _mesa_get_tex_max_num_levels(GLenum target, GLsizei width, GLsizei height, return 1; } - return _mesa_logbase2(size) + 1; + return util_logbase2(size) + 1; } @@ -844,7 +844,7 @@ _mesa_init_teximage_fields_ms(struct gl_context *ctx, img->Depth = depth; img->Width2 = width - 2 * border; /* == 1 << img->WidthLog2; */ - img->WidthLog2 = _mesa_logbase2(img->Width2); + img->WidthLog2 = util_logbase2(img->Width2); switch(target) { case GL_TEXTURE_1D: @@ -887,7 +887,7 @@ _mesa_init_teximage_fields_ms(struct gl_context *ctx, case GL_TEXTURE_2D_MULTISAMPLE: case GL_PROXY_TEXTURE_2D_MULTISAMPLE: img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ - img->HeightLog2 = _mesa_logbase2(img->Height2); + img->HeightLog2 = util_logbase2(img->Height2); if (depth == 0) img->Depth2 = 0; else @@ -901,16 +901,16 @@ _mesa_init_teximage_fields_ms(struct gl_context *ctx, case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY: img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ - img->HeightLog2 = _mesa_logbase2(img->Height2); + img->HeightLog2 = util_logbase2(img->Height2); img->Depth2 = depth; /* no border */ img->DepthLog2 = 0; /* not used */ break; case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ - img->HeightLog2 = _mesa_logbase2(img->Height2); + img->HeightLog2 = util_logbase2(img->Height2); img->Depth2 = depth - 2 * border; /* == 1 << img->DepthLog2; */ - img->DepthLog2 = _mesa_logbase2(img->Depth2); + img->DepthLog2 = util_logbase2(img->Depth2); break; default: _mesa_problem(NULL, "invalid target 0x%x in _mesa_init_teximage_fields()", diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 5742fb591ca..c688680a268 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -3065,7 +3065,7 @@ st_TestProxyTexImage(struct gl_context *ctx, GLenum target, } else { /* assume a full set of mipmaps */ - pt.last_level = _mesa_logbase2(MAX3(width, height, depth)); + pt.last_level = util_logbase2(MAX3(width, height, depth)); } return pipe->screen->can_create_resource(pipe->screen, &pt); |