Commit graph

22 commits

Author SHA1 Message Date
Nguyen Dac Nam
0d9361d21f shader_conversion: add conversion I2F for Short 2020-02-19 10:54:37 +07:00
ReinUsesLisp
034809d729 shader/conversion: Implement byte selector in I2F
I2F's byte selector is used to choose what bytes to convert to float.
e.g. if the input is 0xaabbccdd and the selector is ".B3" it will
convert 0xaa. The default (when it's not shown in nvdisasm) is ".B0", in
that example the default would convert 0xdd to float.
2019-12-18 00:41:22 -03:00
ReinUsesLisp
6f134adf2a shader_ir/conversion: Split int and float selector and implement F2F H1 2019-08-28 16:09:33 -03:00
ReinUsesLisp
d9ad389777 shader_ir/conversion: Implement F2I F16 Ra.H1 2019-08-27 23:40:40 -03:00
Fernando Sahmkow
9a0fa90be2 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.
2019-07-20 17:38:25 -04:00
ReinUsesLisp
fd392543e8 shader: Use shared_ptr to store nodes and move initialization to file
Instead of having a vector of unique_ptr stored in a vector and
returning star pointers to this, use shared_ptr. While changing
initialization code, move it to a separate file when possible.

This is a first step to allow code analysis and node generation beyond
the ShaderIR class.
2019-06-05 20:41:52 -03:00
bunnei
673cfd89c1 Merge pull request #2322 from ReinUsesLisp/wswitch
video_core: Silent -Wswitch warnings
2019-04-28 22:24:58 -04:00
ReinUsesLisp
7a56d07632 video_core: Silent -Wswitch warnings 2019-04-18 15:54:39 -03:00
Fernando Sahmkow
73f925a949 Do some corrections in conversion shader instructions.
Corrects encodings for I2F, F2F, I2I and F2I
Implements Immediate variants of all four conversion types.
Add assertions to unimplemented stuffs.
2019-04-15 19:16:27 -04:00
Fernando Sahmkow
0f8f14a732 Corrected F2I None mode to RoundEven. 2019-02-11 18:46:45 -04:00
ReinUsesLisp
92c948999b shader_ir: Rename BasicBlock to NodeBlock
It's not always used as a basic block. Rename it for consistency.
2019-02-03 17:21:20 -03:00
ReinUsesLisp
e3c0f29a4d shader_ir: Pass decoded nodes as a whole instead of per basic blocks
Some games call LDG at the top of a basic block, making the tracking
heuristic to fail. This commit lets the heuristic the decoded nodes as a
whole instead of per basic blocks.

This may lead to some false positives but allows it the heuristic to
track cases it previously couldn't.
2019-02-03 17:21:20 -03:00
ReinUsesLisp
12fbe5dcf8 shader_ir: Unify constant buffer offset values
Constant buffer values on the shader IR were using different offsets if
the access direct or indirect. cbuf34 has a non-multiplied offset while
cbuf36 does. On shader decoding this commit multiplies it by four on
cbuf34 queries.
2019-01-30 02:45:50 -03:00
ReinUsesLisp
1be12d5819 shader_ir: Pass to decoder functions basic block's code 2019-01-15 17:54:53 -03:00
ReinUsesLisp
719c83a4c2 shader_decode: Improve zero flag implementation 2019-01-15 17:54:53 -03:00
ReinUsesLisp
dc93729f47 video_core: Return safe values after an assert hits 2019-01-15 17:54:52 -03:00
ReinUsesLisp
68ae98c2ee shader_decode: Implement F2F_C 2019-01-15 17:54:52 -03:00
ReinUsesLisp
039f4d79e5 shader_decode: Implement I2I 2019-01-15 17:54:52 -03:00
ReinUsesLisp
22618d59df shader_decode: Implement F2I 2019-01-15 17:54:51 -03:00
ReinUsesLisp
d373f13b8a shader_decode: Implement I2F 2019-01-15 17:54:51 -03:00
ReinUsesLisp
e456e2c1f3 shader_decode: Implement F2F 2019-01-15 17:54:50 -03:00
ReinUsesLisp
25f868d8be shader_ir: Initial implementation 2019-01-15 17:54:49 -03:00