diff options
author | marha <marha@users.sourceforge.net> | 2014-10-12 21:11:32 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-10-12 21:38:35 +0200 |
commit | 1a83b8e49a75e2dab63805de25e384e0e38c27ed (patch) | |
tree | 5280fe2a1bd2ce227e4bce9ce06134986e181de1 /mesalib/src/gallium/auxiliary/util | |
parent | 4aea4b223604c589828beb1145875a5fbcc41eed (diff) | |
parent | 9480392b8817f8bfa79cbc694ff039a73fc0a57f (diff) | |
download | vcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.tar.gz vcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.tar.bz2 vcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/glsl_symbol_table.h
mesalib/src/mesa/drivers/common/meta_blit.c
xorg-server/dix/dispatch.c
xorg-server/glx/indirect_dispatch.c
xorg-server/glx/indirect_dispatch_swap.c
xorg-server/mi/miexpose.c
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_math.h | 12 | ||||
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_pstipple.c | 8 |
2 files changed, 14 insertions, 6 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h index 39bd40fa1..f95c11166 100644 --- a/mesalib/src/gallium/auxiliary/util/u_math.h +++ b/mesalib/src/gallium/auxiliary/util/u_math.h @@ -727,6 +727,18 @@ util_bitcount(unsigned n) #endif } + +static INLINE unsigned +util_bitcount64(uint64_t n) +{ +#ifdef HAVE___BUILTIN_POPCOUNTLL + return __builtin_popcountll(n); +#else + return util_bitcount(n) + util_bitcount(n >> 32); +#endif +} + + /** * Reverse bits in n * Algorithm taken from: diff --git a/mesalib/src/gallium/auxiliary/util/u_pstipple.c b/mesalib/src/gallium/auxiliary/util/u_pstipple.c index 4f2e70234..509f815c5 100644 --- a/mesalib/src/gallium/auxiliary/util/u_pstipple.c +++ b/mesalib/src/gallium/auxiliary/util/u_pstipple.c @@ -407,7 +407,6 @@ util_pstipple_create_fragment_shader(struct pipe_context *pipe, struct pipe_shader_state *new_fs; struct pstip_transform_context transform; const uint newLen = tgsi_num_tokens(fs->tokens) + NUM_NEW_TOKENS; - unsigned i; new_fs = MALLOC(sizeof(*new_fs)); if (!new_fs) @@ -433,11 +432,8 @@ util_pstipple_create_fragment_shader(struct pipe_context *pipe, tgsi_scan_shader(fs->tokens, &transform.info); - /* find fragment coordinate origin property */ - for (i = 0; i < transform.info.num_properties; i++) { - if (transform.info.properties[i].name == TGSI_PROPERTY_FS_COORD_ORIGIN) - transform.coordOrigin = transform.info.properties[i].data[0]; - } + transform.coordOrigin = + transform.info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN]; tgsi_transform_shader(fs->tokens, (struct tgsi_token *) new_fs->tokens, |