aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-07-07 20:56:06 -0300
committerGitHub <noreply@github.com>2021-07-07 20:56:06 -0300
commit8b44eb1c981d7106be37107755c7c71c3c3c0ce4 (patch)
tree70c3a8d7286d827941c41dee2ec3cb3273c1e6d7 /Ryujinx.Graphics.Gpu/Image/TextureManager.cs
parent31cbd09a75a9d5f4814c3907a060e0961eb2bb15 (diff)
Separate GPU engines and make state follow official docs (part 1/2) (#2422)
* 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
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureManager.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureManager.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
index 9cab343a..fcc67f72 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureManager.cs
@@ -313,26 +313,36 @@ namespace Ryujinx.Graphics.Gpu.Image
/// <summary>
/// Gets a texture descriptor used on the compute pipeline.
/// </summary>
- /// <param name="state">Current GPU state</param>
+ /// <param name="poolGpuVa">GPU virtual address of the texture pool</param>
+ /// <param name="bufferIndex">Index of the constant buffer with texture handles</param>
+ /// <param name="maximumId">Maximum ID of the texture pool</param>
/// <param name="handle">Shader "fake" handle of the texture</param>
/// <param name="cbufSlot">Shader constant buffer slot of the texture</param>
/// <returns>The texture descriptor</returns>
- public TextureDescriptor GetComputeTextureDescriptor(GpuState state, int handle, int cbufSlot)
+ public TextureDescriptor GetComputeTextureDescriptor(ulong poolGpuVa, int bufferIndex, int maximumId, int handle, int cbufSlot)
{
- return _cpBindingsManager.GetTextureDescriptor(state, 0, handle, cbufSlot);
+ return _cpBindingsManager.GetTextureDescriptor(poolGpuVa, bufferIndex, maximumId, 0, handle, cbufSlot);
}
/// <summary>
/// Gets a texture descriptor used on the graphics pipeline.
/// </summary>
- /// <param name="state">Current GPU state</param>
+ /// <param name="poolGpuVa">GPU virtual address of the texture pool</param>
+ /// <param name="bufferIndex">Index of the constant buffer with texture handles</param>
+ /// <param name="maximumId">Maximum ID of the texture pool</param>
/// <param name="stageIndex">Index of the shader stage where the texture is bound</param>
/// <param name="handle">Shader "fake" handle of the texture</param>
/// <param name="cbufSlot">Shader constant buffer slot of the texture</param>
/// <returns>The texture descriptor</returns>
- public TextureDescriptor GetGraphicsTextureDescriptor(GpuState state, int stageIndex, int handle, int cbufSlot)
+ public TextureDescriptor GetGraphicsTextureDescriptor(
+ ulong poolGpuVa,
+ int bufferIndex,
+ int maximumId,
+ int stageIndex,
+ int handle,
+ int cbufSlot)
{
- return _gpBindingsManager.GetTextureDescriptor(state, stageIndex, handle, cbufSlot);
+ return _gpBindingsManager.GetTextureDescriptor(poolGpuVa, bufferIndex, maximumId, stageIndex, handle, cbufSlot);
}
/// <summary>