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
This commit is contained in:
parent
7f500e7cae
commit
b8eb6abecc
35 changed files with 633 additions and 684 deletions
|
@ -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++)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue