diff --git a/lib/RefreshCS b/lib/RefreshCS
index a0cdff3..5d09b03 160000
--- a/lib/RefreshCS
+++ b/lib/RefreshCS
@@ -1 +1 @@
-Subproject commit a0cdff3054c646a532e5850c0ab89d4611069237
+Subproject commit 5d09b036cbd0a1402857776d8f39be87234b450a
diff --git a/src/Graphics/GraphicsDevice.cs b/src/Graphics/GraphicsDevice.cs
index ec4add3..c4f643d 100644
--- a/src/Graphics/GraphicsDevice.cs
+++ b/src/Graphics/GraphicsDevice.cs
@@ -358,84 +358,15 @@ namespace MoonWorks.Graphics
///
/// Waits for the given fence to become signaled.
///
- public unsafe void WaitForFences(Fence fence)
+ public unsafe void WaitForFence(Fence fence)
{
var fenceHandle = fence.Handle;
Refresh.Refresh_WaitForFences(
Handle,
1,
- 1,
- &fenceHandle
- );
- }
-
- ///
- /// Wait for one or more fences to become signaled.
- ///
- /// If true, will wait for all given fences to be signaled.
- public unsafe void WaitForFences(
- Fence fenceOne,
- Fence fenceTwo,
- bool waitAll
- ) {
- var handlePtr = stackalloc nint[2];
- handlePtr[0] = fenceOne.Handle;
- handlePtr[1] = fenceTwo.Handle;
-
- Refresh.Refresh_WaitForFences(
- Handle,
- Conversions.BoolToInt(waitAll),
- 2,
- handlePtr
- );
- }
-
- ///
- /// Wait for one or more fences to become signaled.
- ///
- /// If true, will wait for all given fences to be signaled.
- public unsafe void WaitForFences(
- Fence fenceOne,
- Fence fenceTwo,
- Fence fenceThree,
- bool waitAll
- ) {
- var handlePtr = stackalloc nint[3];
- handlePtr[0] = fenceOne.Handle;
- handlePtr[1] = fenceTwo.Handle;
- handlePtr[2] = fenceThree.Handle;
-
- Refresh.Refresh_WaitForFences(
- Handle,
- Conversions.BoolToInt(waitAll),
- 3,
- handlePtr
- );
- }
-
- ///
- /// Wait for one or more fences to become signaled.
- ///
- /// If true, will wait for all given fences to be signaled.
- public unsafe void WaitForFences(
- Fence fenceOne,
- Fence fenceTwo,
- Fence fenceThree,
- Fence fenceFour,
- bool waitAll
- ) {
- var handlePtr = stackalloc nint[4];
- handlePtr[0] = fenceOne.Handle;
- handlePtr[1] = fenceTwo.Handle;
- handlePtr[2] = fenceThree.Handle;
- handlePtr[3] = fenceFour.Handle;
-
- Refresh.Refresh_WaitForFences(
- Handle,
- Conversions.BoolToInt(waitAll),
- 4,
- handlePtr
+ &fenceHandle,
+ 1
);
}
@@ -455,8 +386,8 @@ namespace MoonWorks.Graphics
Refresh.Refresh_WaitForFences(
Handle,
Conversions.BoolToInt(waitAll),
- 4,
- handlePtr
+ handlePtr,
+ (uint) fences.Length
);
}
diff --git a/src/Graphics/ResourceUploader.cs b/src/Graphics/ResourceUploader.cs
index e2564ce..212a5db 100644
--- a/src/Graphics/ResourceUploader.cs
+++ b/src/Graphics/ResourceUploader.cs
@@ -250,7 +250,7 @@ namespace MoonWorks.Graphics
var commandBuffer = Device.AcquireCommandBuffer();
RecordUploadCommands(commandBuffer);
var fence = Device.SubmitAndAcquireFence(commandBuffer);
- Device.WaitForFences(fence);
+ Device.WaitForFence(fence);
Device.ReleaseFence(fence);
}