0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Graphics/Shader/Decoders
gdkchan 6b23a2c125 New shader translator implementation (#654)
* Start implementing a new shader translator

* Fix shift instructions and a typo

* Small refactoring on StructuredProgram, move RemovePhis method to a separate class

* Initial geometry shader support

* Implement TLD4

* Fix -- There's no negation on FMUL32I

* Add constant folding and algebraic simplification optimizations, nits

* Some leftovers from constant folding

* Avoid cast for constant assignments

* Add a branch elimination pass, and misc small fixes

* Remove redundant branches, add expression propagation and other improvements on the code

* Small leftovers -- add missing break and continue, remove unused properties, other improvements

* Add null check to handle empty block cases on block visitor

* Add HADD2 and HMUL2 half float shader instructions

* Optimize pack/unpack sequences, some fixes related to half float instructions

* Add TXQ, TLD, TLDS and TLD4S shader texture instructions, and some support for bindless textures, some refactoring on codegen

* Fix copy paste mistake that caused RZ to be ignored on the AST instruction

* Add workaround for conditional exit, and fix half float instruction with constant buffer

* Add missing 0.0 source for TLDS.LZ variants

* Simplify the switch for TLDS.LZ

* Texture instructions related fixes

* Implement the HFMA instruction, and some misc. fixes

* Enable constant folding on UnpackHalf2x16 instructions

* Refactor HFMA to use OpCode* for opcode decoding rather than on the helper methods

* Remove the old shader translator

* Remove ShaderDeclInfo and other unused things

* Add dual vertex shader support

* Add ShaderConfig, used to pass shader type and maximum cbuffer size

* Move and rename some instruction enums

* Move texture instructions into a separate file

* Move operand GetExpression and locals management to OperandManager

* Optimize opcode decoding using a simple list and binary search

* Add missing condition for do-while on goto elimination

* Misc. fixes on texture instructions

* Simplify TLDS switch

* Address PR feedback, and a nit
2019-04-18 09:57:08 +10:00
..
BitfieldExtensions.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
Block.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
Condition.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
ConditionalOperation.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
Decoder.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
DecoderHelper.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
FmulScale.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
FPHalfSwizzle.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
FPType.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IntegerCondition.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IntegerHalfPart.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IntegerShift.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IntegerSize.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IntegerType.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCode.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeAlu.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeFArith.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeHfma.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeImm.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeImmF.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeLop.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeRa.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeRc.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeRd.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeReg.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
IOpCodeRegCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
LogicalOperation.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
MufuOperation.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCode.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAlu.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAluCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAluImm.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAluImm2x10.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAluImm32.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAluReg.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAluRegCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeAttribute.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeBranch.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeExit.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeFArith.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeFArithCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeFArithImm.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeFArithImm32.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeFArithReg.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeFArithRegCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeFsetImm.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeHfma.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeHfmaCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeHfmaImm2x10.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeHfmaImm32.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeHfmaReg.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeHfmaRegCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeIpa.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeLdc.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeLop.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeLopCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeLopImm.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeLopImm32.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeLopReg.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodePsetp.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeSet.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeSetCbuf.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeSetImm.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeSetReg.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeSsy.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeSync.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTable.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTex.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTexs.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTexture.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTextureScalar.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTld.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTld4.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTld4s.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
OpCodeTlds.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
Register.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
RegisterConsts.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
RegisterType.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
RoundingMode.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
TexelLoadScalarType.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
TextureDimensions.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
TextureGatherOffset.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
TextureLodMode.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
TextureProperty.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
TextureScalarType.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00
XmadCMode.cs New shader translator implementation (#654) 2019-04-18 09:57:08 +10:00