diff options
author | riperiperi <rhy3756547@hotmail.com> | 2021-03-08 21:43:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 18:43:39 -0300 |
commit | 1623ab524f54901e154c8b644e2315985d5bd0a0 (patch) | |
tree | ccfc6473f380e30a596e97742d2fd0995ecf2dd1 /Ryujinx.Graphics.OpenGL/Renderer.cs | |
parent | da283ff3c37629769324926e24a7b203f9901890 (diff) |
Improve Buffer Textures and flush Image Stores (#2088)
* 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.
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Renderer.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Renderer.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Renderer.cs b/Ryujinx.Graphics.OpenGL/Renderer.cs index 4a3f51bf..c3d08309 100644 --- a/Ryujinx.Graphics.OpenGL/Renderer.cs +++ b/Ryujinx.Graphics.OpenGL/Renderer.cs @@ -30,6 +30,8 @@ namespace Ryujinx.Graphics.OpenGL internal ResourcePool ResourcePool { get; } + internal int BufferCount { get; private set; } + public string GpuVendor { get; private set; } public string GpuRenderer { get; private set; } public string GpuVersion { get; private set; } @@ -52,6 +54,8 @@ namespace Ryujinx.Graphics.OpenGL public BufferHandle CreateBuffer(int size) { + BufferCount++; + return Buffer.Create(size); } @@ -69,7 +73,7 @@ namespace Ryujinx.Graphics.OpenGL { if (info.Target == Target.TextureBuffer) { - return new TextureBuffer(info); + return new TextureBuffer(this, info); } else { |