Fernando Sahmkow
527b841c15
Shader_IR: ICMP corrections and fixes
7 years ago
Fernando Sahmkow
4b81d19a1a
Shader_IR: Implement ICMP.
7 years ago
Fernando Sahmkow
7606da5611
VideoCore: Corrections to the MME Inliner and removal of hacky instance management.
7 years ago
ReinUsesLisp
0526bf1895
shader_ir/warp: Implement SHFL
7 years ago
ReinUsesLisp
36abf67e79
shader/image: Implement SUATOM and fix SUST
7 years ago
ReinUsesLisp
1f43e5296f
gl_shader_decompiler: Keep track of written images and mark them as modified
7 years ago
ReinUsesLisp
3a450c1395
kepler_compute: Implement texture queries
7 years ago
ReinUsesLisp
4de04eba39
shader_ir: Implement LD_S
Loads from shared memory.
7 years ago
ReinUsesLisp
f17415d431
shader_ir: Implement ST_S
This instruction writes to a memory buffer shared with threads within
the same work group. It is known as "shared" memory in GLSL.
7 years ago
ReinUsesLisp
77ef4fa907
shader/shift: Implement SHR wrapped and clamped variants
Nvidia defaults to wrapped shifts, but this is undefined behaviour on
OpenGL's spec. Explicitly mask/clamp according to what the guest shader
requires.
7 years ago
ReinUsesLisp
dfae2d141a
half_set_predicate: Fix predicate assignments
7 years ago
Rodrigo Locatti
4d4f9cc104
video_core: Silent miscellaneous warnings ( #2820 )
* texture_cache/surface_params: Remove unused local variable
* rasterizer_interface: Add missing documentation commentary
* maxwell_dma: Remove unused rasterizer reference
* video_core/gpu: Sort member declaration order to silent -Wreorder warning
* fermi_2d: Remove unused MemoryManager reference
* video_core: Silent unused variable warnings
* buffer_cache: Silent -Wreorder warnings
* kepler_memory: Remove unused MemoryManager reference
* gl_texture_cache: Add missing override
* buffer_cache: Add missing include
* shader/decode: Remove unused variables
7 years ago
ReinUsesLisp
e3534700d7
shader_ir/conversion: Split int and float selector and implement F2F H1
7 years ago
ReinUsesLisp
b13fbc25b8
shader_ir/conversion: Implement F2I F16 Ra.H1
7 years ago
ReinUsesLisp
6207751b00
float_set_predicate: Add missing negation bit for the second operand
7 years ago
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.
7 years ago
ReinUsesLisp
2ff8044806
shader_ir: Implement NOP
7 years ago
ReinUsesLisp
ec0da3ef64
half_set_predicate: Fix HSETP2_C constant buffer offset
7 years ago
ReinUsesLisp
77f1a676a1
decode/half_set_predicate: Fix predicates
7 years ago
ReinUsesLisp
104641db07
shader/decode: Implement S2R Tic
7 years ago
Fernando Sahmkow
11f4e739bd
Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.
This commit takes care of implementing the F16 Variants of the
conversion instructions and makes sure conversions are done.
7 years ago
Fernando Sahmkow
1158777737
Shader_Ir: Change Debug Asserts for Log Warnings
7 years ago
ReinUsesLisp
45c162444d
shader/half_set_predicate: Fix HSETP2 implementation
7 years ago
ReinUsesLisp
6c4985edc9
shader/half_set_predicate: Implement missing HSETP2 variants
8 years ago
Lioncash
c1c89411da
video_core/control_flow: Provide operator!= for types with operator==
Provides operational symmetry for the respective structures.
7 years ago
Lioncash
1780e0e3d0
video_core/control_flow: Prevent sign conversion in TryGetBlock()
The return value is a u32, not an s32, so this would result in an
implicit signedness conversion.
7 years ago
Lioncash
a162a844d2
video_core/control_flow: Remove unnecessary BlockStack copy constructor
This is the default behavior of the copy constructor, so it doesn't need
to be specified.
While we're at it we can make the other non-default constructor
explicit.
7 years ago
Lioncash
56bc11d952
video_core/control_flow: Use std::move where applicable
Results in less work being done where avoidable.
7 years ago
Lioncash
e7b39f47f8
video_core/control_flow: Use the prefix variant of operator++ for iterators
Same thing, but potentially allows a standard library implementation to
pick a more efficient codepath.
7 years ago
Lioncash
6885e7e7ec
video_core/control_flow: Use empty() member function for checking emptiness
It's what it's there for.
7 years ago
Lioncash
45fa12a05c
video_core: Resolve -Wreorder warnings
Ensures that the constructor members are always initialized in the order
that they're declared in.
7 years ago
Lioncash
47df844338
video_core/control_flow: Make program_size for ScanFlow() a std::size_t
Prevents a truncation warning from occurring with MSVC. Also the
internal data structures already treat it as a size_t, so this is just a
discrepancy in the interface.
7 years ago
Lioncash
3df9558593
video_core/control_flow: Place all internally linked types/functions within an anonymous namespace
Previously, quite a few functions were being linked with external
linkage.
7 years ago
Lioncash
1109db86b7
video_core/shader/decode: Prevent sign-conversion warnings
Makes it explicit that the conversions here are intentional.
7 years ago
Fernando Sahmkow
5a06e33859
Shader_Ir: correct clang format
7 years ago
Fernando Sahmkow
0b65e9335e
Shader_Ir: Downgrade precision and rounding asserts to debug asserts.
This commit reduces the sevirity of asserts for FP precision and
rounding as this are well known and have little to no consequences in
gpu's accuracy.
7 years ago
Lioncash
bebbdc2067
shader_ir: std::move Node instance where applicable
These are std::shared_ptr instances underneath the hood, which means
copying them isn't as cheap as a regular pointer. Particularly so on
weakly-ordered systems.
This avoids atomic reference count increments and decrements where they
aren't necessary for the core set of operations.
7 years ago
Lioncash
60926ac16b
shader_ir: Rename Get/SetTemporal to Get/SetTemporary
This is more accurate in terms of describing what the functions are
actually doing. Temporal relates to time, not the setting of a temporary
itself.
7 years ago
Lioncash
44d87ff641
shader_ir: Remove unused includes
Removes unnecessary header dependencies.
7 years ago
Fernando Sahmkow
d614193e49
Shader_Ir: Correct tracking to track from right to left
7 years ago
Lioncash
e2d7dda166
shader/decode/other: Correct branch indirect argument within BRA handling
This appears to have been a copy/paste error introduced within
8a6fc529a9
7 years ago
ReinUsesLisp
afa8096df5
shader: Allow tracking of indirect buffers without variable offset
While changing this code, simplify tracking code to allow returning
the base address node, this way callers don't have to manually rebuild
it on each invocation.
8 years ago
Fernando Sahmkow
f2549739d1
shader_ir: Add comments on missing instruction.
Also shows Nvidia's address space on comments.
7 years ago
Fernando Sahmkow
2de7649311
shader_ir: limit explorastion to best known program size.
7 years ago
Fernando Sahmkow
e7c6045a03
control_flow: Correct block breaking algorithm.
7 years ago
Fernando Sahmkow
dc4a93594c
control_flow: Assert shaders bigger than limit.
7 years ago
Fernando Sahmkow
e7a88f0ab3
control_flow: Address feedback.
7 years ago
Fernando Sahmkow
34357b110c
shader_ir: Correct parsing of scheduling instructions and correct sizing
7 years ago
Fernando Sahmkow
cfb3db1a32
shader_ir: Correct max sizing
7 years ago
Fernando Sahmkow
d45fed3030
shader_ir: Remove unnecessary constructors and use optional for ScanFlow result
7 years ago