summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/decode/conversion.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-12-07video_core: Remove unnecessary enum class casting in logging messagesLioncash1-2/+2
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more. Reduces the line noise a bit.
2020-04-07shader/conversion: Implement I2I sign extension, saturation and selectionReinUsesLisp1-13/+100
Reimplements I2I adding sign extension, saturation (clamp source value to the destination), selection and destination sizes that are not 32 bits wide. It doesn't implement CC yet.
2020-03-26shader/conversion: Fix F2F rounding operations with different sizesReinUsesLisp1-5/+10
Rounding operations only matter when the conversion size of source and destination is the same, i.e. .F16.F16, .F32.F32 and .F64.F64. When there is a mismatch (.F16.F32), these bits are used for IEEE rounding, we don't emulate this because GLSL and SPIR-V don't support configuring it per operation.
2020-02-19shader_conversion: I2F : add Assert for case src_size is ShortNguyen Dac Nam1-0/+3
2020-02-19fix warningNguyen Dac Nam1-1/+1
2020-02-19clang-format fixNguyen Dac Nam1-1/+1
2020-02-19shader_conversion: add conversion I2F for ShortNguyen Dac Nam1-9/+6
2019-12-18shader/conversion: Implement byte selector in I2FReinUsesLisp1-2/+13
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-08-28shader_ir/conversion: Split int and float selector and implement F2F H1ReinUsesLisp1-18/+16
2019-08-28shader_ir/conversion: Implement F2I F16 Ra.H1ReinUsesLisp1-4/+16
2019-07-20Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.Fernando Sahmkow1-5/+25
This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done.
2019-06-06shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp1-0/+1
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-04-18video_core: Silent -Wswitch warningsReinUsesLisp1-3/+4
2019-04-16Do some corrections in conversion shader instructions.Fernando Sahmkow1-16/+53
Corrects encodings for I2F, F2F, I2I and F2I Implements Immediate variants of all four conversion types. Add assertions to unimplemented stuffs.
2019-02-11Corrected F2I None mode to RoundEven.Fernando Sahmkow1-3/+3
2019-02-03shader_ir: Rename BasicBlock to NodeBlockReinUsesLisp1-1/+1
It's not always used as a basic block. Rename it for consistency.
2019-02-03shader_ir: Pass decoded nodes as a whole instead of per basic blocksReinUsesLisp1-1/+1
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-01-30shader_ir: Unify constant buffer offset valuesReinUsesLisp1-3/+3
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-15shader_ir: Pass to decoder functions basic block's codeReinUsesLisp1-1/+1
2019-01-15shader_decode: Improve zero flag implementationReinUsesLisp1-8/+3
2019-01-15video_core: Return safe values after an assert hitsReinUsesLisp1-4/+4
2019-01-15shader_decode: Implement F2F_CReinUsesLisp1-2/+10
2019-01-15shader_decode: Implement I2IReinUsesLisp1-0/+26
2019-01-15shader_decode: Implement F2IReinUsesLisp1-0/+37
2019-01-15shader_decode: Implement I2FReinUsesLisp1-0/+23
2019-01-15shader_decode: Implement F2FReinUsesLisp1-1/+37
2019-01-15shader_ir: Initial implementationReinUsesLisp1-0/+24