citra/src/common
ReinUsesLisp 4e35177e23 shader_ir: Implement VOTE
Implement VOTE using Nvidia's intrinsics. Documentation about these can
be found here
https://developer.nvidia.com/reading-between-threads-shader-intrinsics

Instead of using portable ARB instructions I opted to use Nvidia
intrinsics because these are the closest we have to how Tegra X1
hardware renders.

To stub VOTE on non-Nvidia drivers (including nouveau) this commit
simulates a GPU with a warp size of one, returning what is meaningful
for the instruction being emulated:

* anyThreadNV(value) -> value
* allThreadsNV(value) -> value
* allThreadsEqualNV(value) -> true

ballotARB, also known as "uint64_t(activeThreadsNV())", emits

VOTE.ANY Rd, PT, PT;

on nouveau's compiler. This doesn't match exactly to Nvidia's code

VOTE.ALL Rd, PT, PT;

Which is emulated with activeThreadsNV() by this commit. In theory this
shouldn't really matter since .ANY, .ALL and .EQ affect the predicates
(set to PT on those cases) and not the registers.
2019-08-21 14:50:38 -03:00
..
logging
x64
alignment.h
assert.h
binary_find.h
bit_field.h
bit_util.h
cityhash.cpp
cityhash.h
CMakeLists.txt shader_ir: Implement VOTE 2019-08-21 14:50:38 -03:00
color.h
common_funcs.h
common_paths.h
common_types.h
detached_tasks.cpp
detached_tasks.h
file_util.cpp
file_util.h
hash.h
hex_util.cpp
hex_util.h
lz4_compression.cpp
lz4_compression.h
math_util.h
memory_hook.cpp
memory_hook.h
microprofile.cpp
microprofile.h
microprofileui.h
misc.cpp
multi_level_queue.h
page_table.cpp
page_table.h
param_package.cpp
param_package.h
quaternion.h
ring_buffer.h
scm_rev.cpp.in
scm_rev.h
scope_exit.h
string_util.cpp
string_util.h
swap.h
telemetry.cpp
telemetry.h
thread_queue_list.h
thread.cpp
thread.h
threadsafe_queue.h
timer.cpp
timer.h
uint128.cpp
uint128.h
uuid.cpp
uuid.h
vector_math.h
web_result.h
zstd_compression.cpp
zstd_compression.h