summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2016-08-02 08:46:04 +0200
committerMathias Fröhlich <[email protected]>2016-08-09 21:20:46 +0200
commit027cbf00f248bda325521db8f56a3718898da46b (patch)
tree5e5cce2c268223053e4504f921c5143277f51b3c /src/mesa/program
parente4cb3af524cb02ec7cd23a64da033cfb7193a3cb (diff)
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 <[email protected]> Tested-by: Brian Paul <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/prog_to_nir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 9e01151a1c4..1efd1a1a381 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -887,7 +887,7 @@ setup_registers_and_variables(struct ptn_compile *c)
struct nir_shader *shader = b->shader;
/* Create input variables. */
- const int num_inputs = _mesa_flsll(c->prog->InputsRead);
+ const int num_inputs = util_last_bit64(c->prog->InputsRead);
for (int i = 0; i < num_inputs; i++) {
if (!(c->prog->InputsRead & BITFIELD64_BIT(i)))
continue;
@@ -948,7 +948,7 @@ setup_registers_and_variables(struct ptn_compile *c)
}
/* Create output registers and variables. */
- int max_outputs = _mesa_fls(c->prog->OutputsWritten);
+ int max_outputs = util_last_bit(c->prog->OutputsWritten);
c->output_regs = rzalloc_array(c, nir_register *, max_outputs);
for (int i = 0; i < max_outputs; i++) {
@@ -1043,7 +1043,7 @@ prog_to_nir(const struct gl_program *prog,
ptn_add_output_stores(c);
s->info.name = ralloc_asprintf(s, "ARB%d", prog->Id);
- s->info.num_textures = _mesa_fls(prog->SamplersUsed);
+ s->info.num_textures = util_last_bit(prog->SamplersUsed);
s->info.num_ubos = 0;
s->info.num_abos = 0;
s->info.num_ssbos = 0;