diff --git a/src/Graphics/CommandBuffer.cs b/src/Graphics/CommandBuffer.cs index b63563f..baa2899 100644 --- a/src/Graphics/CommandBuffer.cs +++ b/src/Graphics/CommandBuffer.cs @@ -445,7 +445,7 @@ namespace MoonWorks.Graphics AssertComputeBufferCount(2); #endif - var bufferPtrs = stackalloc IntPtr[1]; + var bufferPtrs = stackalloc IntPtr[2]; bufferPtrs[0] = bufferOne.Handle; bufferPtrs[1] = bufferTwo.Handle; @@ -472,7 +472,7 @@ namespace MoonWorks.Graphics AssertComputeBufferCount(3); #endif - var bufferPtrs = stackalloc IntPtr[1]; + var bufferPtrs = stackalloc IntPtr[3]; bufferPtrs[0] = bufferOne.Handle; bufferPtrs[1] = bufferTwo.Handle; bufferPtrs[2] = bufferThree.Handle; @@ -502,7 +502,7 @@ namespace MoonWorks.Graphics AssertComputeBufferCount(4); #endif - var bufferPtrs = stackalloc IntPtr[1]; + var bufferPtrs = stackalloc IntPtr[4]; bufferPtrs[0] = bufferOne.Handle; bufferPtrs[1] = bufferTwo.Handle; bufferPtrs[2] = bufferThree.Handle; @@ -577,7 +577,7 @@ namespace MoonWorks.Graphics AssertComputeTextureCount(2); #endif - var texturePtrs = stackalloc IntPtr[1]; + var texturePtrs = stackalloc IntPtr[2]; texturePtrs[0] = textureOne.Handle; texturePtrs[1] = textureTwo.Handle; @@ -604,7 +604,7 @@ namespace MoonWorks.Graphics AssertComputeTextureCount(3); #endif - var texturePtrs = stackalloc IntPtr[1]; + var texturePtrs = stackalloc IntPtr[3]; texturePtrs[0] = textureOne.Handle; texturePtrs[1] = textureTwo.Handle; texturePtrs[2] = textureThree.Handle; @@ -634,7 +634,7 @@ namespace MoonWorks.Graphics AssertComputeTextureCount(4); #endif - var texturePtrs = stackalloc IntPtr[1]; + var texturePtrs = stackalloc IntPtr[4]; texturePtrs[0] = textureOne.Handle; texturePtrs[1] = textureTwo.Handle; texturePtrs[2] = textureThree.Handle;