diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-05-05 22:02:28 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-06 11:02:28 +1000 |
| commit | b8eb6abeccbd4a468214a4d2ad3a9b6e5e06973c (patch) | |
| tree | cd3d71ebde0f4f32eb674778adae89c0efcb75df /Ryujinx.Graphics.Gpu/Engine | |
| parent | 7f500e7cae940958289abe1a3461e52684742053 (diff) | |
Refactor shader GPU state and memory access (#1203)
* Refactor shader GPU state and memory access
* Fix NVDEC project build
* Address PR feedback and add missing XML comments
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Compute.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Methods.cs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs index 920cf0dd..7b4b1e8a 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs @@ -47,7 +47,7 @@ namespace Ryujinx.Graphics.Gpu.Engine BufferManager.SetComputeUniformBuffer(index, gpuVa, size); } - ComputeShader cs = ShaderCache.GetComputeShader( + ShaderBundle cs = ShaderCache.GetComputeShader( state, shaderGpuVa, qmd.CtaThreadDimension0, @@ -68,7 +68,7 @@ namespace Ryujinx.Graphics.Gpu.Engine TextureManager.SetComputeTextureBufferIndex(state.Get<int>(MethodOffset.TextureBufferIndex)); - ShaderProgramInfo info = cs.Shader.Program.Info; + ShaderProgramInfo info = cs.Shaders[0].Program.Info; for (int index = 0; index < info.CBuffers.Count; index++) { diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs b/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs index 9f638f50..7244db32 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodCopyBuffer.cs @@ -65,7 +65,7 @@ namespace Ryujinx.Graphics.Gpu.Engine ulong srcAddress = srcBaseAddress + (ulong)srcOffset; ulong dstAddress = dstBaseAddress + (ulong)dstOffset; - ReadOnlySpan<byte> pixel = _context.PhysicalMemory.GetSpan(srcAddress, (ulong)srcBpp); + ReadOnlySpan<byte> pixel = _context.PhysicalMemory.GetSpan(srcAddress, srcBpp); _context.PhysicalMemory.Write(dstAddress, pixel); } diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index 59678be5..5ead87a0 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -839,7 +839,7 @@ namespace Ryujinx.Graphics.Gpu.Engine addressesArray[index] = baseAddress + shader.Offset; } - GraphicsShader gs = ShaderCache.GetGraphicsShader(state, addresses); + ShaderBundle gs = ShaderCache.GetGraphicsShader(state, addresses); _vsUsesInstanceId = gs.Shaders[0]?.Program.Info.UsesInstanceId ?? false; |
