util: Move _mesa_fsl/util_last_bit into util/bitscan.h

As requested with the initial creation of util/bitscan.h
now move other bitscan related functions into util.

v2: Split into two patches.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Mathias Fröhlich
2016-08-02 08:46:04 +02:00
committed by Mathias Fröhlich
parent e4cb3af524
commit 027cbf00f2
12 changed files with 85 additions and 126 deletions

View File

@@ -146,7 +146,7 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
shader->info.name = ralloc_asprintf(shader, "GLSL%d", shader_prog->Name);
if (shader_prog->Label)
shader->info.label = ralloc_strdup(shader, shader_prog->Label);
shader->info.num_textures = _mesa_fls(sh->Program->SamplersUsed);
shader->info.num_textures = util_last_bit(sh->Program->SamplersUsed);
shader->info.num_ubos = sh->NumUniformBlocks;
shader->info.num_abos = shader_prog->NumAtomicBuffers;
shader->info.num_ssbos = sh->NumShaderStorageBlocks;