1
0
Fork 0
forked from suyu/suyu
suyu/src/video_core/shader/decode
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
..
arithmetic.cpp Shader_Ir: Change Debug Asserts for Log Warnings 2019-07-19 22:15:34 -04:00
arithmetic_half.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
arithmetic_half_immediate.cpp Shader_Ir: Change Debug Asserts for Log Warnings 2019-07-19 22:15:34 -04:00
arithmetic_immediate.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
arithmetic_integer.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
arithmetic_integer_immediate.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
bfe.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
bfi.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
conversion.cpp Shader_Ir: Implement F16 Variants of F2F, F2I, I2F. 2019-07-20 17:38:25 -04:00
ffma.cpp Shader_Ir: Change Debug Asserts for Log Warnings 2019-07-19 22:15:34 -04:00
float_set.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
float_set_predicate.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
half_set.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
half_set_predicate.cpp Merge pull request #2777 from ReinUsesLisp/hsetp2-fe3h-fix 2019-08-21 10:29:17 -04:00
hfma2.cpp Shader_Ir: Downgrade precision and rounding asserts to debug asserts. 2019-07-18 08:17:19 -04:00
image.cpp shader: Allow tracking of indirect buffers without variable offset 2019-07-14 22:36:44 -03:00
integer_set.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
integer_set_predicate.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
memory.cpp shader_ir: Rename Get/SetTemporal to Get/SetTemporary 2019-07-16 19:47:43 -04:00
other.cpp shader_ir: Implement NOP 2019-08-04 03:02:55 -03:00
predicate_set_predicate.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
predicate_set_register.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
register_set_predicate.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
shift.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
texture.cpp shader_ir: Rename Get/SetTemporal to Get/SetTemporary 2019-07-16 19:47:43 -04:00
video.cpp shader: Use shared_ptr to store nodes and move initialization to file 2019-06-05 20:41:52 -03:00
warp.cpp shader_ir: Implement VOTE 2019-08-21 14:50:38 -03:00
xmad.cpp shader_ir: Rename Get/SetTemporal to Get/SetTemporary 2019-07-16 19:47:43 -04:00