aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs
AgeCommit message (Collapse)Author
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-28 Initial non 2D textures support (#525)Thomas Guillemard
* Initial non 2D textures support - Shaders still need to be changed - Some types aren't yet implemented * Start implementing texture instructions suffixes Fix wrong texture type with cube and TEXS Also support array textures in TEX and TEX.B Clean up TEX and TEXS coords managment Fix TEXS.LL with non-2d textures Implement TEX.AOFFI Get the right arguments for TEX, TEXS and TLDS Also, store suffix operands in appropriate values to support multiple suffix combinaisons * Support depth in read/writeTexture Also support WrapR and detect mipmap * Proper cube map textures support + fix TEXS.LZ * Implement depth compare * some code clean up * Implement CubeMap textures in OGLTexture.Create * Implement TLD4 and TLD4S * Add Texture 1D support * updates comments * fix some code style issues * Fix some nits + rename some things to be less confusing * Remove GetSuffix local functions * AOFFI => AOffI * TextureType => GalTextureTarget * finish renaming TextureType to TextureTarget * Disable LL, LZ and LB support in the decompiler This needs more work at the GL level (GLSL implementation should be right) * Revert "Disable LL, LZ and LB support in the decompiler" This reverts commit 64536c3d9f673645faff3152838d1413c3203395. * Fix TEXS ARRAY_2D index * ImageFormat depth should be 1 for all image format * Fix shader build issues with sampler1DShadow and texture * Fix DC & AOFFI combinaison with TEX/TEXS * Support AOFFI with TLD4 and TLD4S * Fix shader compilation error for TLD4.AOFFI with no DC * Fix binding isuses on the 2d copy engine TODO: support 2d array copy * Support 2D array copy operation in the 2D engine This make every copy right in the GPU side. Thie CPU copy probably needs to be updated * Implement GetGpuSize + fix somes issues with 2d engine copies TODO: mipmap level in it * Don't throw an exception in the layer handling * Fix because of rebase * Reject 2d layers of non textures in 2d copy engine * Add 3D textures and mipmap support on BlockLinearSwizzle * Fix naming on new BitUtils methods * gpu cache: Make sure to invalidate textures that doesn't have the same target * Add the concept of layer count for array instead of using depth Also cleanup GetGpuSize as Swizzle can compute the size with mipmap * Support multi layer with mip map in ReadTexture * Add more check for cache invalidation & remove cubemap and cubemap array code for now Also fix compressed 2d array * Fix texelFetchOffset shader build error * Start looking into cube map again Also add some way to log write in register in engines * fix write register log levles * Remove debug logs in WriteRegister * Disable AOFFI support on non NVIDIA drivers * Fix code align
2018-12-17Move MaxUboSize definition (#530)Thomas Guillemard
* Move MaxUboSize definition This fix a crash on Ryujinx.ShaderTools caused by the absence of an OpenGL context. * Use a constant for the value in ShaderTools * Address comments
2018-10-17Improve texture tables (#457)gdkchan
* Improve texture tables * More renaming and other tweaks * Minor tweaks
2018-09-26Fix multiple rendertargets (#427)ReinUsesLisp
* Simplify render target bindings * Implement multiple viewports * Pack glViewportIndexed calls into a single glViewportArray * Use ARB_viewport_array when available * Cache framebuffer attachments * Use get accessors in OGLExtension * Address feedback
2018-08-25Implement vertex instancing (#381)ReinUsesLisp
2018-08-23Avoid querying and setting texture bindings in hot code (#376)ReinUsesLisp
2018-08-15More flexible memory manager (#307)gdkchan
* Keep track mapped buffers with fixed offsets * Started rewriting the memory manager * Initial support for MapPhysicalMemory and UnmapPhysicalMemory, other tweaks * MapPhysicalMemory/UnmapPhysicalMemory support, other tweaks * Rebased * Optimize the map/unmap physical memory svcs * Integrate shared font support * Fix address space reserve alignment * Some fixes related to gpu memory mapping * Some cleanup * Only try uploading const buffers that are really used * Check if memory region is contiguous * Rebased * Add missing count increment on IsRegionModified * Check for reads/writes outside of the address space, optimize translation with a tail call
2018-08-10Low level graphics API prerequisites (#319)ReinUsesLisp
* Add GalPipelineState and IGalPipeline * Separate UploadVertex call * Add ConstBuffer cache * Move Vertex Assembly into GalPipelineState * Move Uniform binds to GalPipelineState * Move framebuffer flip into a buffer * Rebase * Fix regression * Move clear values from VertexEndGl to ClearBuffers * Rename obscure names O->Old S->New
2018-07-26Avoid calling buffer binding when shader didn't change (#295)ReinUsesLisp
2018-07-19Send data to OpenGL host without client-side copies (#285)ReinUsesLisp
* Directly send host address to buffer data * Cleanup OGLShader * Directly copy vertex and index data too * Revert shader bind "cache" * Address feedback
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-15Add config key to dump shaders in local directory (#265)ReinUsesLisp
* Add config key to dump shaders in local directory * Address feedback
2018-07-14Some small shader related fixes (#258)gdkchan
* Some small shader related fixes * Address PR feedback
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-27Fix vertex buffer size on the gpu when the draw vertex count is less than ↵gdkchan
the buffer size, added a few more registers (currently not implemented)
2018-06-26Implementation of UBOs instead of uniform constant arrays (#186)ReinUsesLisp
* Sort uniform binding to avoid possible failures in drivers fewer bindings * Throw exception for Cbuf overflow * Search for free bindings instead of using locked ones * EnsureAllocated when binding buffers * Fix uniform bindings * Remove spaces * Use 64 KiB UBOs when available * Remove double colon * Use IdentationStr and avoid division in Cbuf offset * Add spaces
2018-06-23Small OpenGL Renderer refactoring (#177)gdkchan
* Call OpenGL functions directly, remove the pfifo thread, some refactoring * Fix PerformanceStatistics calculating the wrong host fps, remove wait event on PFIFO as this wasn't exactly was causing the freezes (may replace with an exception later) * Organized the Gpu folder a bit more, renamed a few things, address PR feedback * Make PerformanceStatistics thread safe * Remove unused constant * Use unlimited update rate for better pref
2018-06-02Some small gpu improvements and shader improvements, add support for ASTC ↵gdkchan
4x4 textures (slow!)
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-14[GPU] Fix frame buffer being upside down in some casesgdkchan
2018-04-08Merge shader branch, adding support for GLSL decompilation, a macrogdkchan
interpreter, and a rewrite of the GPU code.