aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs
AgeCommit message (Collapse)Author
2021-10-17Extend bindless elimination to work with masked and shifted handles (#2727)gdkchan
* Extent bindless elimination to work with masked handles * Extend bindless elimination to catch shifted pattern, refactor handle packing/unpacking
2021-10-04Relax sampler pool requirement (#2703)gdkchan
2021-09-28Share scales array for graphics and compute (#2653)gdkchan
2021-09-19Set texture/image bindings in place rather than allocating and passing an ↵riperiperi
array (#2647) * Remove allocations for texture bindings and state * Rent rather than stackalloc + copy A bit faster.
2021-08-27Only reupload the texture scale array if it changes. (#2595)riperiperi
* Only reupload the texture scale array if it changes. Before, this would be called all the time if any shader needed a scale value. The cost of doing this has increased with threaded-gal, as the scale array is copied to a span pool, and it's was called on pretty much every draw sometimes. This improves GPU performance in games, scaled or not. Most affected game seems to be Xenoblade Chronicles: Definitive Edition. * Just use = instead of |=
2021-07-14Do not require texture and sampler pools being initialized (#2476)gdkchan
2021-07-11Separate GPU engines (part 2/2) (#2440)gdkchan
* 3D engine now uses DeviceState too, plus new state modification tracking * Remove old methods code * Remove GpuState and friends * Optimize DeviceState, force inline some functions * This change was not supposed to go in * Proper channel initialization * Optimize state read/write methods even more * Fix debug build * Do not dirty state if the write is redundant * The YControl register should dirty either the viewport or front face state too, to update the host origin * Avoid redundant vertex buffer updates * Move state and get rid of the Ryujinx.Graphics.Gpu.State namespace * Comments and nits * Fix rebase * PR feedback * Move changed = false to improve codegen * PR feedback * Carry RyuJIT a bit more
2021-07-07Separate GPU engines and make state follow official docs (part 1/2) (#2422)gdkchan
* Use DeviceState for compute and i2m * Migrate 2D class, more comments * Migrate DMA copy engine * Remove now unused code * Replace GpuState by GpuAccessorState on GpuAcessor, since compute no longer has a GpuState * More comments * Add logging (disabled) * Add back i2m on 3D engine
2021-06-29Initial support for separate GPU address spaces (#2394)gdkchan
* Make GPU memory manager a member of GPU channel * Move physical memory instance to the memory manager, and the caches to the physical memory * PR feedback
2021-06-24Initial support for GPU channels (#2372)gdkchan
* Ground work for separate GPU channels * Rename TextureManager to TextureCache * Decouple texture bindings management from the texture cache * Rename BufferManager to BufferCache * Decouple buffer bindings management from the buffer cache * More comments and proper disposal * PR feedback * Force host state update on channel switch * Typo * PR feedback * Missing using
2021-06-20Fix separate bindless sampler at offset 0 (#2360)gdkchan
2021-06-09GAL: Fix sampler leaks on exit (#2353)Mary
Before this, all samplers instance were leaking on exit because the dispose method was never getting called. This fix this issue by making TextureBindingsManager disposable and calling the dispose method in the TextureManager.
2021-06-09Support bindless textures with separate constant buffers for texture and ↵gdkchan
sampler (#2339)
2021-05-31Do not attempt to normalize SNORM image buffers on shaders (#2317)gdkchan
* Do not attempt to normalize SNORM image buffers on shaders * Shader cache version bump
2021-05-19Pass CbufSlot when getting info from the texture descriptor (#2291)riperiperi
* Pass CbufSlot when getting info from the texture descriptor Fixes some issues with bindless textures, when CbufSlot is not equal to the current TextureBufferIndex. Specifically fixes a random chance of full screen colour flickering in Super Mario Party. * Apply suggestions from code review Oops Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2021-03-08Improve Buffer Textures and flush Image Stores (#2088)riperiperi
* Improve Buffer Textures and flush Image Stores Fixes a number of issues with buffer textures: - Reworked Buffer Textures to create their buffers in the TextureManager, then bind them with the BufferManager later. - Fixes an issue where a buffer texture's buffer could be invalidated after it is bound, but before use. - Fixed width unpacking for large buffer textures. The width is now 32-bit rather than 16. - Force buffer textures to be rebound whenever any buffer is created, as using the handle id wasn't reliable, and the cost of binding isn't too high. Fixes vertex explosions and flickering animations in UE4 games. * Set ImageStore flag... for ImageStore. * Check the offset and size.
2021-01-17Support for resources on non-contiguous GPU memory regions (#1905)gdkchan
* Support for resources on non-contiguous GPU memory regions * Implement MultiRange physical addresses, only used with a single range for now * Actually use non-contiguous ranges * GetPhysicalRegions fixes * Documentation and remove Address property from TextureInfo * Finish implementing GetWritableRegion * Fix typo
2020-12-03Extract texture Target from Info for quick access (#1774)riperiperi
2020-11-09Simplify logic for bindless texture handling (#1667)gdkchan
* Simplify logic for bindless texture handling * Nits
2020-11-08Use explicit buffer and texture bindings on shaders (#1666)gdkchan
* Use explicit buffer and texture bindings on shaders * More XML docs and other nits
2020-11-02Support res scale on images, correctly blacklist for SUST, move logic out of ↵riperiperi
backend. (#1657) * Support res scale on images, correctly blacklist for SUST, move logic out of backend. * Fix Typo
2020-11-01Remove unused texture and sampler pool invalidation code (#1648)gdkchan
2020-10-21Add missing null check on image binding (#1632)gdkchan
2020-10-20Fix image binding format (#1625)gdkchan
* Fix image binding format * XML doc
2020-10-20Ensure storage is set for Buffer Textures when binding an Image. (#1627)riperiperi
2020-07-07Implement Zero-Configuration Resolution Scaling (#1365)riperiperi
* Initial implementation of Render Target Scaling Works with most games I have. No GUI option right now, it is hardcoded. Missing handling for texelFetch operation. * Realtime Configuration, refactoring. * texelFetch scaling on fragment shader (WIP) * Improve Shader-Side changes. * Fix potential crash when no color/depth bound * Workaround random uses of textures in compute. This was blacklisting textures in a few games despite causing no bugs. Will eventually add full support so this doesn't break anything. * Fix scales oscillating when changing between non-native scales. * Scaled textures on compute, cleanup, lazier uniform update. * Cleanup. * Fix stupidity * Address Thog Feedback. * Cover most of GDK's feedback (two comments remain) * Fix bad rename * Move IsDepthStencil to FormatExtensions, add docs. * Fix default config, square texture detection. * Three final fixes: - Nearest copy when texture is integer format. - Texture2D -> Texture3D copy correctly blacklists the texture before trying an unscaled copy (caused driver error) - Discount small textures. * Remove scale threshold. Not needed right now - we'll see if we run into problems. * All CPU modification blacklists scale. * Fix comment.
2020-05-27Support separate textures and samplers (#1216)gdkchan
* Support separate textures and samplers * Add missing bindless flag, fix SNORM format on buffer textures * Add missing separation * Add comments about the new handles
2020-04-25Implement texture buffers (#1152)gdkchan
* Implement texture buffers * Throw NotSupportedException where appropriate
2020-01-13Add a GetSpan method to the memory manager and use it on GPU (#877)gdkchan
2020-01-09Address PR feedbackgdkchan
2020-01-09Add XML documentation to Ryujinx.Graphics.Gpu.Imagegdkchan
2020-01-09Some code cleanupgdkchan
2020-01-09Reimplement limited bindless textures supportgdkchan
2020-01-09Support texture rectangle targets (non-normalized coords)gdkchan
2020-01-09Fix wrong maximum id on sampler pool in some casesgdkchan
2020-01-09Initial support for the guest OpenGL driver (NVIDIA and Nouveau)gdkchan
2020-01-09Share texture pool cache between graphics and computegdk
2020-01-09Initial support for image stores, support texture sample on computegdk