mesa/src/util
Timur Kristóf 6cde424945 util: Add util_widen_mask function.
Widens the given bit mask by a multiplier, meaning that it will
replicate each bit by that amount.
For example: 0b101 widened by 2 will become: 0b110011

This is typically used in shader I/O to transform a 64-bit
writemask to a 32-bit writemask.

Moving this function here because it is used in multiple places.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14005>
2021-12-03 18:29:13 +00:00
..
format util/format: Add G8_B8R8_420_UNORM to match Vulkan. 2021-11-11 00:10:57 +00:00
indices move util/indices to core util 2021-11-16 14:12:03 +00:00
perf util/u_trace/perfetto: add new env variable to enable perfetto 2021-12-01 15:14:05 +00:00
sha1
tests util/dag: Add dag_add_edge_max_data 2021-11-17 13:41:47 +00:00
00-mesa-defaults.conf driconf: enable glthread for Basemark GPU 2021-11-26 10:54:49 +00:00
anon_file.c util: use anonymous file for memory fd creation 2021-10-27 15:26:52 +00:00
anon_file.h
bigmath.h
bitscan.c
bitscan.h util: Add util_widen_mask function. 2021-12-03 18:29:13 +00:00
bitset.h util/bitset: add BITSET_SET_RANGE(..) 2021-09-21 20:25:31 +00:00
blob.c
blob.h
build_id.c
build_id.h
cnd_monotonic.h c11/threads: Re-align return values for timed waits 2021-11-16 10:02:08 -06:00
compiler.h util: Add support for clang::fallthrough. 2021-11-09 20:51:14 +00:00
compress.c
compress.h
crc32.c
crc32.h
dag.c util/dag: Add dag_add_edge_max_data 2021-11-17 13:41:47 +00:00
dag.h util/dag: Add dag_add_edge_max_data 2021-11-17 13:41:47 +00:00
debug.c
debug.h
detect_os.h
disk_cache.c
disk_cache.h
disk_cache_os.c
disk_cache_os.h
double.c
double.h
driconf.h mesa: add allow_glsl_compat_shaders for shader-db 2021-11-24 10:28:15 +00:00
driconf_static.py Fix building AMD MM/GL with EL7 2021-08-27 19:05:25 +00:00
enum_operators.h
fast_idiv_by_const.c
fast_idiv_by_const.h
fast_urem_by_const.h
format_r11g11b10f.h
format_rgb9e5.h
format_srgb.h
format_srgb.py
fossilize_db.c util/fossilize_db: Don't corrupt keys during entry read. 2021-09-04 15:12:06 +02:00
fossilize_db.h
futex.h
half_float.c
half_float.h
hash_table.c util/hash_table: Clear special 0/1 entries for u64 hash table too 2021-11-02 11:02:18 -07:00
hash_table.h mesa: skip strlen when hashing strings for ProgramResourceHash 2021-10-29 07:19:20 -04:00
libsync.h util/libsync: Fix timeout handling if poll() wakes up early 2021-11-09 04:05:55 +00:00
list.h
log.c
log.h
macros.h util,gallium: put count in pipe_resource & sampler_view on its own cache line 2021-10-13 03:26:20 +00:00
memstream.c
memstream.h
mesa-sha1.c util: add SHA1 printing and comparison functions 2021-11-26 11:58:27 +00:00
mesa-sha1.h util: add SHA1 printing and comparison functions 2021-11-26 11:58:27 +00:00
meson.build move util/indices to core util 2021-11-16 14:12:03 +00:00
os_file.c
os_file.h
os_memory.h
os_memory_aligned.h
os_memory_debug.h
os_memory_fd.c util: use anonymous file for memory fd creation 2021-10-27 15:26:52 +00:00
os_memory_fd.h gallium: add utility and interface for memory fd allocations 2021-10-06 13:49:08 +00:00
os_memory_stdc.h gallium: add utility and interface for memory fd allocations 2021-10-06 13:49:08 +00:00
os_misc.c
os_misc.h
os_socket.c
os_socket.h
os_time.c
os_time.h
ralloc.c vulkan: Add vk_asprintf and vk_vasprintf helpers 2021-09-23 21:14:32 +00:00
ralloc.h
rand_xor.c
rand_xor.h
rb_tree.c
rb_tree.h util: Convert rb_tree_test to gtest 2021-10-20 21:40:31 -07:00
register_allocate.c util/ra: Fix deserialization of register sets 2021-11-10 22:57:57 +00:00
register_allocate.h
register_allocate_internal.h
rgtc.c
rgtc.h
rounding.h
rwlock.h
set.c
set.h
simple_list.h
simple_mtx.h
slab.c util/slab: use simple_mtx_t 2021-10-05 23:46:14 +00:00
slab.h util/slab: use simple_mtx_t 2021-10-05 23:46:14 +00:00
softfloat.c
softfloat.h
sparse_array.c
sparse_array.h
string_buffer.c
string_buffer.h
strndup.h
strtod.c
strtod.h
texcompress_rgtc_tmp.h
timespec.h
u_atomic.c
u_atomic.h
u_cpu_detect.c util/cpu_detect, gallium: use cpu_family CPU_S390X instead of separate flag 2021-11-25 12:57:20 +00:00
u_cpu_detect.h util/cpu_detect, gallium: use cpu_family CPU_S390X instead of separate flag 2021-11-25 12:57:20 +00:00
u_debug.c
u_debug.h
u_debug_describe.c util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium 2021-10-01 14:51:23 +00:00
u_debug_describe.h util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium 2021-10-01 14:51:23 +00:00
u_debug_memory.c
u_debug_refcnt.c util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium 2021-10-01 14:51:23 +00:00
u_debug_refcnt.h util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium 2021-10-01 14:51:23 +00:00
u_debug_stack.c
u_debug_stack.h
u_debug_stack_android.cpp
u_debug_symbol.c util/u_debug_symbol: remove debug_symbol_name_glibc and execinfo dependency 2021-08-26 01:47:30 +00:00
u_debug_symbol.h
u_drm.h
u_dynarray.h
u_endian.h
u_fifo.h util/u_trace: make u_trace usable for other than gallium drivers 2021-09-10 14:58:28 +03:00
u_hash_table.c util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium 2021-10-01 14:51:23 +00:00
u_hash_table.h util: import u_debug_refcnt, u_hash_table, u_debug_describe from gallium 2021-10-01 14:51:23 +00:00
u_idalloc.c
u_idalloc.h
u_math.c
u_math.h
u_memory.h util,gallium: put count in pipe_resource & sampler_view on its own cache line 2021-10-13 03:26:20 +00:00
u_memset.h
u_mm.c
u_mm.h
u_perfetto.cc
u_perfetto.h
u_printf.cpp vulkan: Add vk_asprintf and vk_vasprintf helpers 2021-09-23 21:14:32 +00:00
u_printf.h vulkan: Add vk_asprintf and vk_vasprintf helpers 2021-09-23 21:14:32 +00:00
u_process.c util: make util_get_process_exec_path work on FreeBSD w/o procfs 2021-10-29 06:06:05 +00:00
u_process.h
u_qsort.cpp
u_qsort.h
u_queue.c util/queue: fix a data race detected by TSAN when finishing the queue 2021-11-19 09:02:23 +01:00
u_queue.h util/queue: use simple_mtx_t for finish_lock 2021-10-05 23:46:14 +00:00
u_string.h
u_thread.h Use initial-exec TLS for glibc only, enable TLS elsewhere 2021-11-20 11:56:34 -05:00
u_vector.c util/vector: make util_vector_init harder to misuse 2021-10-08 00:15:11 +00:00
u_vector.h util/vector: make util_vector_init harder to misuse 2021-10-08 00:15:11 +00:00
vl_rbsp.h util/vl: move gallium vl_vlc.h and vl_rbsp.h to shared code. 2021-11-15 21:57:28 +00:00
vl_vlc.h util/vl: move gallium vl_vlc.h and vl_rbsp.h to shared code. 2021-11-15 21:57:28 +00:00
vma.c
vma.h
xmlconfig.c util/xmlconfig: Allow DT_UNKNOWN files 2021-11-09 23:25:32 +00:00
xmlconfig.h
xxd.py
xxhash.h