|
@@ -101,6 +101,16 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|
|
/// <returns>The GPU resource with the given ID</returns>
|
|
/// <returns>The GPU resource with the given ID</returns>
|
|
|
public abstract T1 Get(int id);
|
|
public abstract T1 Get(int id);
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Checks if a given ID is valid and inside the range of the pool.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ /// <param name="id">ID of the descriptor. This is effectively a zero-based index</param>
|
|
|
|
|
+ /// <returns>True if the specified ID is valid, false otherwise</returns>
|
|
|
|
|
+ public bool IsValidId(int id)
|
|
|
|
|
+ {
|
|
|
|
|
+ return (uint)id <= MaximumId;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Synchronizes host memory with guest memory.
|
|
/// Synchronizes host memory with guest memory.
|
|
|
/// This causes invalidation of pool entries,
|
|
/// This causes invalidation of pool entries,
|