aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/Shader/ShaderDecodeAlu.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
2019-02-15Fix XMAD shader instruction, gl_FrontFacing and enable face culling (#583)gdkchan
* Fix XMAD shader instruction implementation * Fix gl_FrontFacing constant value * Enable face culling again * Fix typo
2019-01-31Initial support for shader half float instructions (#507)gdkchan
2018-10-23Fix for render target and a shader compilation issue (#471)gdkchan
* Fix render target using possibly deleted or wrong handles * Fix basic blocks with only a KIL instruction on the shader translator * Formatting fix
2018-10-13Add support for saturation on some shader instructions, fix ReadTexture ↵gdkchan
alignment and add ColorMask support (#451) * Add support for saturation on some shader instructions, fix ReadTexture alignment * Add ColorMask support, other 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-09-08Move GPU emulation from Ryujinx.HLE to Ryujinx.Graphics and misc changes (#402)ReinUsesLisp
* Move GPU LLE emulation from HLE to Graphics * Graphics: Move Gal/Texture to Texture * Remove Engines/ directory and namespace * Use tables for image formats * Abstract OpCode decoding * Simplify image table * Do not leak Read* symbols in TextureReader * Fixups * Rename IGalFrameBuffer -> IGalRenderTarget * Remove MaxBpp hardcoded value * Change yet again texture data and add G8R8 flipping * Rename GalFrameBufferFormat to GalSurfaceFormat * Unident EnsureSetup in ImageHandler * Add IsCompressed * Address some feedback
2018-09-01Shaders: Handle Ipa PASS argument as needed in Fragment Shaders (#392)ReinUsesLisp
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-08-13Fix FMUL and TEXS shader instructions (#347)gdkchan
2018-08-03Fix for integer vertex attributes and iset bf flag (#323)gdkchan
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-07-17Implement some shader instructions (#252)ReinUsesLisp
* Add IADDI32, IADD and SEL shader instructions * Add LOP shader instruction and fix LOP32I pass_b * Add ISET shader instruction * Add IADD3 shader instruction * Address feedback * Fixup OperA in Iadd_I32
2018-06-27Add support for Vertex Program A and other small shader improvements (#192)gdkchan
* Add WIP support for Vertex Program A, add the FADD_I32 shader instruction, small fix on FFMA_I encoding, nits * Add separate subroutines for program A/B, and copy attributes to a temp * Move finalization code to main * Add new line after flip uniform on the shader * Handle possible case where VPB uses an output attribute written by VPA but not available on the vbo * Address PR feedback
2018-06-23Fix 3 graphics related issues (#180)gdkchan
* Fix 3 graphics related bugs * OGLShader shouldn't be public (yet)
2018-06-02Fix mistake on astc conversion, make some static methods that shouldn't be ↵gdkchan
public private, remove old commmented out code
2018-06-02Some small gpu improvements and shader improvements, add support for ASTC ↵gdkchan
4x4 textures (slow!)
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-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-25Some small sync primitive fixes, logging fixes, started to implement the 2D ↵gdkchan
engine on the GPU, fixed DrawArrays, implemented a few more shader instructions, made a start on nvdrv refactor, etc...
2018-04-19Add SvcSetThreadActivity, tweak SignalProcessWideKey, add fmul32i shader ↵gdkchan
instructions and other small fixes
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.