diff --git a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs
index c235c555..09e50274 100644
--- a/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs
+++ b/src/ComputeSharp/Graphics/Extensions/GraphicsDeviceExtensions.Resources.cs
@@ -1173,4 +1173,60 @@ public static partial class GraphicsDeviceExtensions
return texture;
}
+
+ ///
+ /// Loads a new upload 2D texture with the contents of the specified file.
+ ///
+ /// The type of items to store in the texture.
+ /// The instance to use to allocate the texture.
+ /// The filename of the image file to load and decode into the texture.
+ /// A instance with the contents of the specified file.
+ public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, string filename)
+ where T : unmanaged
+ {
+ Guard.IsNotNull(filename, nameof(filename));
+
+ return device.LoadUploadTexture2D(filename.AsSpan());
+ }
+
+ ///
+ /// Loads a new upload 2D texture with the contents of the specified file.
+ ///
+ /// The type of items to store in the texture.
+ /// The instance to use to allocate the texture.
+ /// The filename of the image file to load and decode into the texture.
+ /// A instance with the contents of the specified file.
+ public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, ReadOnlySpan filename)
+ where T : unmanaged
+ {
+ return WICHelper.Instance.LoadTexture(device, filename);
+ }
+
+ ///
+ /// Loads a new upload 2D texture with the contents of the specified file.
+ ///
+ /// The type of items to store in the texture.
+ /// The instance to use to allocate the texture.
+ /// The buffer with the image data to load and decode into the texture.
+ /// A instance with the contents of the specified file.
+ public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, ReadOnlySpan span)
+ where T : unmanaged
+ {
+ return WICHelper.Instance.LoadTexture(device, span);
+ }
+
+ ///
+ /// Loads a new upload 2D texture with the contents of the specified file.
+ ///
+ /// The type of items to store in the texture.
+ /// The instance to use to allocate the texture.
+ /// The stream with the image data to load and decode into the texture.
+ /// A instance with the contents of the specified file.
+ public static UploadTexture2D LoadUploadTexture2D(this GraphicsDevice device, Stream stream)
+ where T : unmanaged
+ {
+ Guard.IsNotNull(stream, nameof(stream));
+
+ return WICHelper.Instance.LoadTexture(device, stream);
+ }
}