aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program/program_parse.y
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2018-08-21 09:46:46 -0700
committerDylan Baker <[email protected]>2018-09-07 10:21:26 -0700
commit8396043f304bb2a752130230055605c5c966e89f (patch)
treeee2e8a5494b88bff3b5e67ece8ffdba70d12c087 /src/mesa/program/program_parse.y
parent80825abb5d1a7491035880253ffd531c55acae6b (diff)
Replace uses of _mesa_bitcount with util_bitcount
and _mesa_bitcount_64 with util_bitcount_64. This fixes a build problem in nir for platforms that don't have popcount or popcountll, such as 32bit msvc. v2: - Fix additional uses of _mesa_bitcount added after this was originally written Acked-by: Eric Engestrom <[email protected]> (v1) Acked-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/program/program_parse.y')
-rw-r--r--src/mesa/program/program_parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index 415ff2a28ec..7398f5f507a 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -39,6 +39,8 @@
#include "program/symbol_table.h"
#include "program/program_parser.h"
+#include "util/u_math.h"
+
extern void *yy_scan_string(char *);
extern void yy_delete_buffer(void *);
@@ -2607,7 +2609,7 @@ _mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *st
state->prog->arb.NumParameters = state->prog->Parameters->NumParameters;
state->prog->arb.NumAttributes =
- _mesa_bitcount_64(state->prog->info.inputs_read);
+ util_bitcount64(state->prog->info.inputs_read);
/*
* Initialize native counts to logical counts. The device driver may