1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-09 02:11:44 +00:00
Ryujinx/Ryujinx.Graphics.Gpu
riperiperi 4b60371e64
Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494)
* Return mapped buffer pointer directly for flush, WriteableRegion for textures

A few changes here to generally improve performance, even for platforms not using the persistent buffer flush.

- Texture and buffer flush now return a ReadOnlySpan<byte>. It's guaranteed that this span is pinned in memory, but it will be overwritten on the next flush from that thread, so it is expected that the data is used before calling again.
- As a result, persistent mappings no longer copy to a new array - rather the persistent map is returned directly as a Span<>. A similar host array is used for the glGet flushes instead of allocating new arrays each time.
- Texture flushes now do their layout conversion into a WriteableRegion when the texture is not MultiRange, which allows the flush to happen directly into guest memory rather than into a temporary span, then copied over. This avoids another copy when doing layout conversion.

Overall, this saves 1 data copy for buffer flush, 1 copy for linear textures with matching source/target stride, and 2 copies for block textures or linear textures with mismatching strides.

* Fix tests

* Fix array pointer for Mesa/Intel path

* Address some feedback

* Update method for getting array pointer.
2021-07-19 19:10:54 -03:00
..
Engine Implement a fast path for I2M transfers (#2467) 2021-07-12 16:48:57 -03:00
Image Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494) 2021-07-19 19:10:54 -03:00
Memory Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494) 2021-07-19 19:10:54 -03:00
Shader Fix shader compilation on shaders that uses rectangle textures (#2471) 2021-07-12 16:20:33 -03:00
Synchronization
ClassId.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
Constants.cs Improve linear texture compatibility rules (#2099) 2021-03-19 02:17:38 +01:00
GpuChannel.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
GpuContext.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
GraphicsConfig.cs misc: Fix default value for GraphicsConfig.MaxAnisotropy (#2274) 2021-05-07 13:18:23 -03:00
Ryujinx.Graphics.Gpu.csproj infra: Migrate to .NET 5 (#1694) 2020-11-15 19:27:15 +01:00
Window.cs Initial support for separate GPU address spaces (#2394) 2021-06-29 19:32:02 +02:00