aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/Shader/ShaderDecoder.cs
AgeCommit message (Collapse)Author
2019-04-18New shader translator implementation (#654)gdkchan
* 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-03-04Do naming refactoring on Ryujinx.Graphics (#611)Alex Barney
* Renaming part 1 * Renaming part 2 * Renaming part 3 * Renaming part 4 * Renaming part 5 * Renaming part 6 * Renaming part 7 * Renaming part 8 * Renaming part 9 * Renaming part 10 * General cleanup * Thought I got all of these * Apply #595 * Additional renaming * Tweaks from feedback * Rename files
2018-10-17Improve texture tables (#457)gdkchan
* Improve texture tables * More renaming and other tweaks * Minor tweaks
2018-09-18Allow "reinterpretation" of framebuffer/zeta formats (#418)gdkchan
* (Re)Implement format reinterpretation, other changes * Implement writeback to guest memory, some refactoring * More refactoring, implement reinterpretation the old way again * Clean up * Some fixes on M2MF (old Dma engine), added partial support for P2MF, fix conditional ssy, add Z24S8 zeta format, other fixes * nit: Formatting * Address PR feedback
2018-08-31Implement SSY/SYNC shader instructions (#382)ReinUsesLisp
* Use a program counter to control shaders' flow * Cleanup * Implement SSY/SYNC * Address feedback * Fixup commentary * Fixup Ssy instruction
2018-07-19Implement Geometry shaders (#280)ReinUsesLisp
* Implement Geometry shaders * Add EmitVertex() and EndPrimitive() * Read output geometry data from header * Stub Vmad * Add Iadd_I32 * Stub Mov_S (S2R) * Stub Isberd * Change vertex index to gpr39 in Abuf * Add stub messages for consistency * Do not print input block when there is no attributes * Use GL_ARB_enhanced_layouts * Skip geometry shaders when there's no GL_ARB_enhanced_layouts * Address feedback * Address feedback
2018-05-29Added support for more shader instructions and texture formats, fix swapped ↵gdkchan
channels in RGB565 and RGBA5551? texture formats, allow zero values on blending registers, initial work to build CFG on the shader decoder, update the BRA instruction to work with it (WIP)
2018-05-22Improve shader sending method to GAL, use a memory interface instead of ↵gdkchan
reading a fixed array size and sending every time
2018-05-17Added more shader instructions, including BFE, BRA (partial), FMNMX, ISCADD, ↵gdkchan
SHL, LD_C, some shader related fixes, added support for texture component selection
2018-04-13Fix for current framebuffer issues (#78)gdkchan
[GPU] Fix some of the current framebuffer issues
2018-04-10[GPU] Add more shader instructions, add support for rgb565 texturesgdkchan
2018-04-08Merge shader branch, adding support for GLSL decompilation, a macrogdkchan
interpreter, and a rewrite of the GPU code.