renaming some SDL references
parent
baf51d2ee9
commit
35684df005
|
@ -122,12 +122,12 @@ public class CommandBuffer
|
||||||
AssertColorTarget(colorAttachmentInfo);
|
AssertColorTarget(colorAttachmentInfo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[1];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[1];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfo.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfo.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
1,
|
1,
|
||||||
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
||||||
);
|
);
|
||||||
|
@ -170,13 +170,13 @@ public class CommandBuffer
|
||||||
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, colorAttachmentInfoTwo.TextureSlice.Texture);
|
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, colorAttachmentInfoTwo.TextureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[2];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[2];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
||||||
sdlColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
refreshColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
2,
|
2,
|
||||||
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
||||||
);
|
);
|
||||||
|
@ -226,14 +226,14 @@ public class CommandBuffer
|
||||||
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, colorAttachmentInfoThree.TextureSlice.Texture);
|
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, colorAttachmentInfoThree.TextureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[3];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[3];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
||||||
sdlColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
refreshColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
||||||
sdlColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
refreshColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
3,
|
3,
|
||||||
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
||||||
);
|
);
|
||||||
|
@ -289,15 +289,15 @@ public class CommandBuffer
|
||||||
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, colorAttachmentInfoFour.TextureSlice.Texture);
|
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, colorAttachmentInfoFour.TextureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[4];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[4];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
||||||
sdlColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
refreshColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
||||||
sdlColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
refreshColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
||||||
sdlColorAttachmentInfos[3] = colorAttachmentInfoFour.ToRefresh();
|
refreshColorAttachmentInfos[3] = colorAttachmentInfoFour.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
4,
|
4,
|
||||||
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
(Refresh.DepthStencilAttachmentInfo*) nint.Zero
|
||||||
);
|
);
|
||||||
|
@ -333,13 +333,13 @@ public class CommandBuffer
|
||||||
AssertValidDepthAttachment(depthStencilAttachmentInfo);
|
AssertValidDepthAttachment(depthStencilAttachmentInfo);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
var refreshDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
(Refresh.ColorAttachmentInfo*) nint.Zero,
|
(Refresh.ColorAttachmentInfo*) nint.Zero,
|
||||||
0,
|
0,
|
||||||
&sdlDepthStencilAttachmentInfo
|
&refreshDepthStencilAttachmentInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
var renderPass = Device.RenderPassPool.Obtain();
|
var renderPass = Device.RenderPassPool.Obtain();
|
||||||
|
@ -375,16 +375,16 @@ public class CommandBuffer
|
||||||
AssertSameSampleCount(colorAttachmentInfo.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
AssertSameSampleCount(colorAttachmentInfo.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[1];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[1];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfo.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfo.ToRefresh();
|
||||||
|
|
||||||
var sdlDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
var refreshDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
1,
|
1,
|
||||||
&sdlDepthStencilAttachmentInfo
|
&refreshDepthStencilAttachmentInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
var renderPass = Device.RenderPassPool.Obtain();
|
var renderPass = Device.RenderPassPool.Obtain();
|
||||||
|
@ -430,17 +430,17 @@ public class CommandBuffer
|
||||||
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[2];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[2];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
||||||
sdlColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
refreshColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
||||||
|
|
||||||
var sdlDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
var refreshDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
2,
|
2,
|
||||||
&sdlDepthStencilAttachmentInfo
|
&refreshDepthStencilAttachmentInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
var renderPass = Device.RenderPassPool.Obtain();
|
var renderPass = Device.RenderPassPool.Obtain();
|
||||||
|
@ -493,18 +493,18 @@ public class CommandBuffer
|
||||||
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[3];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[3];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
||||||
sdlColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
refreshColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
||||||
sdlColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
refreshColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
||||||
|
|
||||||
var sdlDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
var refreshDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
3,
|
3,
|
||||||
&sdlDepthStencilAttachmentInfo
|
&refreshDepthStencilAttachmentInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
var renderPass = Device.RenderPassPool.Obtain();
|
var renderPass = Device.RenderPassPool.Obtain();
|
||||||
|
@ -564,19 +564,19 @@ public class CommandBuffer
|
||||||
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
AssertSameSampleCount(colorAttachmentInfoOne.TextureSlice.Texture, depthStencilAttachmentInfo.TextureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[4];
|
var refreshColorAttachmentInfos = stackalloc Refresh.ColorAttachmentInfo[4];
|
||||||
sdlColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
refreshColorAttachmentInfos[0] = colorAttachmentInfoOne.ToRefresh();
|
||||||
sdlColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
refreshColorAttachmentInfos[1] = colorAttachmentInfoTwo.ToRefresh();
|
||||||
sdlColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
refreshColorAttachmentInfos[2] = colorAttachmentInfoThree.ToRefresh();
|
||||||
sdlColorAttachmentInfos[3] = colorAttachmentInfoFour.ToRefresh();
|
refreshColorAttachmentInfos[3] = colorAttachmentInfoFour.ToRefresh();
|
||||||
|
|
||||||
var sdlDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
var refreshDepthStencilAttachmentInfo = depthStencilAttachmentInfo.ToRefresh();
|
||||||
|
|
||||||
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
var renderPassHandle = Refresh.Refresh_BeginRenderPass(
|
||||||
Handle,
|
Handle,
|
||||||
sdlColorAttachmentInfos,
|
refreshColorAttachmentInfos,
|
||||||
4,
|
4,
|
||||||
&sdlDepthStencilAttachmentInfo
|
&refreshDepthStencilAttachmentInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
var renderPass = Device.RenderPassPool.Obtain();
|
var renderPass = Device.RenderPassPool.Obtain();
|
||||||
|
@ -650,11 +650,11 @@ public class CommandBuffer
|
||||||
computePassActive = true;
|
computePassActive = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureBinding = readWriteTextureBinding.ToRefresh();
|
var refreshTextureBinding = readWriteTextureBinding.ToRefresh();
|
||||||
|
|
||||||
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
||||||
Handle,
|
Handle,
|
||||||
&sdlTextureBinding,
|
&refreshTextureBinding,
|
||||||
1,
|
1,
|
||||||
(Refresh.StorageBufferReadWriteBinding*) nint.Size,
|
(Refresh.StorageBufferReadWriteBinding*) nint.Size,
|
||||||
0
|
0
|
||||||
|
@ -679,13 +679,13 @@ public class CommandBuffer
|
||||||
computePassActive = true;
|
computePassActive = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlBufferBinding = readWriteBufferBinding.ToRefresh();
|
var refreshBufferBinding = readWriteBufferBinding.ToRefresh();
|
||||||
|
|
||||||
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
||||||
Handle,
|
Handle,
|
||||||
(Refresh.StorageTextureReadWriteBinding*) nint.Zero,
|
(Refresh.StorageTextureReadWriteBinding*) nint.Zero,
|
||||||
0,
|
0,
|
||||||
&sdlBufferBinding,
|
&refreshBufferBinding,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -709,14 +709,14 @@ public class CommandBuffer
|
||||||
computePassActive = true;
|
computePassActive = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureBinding = readWriteTextureBinding.ToRefresh();
|
var refreshTextureBinding = readWriteTextureBinding.ToRefresh();
|
||||||
var sdlBufferBinding = readWriteBufferBinding.ToRefresh();
|
var refreshBufferBinding = readWriteBufferBinding.ToRefresh();
|
||||||
|
|
||||||
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
||||||
Handle,
|
Handle,
|
||||||
&sdlTextureBinding,
|
&refreshTextureBinding,
|
||||||
1,
|
1,
|
||||||
&sdlBufferBinding,
|
&refreshBufferBinding,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -740,19 +740,19 @@ public class CommandBuffer
|
||||||
computePassActive = true;
|
computePassActive = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureBindings = NativeMemory.Alloc(
|
var refreshTextureBindings = NativeMemory.Alloc(
|
||||||
(nuint) (readWriteTextureBindings.Length * Marshal.SizeOf<StorageTextureReadWriteBinding>())
|
(nuint) (readWriteTextureBindings.Length * Marshal.SizeOf<StorageTextureReadWriteBinding>())
|
||||||
);
|
);
|
||||||
|
|
||||||
var sdlBufferBindings = NativeMemory.Alloc(
|
var refreshBufferBindings = NativeMemory.Alloc(
|
||||||
(nuint) (readWriteBufferBindings.Length * Marshal.SizeOf<StorageBufferReadWriteBinding>())
|
(nuint) (readWriteBufferBindings.Length * Marshal.SizeOf<StorageBufferReadWriteBinding>())
|
||||||
);
|
);
|
||||||
|
|
||||||
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
var computePassHandle = Refresh.Refresh_BeginComputePass(
|
||||||
Handle,
|
Handle,
|
||||||
(Refresh.StorageTextureReadWriteBinding*) sdlTextureBindings,
|
(Refresh.StorageTextureReadWriteBinding*) refreshTextureBindings,
|
||||||
(uint) readWriteTextureBindings.Length,
|
(uint) readWriteTextureBindings.Length,
|
||||||
(Refresh.StorageBufferReadWriteBinding*) sdlBufferBindings,
|
(Refresh.StorageBufferReadWriteBinding*) refreshBufferBindings,
|
||||||
(uint) readWriteBufferBindings.Length
|
(uint) readWriteBufferBindings.Length
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -763,8 +763,8 @@ public class CommandBuffer
|
||||||
computePass.active = true;
|
computePass.active = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NativeMemory.Free(sdlTextureBindings);
|
NativeMemory.Free(refreshTextureBindings);
|
||||||
NativeMemory.Free(sdlBufferBindings);
|
NativeMemory.Free(refreshBufferBindings);
|
||||||
|
|
||||||
return computePass;
|
return computePass;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,12 +56,12 @@ public class ComputePass
|
||||||
AssertTextureHasComputeStorageReadFlag(textureSlice.Texture);
|
AssertTextureHasComputeStorageReadFlag(textureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureSlice = textureSlice.ToRefresh();
|
var refreshTextureSlice = textureSlice.ToRefresh();
|
||||||
|
|
||||||
Refresh.Refresh_BindComputeStorageTextures(
|
Refresh.Refresh_BindComputeStorageTextures(
|
||||||
Handle,
|
Handle,
|
||||||
slot,
|
slot,
|
||||||
&sdlTextureSlice,
|
&refreshTextureSlice,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using RefreshCS;
|
using RefreshCS;
|
||||||
using SDL2;
|
|
||||||
|
|
||||||
namespace MoonWorks.Graphics
|
namespace MoonWorks.Graphics
|
||||||
{
|
{
|
||||||
|
|
|
@ -117,12 +117,12 @@ public class RenderPass
|
||||||
AssertGraphicsPipelineBound();
|
AssertGraphicsPipelineBound();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlBufferBinding = bufferBinding.ToRefresh();
|
var refreshBufferBinding = bufferBinding.ToRefresh();
|
||||||
|
|
||||||
Refresh.Refresh_BindVertexBuffers(
|
Refresh.Refresh_BindVertexBuffers(
|
||||||
Handle,
|
Handle,
|
||||||
firstBinding,
|
firstBinding,
|
||||||
&sdlBufferBinding,
|
&refreshBufferBinding,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -163,12 +163,12 @@ public class RenderPass
|
||||||
AssertTextureHasSamplerFlag(textureSamplerBinding.Texture);
|
AssertTextureHasSamplerFlag(textureSamplerBinding.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureSamplerBinding = textureSamplerBinding.ToRefresh();
|
var refreshTextureSamplerBinding = textureSamplerBinding.ToRefresh();
|
||||||
|
|
||||||
Refresh.Refresh_BindVertexSamplers(
|
Refresh.Refresh_BindVertexSamplers(
|
||||||
Handle,
|
Handle,
|
||||||
slot,
|
slot,
|
||||||
&sdlTextureSamplerBinding,
|
&refreshTextureSamplerBinding,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -183,12 +183,12 @@ public class RenderPass
|
||||||
AssertTextureHasGraphicsStorageFlag(textureSlice.Texture);
|
AssertTextureHasGraphicsStorageFlag(textureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureSlice = textureSlice.ToRefresh();
|
var refreshTextureSlice = textureSlice.ToRefresh();
|
||||||
|
|
||||||
Refresh.Refresh_BindVertexStorageTextures(
|
Refresh.Refresh_BindVertexStorageTextures(
|
||||||
Handle,
|
Handle,
|
||||||
slot,
|
slot,
|
||||||
&sdlTextureSlice,
|
&refreshTextureSlice,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -223,12 +223,12 @@ public class RenderPass
|
||||||
AssertTextureHasSamplerFlag(textureSamplerBinding.Texture);
|
AssertTextureHasSamplerFlag(textureSamplerBinding.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureSamplerBinding = textureSamplerBinding.ToRefresh();
|
var refreshTextureSamplerBinding = textureSamplerBinding.ToRefresh();
|
||||||
|
|
||||||
Refresh.Refresh_BindFragmentSamplers(
|
Refresh.Refresh_BindFragmentSamplers(
|
||||||
Handle,
|
Handle,
|
||||||
slot,
|
slot,
|
||||||
&sdlTextureSamplerBinding,
|
&refreshTextureSamplerBinding,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -243,12 +243,12 @@ public class RenderPass
|
||||||
AssertTextureHasGraphicsStorageFlag(textureSlice.Texture);
|
AssertTextureHasGraphicsStorageFlag(textureSlice.Texture);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var sdlTextureSlice = textureSlice.ToRefresh();
|
var refreshTextureSlice = textureSlice.ToRefresh();
|
||||||
|
|
||||||
Refresh.Refresh_BindFragmentStorageTextures(
|
Refresh.Refresh_BindFragmentStorageTextures(
|
||||||
Handle,
|
Handle,
|
||||||
slot,
|
slot,
|
||||||
&sdlTextureSlice,
|
&refreshTextureSlice,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace MoonWorks.Graphics
|
||||||
ComputePipelineResourceInfo resourceInfo
|
ComputePipelineResourceInfo resourceInfo
|
||||||
) : base(device)
|
) : base(device)
|
||||||
{
|
{
|
||||||
var sdlComputePipelineCreateInfo = new Refresh.ComputePipelineCreateInfo
|
var refreshComputePipelineCreateInfo = new Refresh.ComputePipelineCreateInfo
|
||||||
{
|
{
|
||||||
ComputeShader = computeShader.Handle,
|
ComputeShader = computeShader.Handle,
|
||||||
PipelineResourceInfo = resourceInfo.ToRefresh()
|
PipelineResourceInfo = resourceInfo.ToRefresh()
|
||||||
|
@ -26,7 +26,7 @@ namespace MoonWorks.Graphics
|
||||||
|
|
||||||
Handle = Refresh.Refresh_CreateComputePipeline(
|
Handle = Refresh.Refresh_CreateComputePipeline(
|
||||||
device.Handle,
|
device.Handle,
|
||||||
sdlComputePipelineCreateInfo
|
refreshComputePipelineCreateInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Handle == IntPtr.Zero)
|
if (Handle == IntPtr.Zero)
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace MoonWorks.Graphics
|
||||||
in GraphicsPipelineCreateInfo graphicsPipelineCreateInfo
|
in GraphicsPipelineCreateInfo graphicsPipelineCreateInfo
|
||||||
) : base(device)
|
) : base(device)
|
||||||
{
|
{
|
||||||
Refresh.GraphicsPipelineCreateInfo sdlGraphicsPipelineCreateInfo;
|
Refresh.GraphicsPipelineCreateInfo refreshGraphicsPipelineCreateInfo;
|
||||||
|
|
||||||
var vertexAttributes = (Refresh.VertexAttribute*) NativeMemory.Alloc(
|
var vertexAttributes = (Refresh.VertexAttribute*) NativeMemory.Alloc(
|
||||||
(nuint) (graphicsPipelineCreateInfo.VertexInputState.VertexAttributes.Length * Marshal.SizeOf<Refresh.VertexAttribute>())
|
(nuint) (graphicsPipelineCreateInfo.VertexInputState.VertexAttributes.Length * Marshal.SizeOf<Refresh.VertexAttribute>())
|
||||||
|
@ -55,34 +55,34 @@ namespace MoonWorks.Graphics
|
||||||
colorAttachmentDescriptions[i].BlendState = graphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentDescriptions[i].BlendState.ToRefresh();
|
colorAttachmentDescriptions[i].BlendState = graphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentDescriptions[i].BlendState.ToRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
sdlGraphicsPipelineCreateInfo.VertexShader = graphicsPipelineCreateInfo.VertexShader.Handle;
|
refreshGraphicsPipelineCreateInfo.VertexShader = graphicsPipelineCreateInfo.VertexShader.Handle;
|
||||||
sdlGraphicsPipelineCreateInfo.FragmentShader = graphicsPipelineCreateInfo.FragmentShader.Handle;
|
refreshGraphicsPipelineCreateInfo.FragmentShader = graphicsPipelineCreateInfo.FragmentShader.Handle;
|
||||||
|
|
||||||
sdlGraphicsPipelineCreateInfo.VertexInputState.VertexAttributes = vertexAttributes;
|
refreshGraphicsPipelineCreateInfo.VertexInputState.VertexAttributes = vertexAttributes;
|
||||||
sdlGraphicsPipelineCreateInfo.VertexInputState.VertexAttributeCount = (uint) graphicsPipelineCreateInfo.VertexInputState.VertexAttributes.Length;
|
refreshGraphicsPipelineCreateInfo.VertexInputState.VertexAttributeCount = (uint) graphicsPipelineCreateInfo.VertexInputState.VertexAttributes.Length;
|
||||||
sdlGraphicsPipelineCreateInfo.VertexInputState.VertexBindings = vertexBindings;
|
refreshGraphicsPipelineCreateInfo.VertexInputState.VertexBindings = vertexBindings;
|
||||||
sdlGraphicsPipelineCreateInfo.VertexInputState.VertexBindingCount = (uint) graphicsPipelineCreateInfo.VertexInputState.VertexBindings.Length;
|
refreshGraphicsPipelineCreateInfo.VertexInputState.VertexBindingCount = (uint) graphicsPipelineCreateInfo.VertexInputState.VertexBindings.Length;
|
||||||
|
|
||||||
sdlGraphicsPipelineCreateInfo.PrimitiveType = (Refresh.PrimitiveType) graphicsPipelineCreateInfo.PrimitiveType;
|
refreshGraphicsPipelineCreateInfo.PrimitiveType = (Refresh.PrimitiveType) graphicsPipelineCreateInfo.PrimitiveType;
|
||||||
|
|
||||||
sdlGraphicsPipelineCreateInfo.RasterizerState = graphicsPipelineCreateInfo.RasterizerState.ToRefresh();
|
refreshGraphicsPipelineCreateInfo.RasterizerState = graphicsPipelineCreateInfo.RasterizerState.ToRefresh();
|
||||||
sdlGraphicsPipelineCreateInfo.MultisampleState = graphicsPipelineCreateInfo.MultisampleState.ToRefresh();
|
refreshGraphicsPipelineCreateInfo.MultisampleState = graphicsPipelineCreateInfo.MultisampleState.ToRefresh();
|
||||||
sdlGraphicsPipelineCreateInfo.DepthStencilState = graphicsPipelineCreateInfo.DepthStencilState.ToRefresh();
|
refreshGraphicsPipelineCreateInfo.DepthStencilState = graphicsPipelineCreateInfo.DepthStencilState.ToRefresh();
|
||||||
|
|
||||||
sdlGraphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentCount = (uint) graphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentDescriptions.Length;
|
refreshGraphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentCount = (uint) graphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentDescriptions.Length;
|
||||||
sdlGraphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentDescriptions = colorAttachmentDescriptions;
|
refreshGraphicsPipelineCreateInfo.AttachmentInfo.ColorAttachmentDescriptions = colorAttachmentDescriptions;
|
||||||
sdlGraphicsPipelineCreateInfo.AttachmentInfo.DepthStencilFormat = (Refresh.TextureFormat) graphicsPipelineCreateInfo.AttachmentInfo.DepthStencilFormat;
|
refreshGraphicsPipelineCreateInfo.AttachmentInfo.DepthStencilFormat = (Refresh.TextureFormat) graphicsPipelineCreateInfo.AttachmentInfo.DepthStencilFormat;
|
||||||
sdlGraphicsPipelineCreateInfo.AttachmentInfo.HasDepthStencilAttachment = Conversions.BoolToInt(graphicsPipelineCreateInfo.AttachmentInfo.HasDepthStencilAttachment);
|
refreshGraphicsPipelineCreateInfo.AttachmentInfo.HasDepthStencilAttachment = Conversions.BoolToInt(graphicsPipelineCreateInfo.AttachmentInfo.HasDepthStencilAttachment);
|
||||||
|
|
||||||
sdlGraphicsPipelineCreateInfo.VertexResourceInfo = graphicsPipelineCreateInfo.VertexShaderResourceInfo.ToRefresh();
|
refreshGraphicsPipelineCreateInfo.VertexResourceInfo = graphicsPipelineCreateInfo.VertexShaderResourceInfo.ToRefresh();
|
||||||
sdlGraphicsPipelineCreateInfo.FragmentResourceInfo = graphicsPipelineCreateInfo.FragmentShaderResourceInfo.ToRefresh();
|
refreshGraphicsPipelineCreateInfo.FragmentResourceInfo = graphicsPipelineCreateInfo.FragmentShaderResourceInfo.ToRefresh();
|
||||||
|
|
||||||
sdlGraphicsPipelineCreateInfo.BlendConstants[0] = graphicsPipelineCreateInfo.BlendConstants.R;
|
refreshGraphicsPipelineCreateInfo.BlendConstants[0] = graphicsPipelineCreateInfo.BlendConstants.R;
|
||||||
sdlGraphicsPipelineCreateInfo.BlendConstants[1] = graphicsPipelineCreateInfo.BlendConstants.G;
|
refreshGraphicsPipelineCreateInfo.BlendConstants[1] = graphicsPipelineCreateInfo.BlendConstants.G;
|
||||||
sdlGraphicsPipelineCreateInfo.BlendConstants[2] = graphicsPipelineCreateInfo.BlendConstants.B;
|
refreshGraphicsPipelineCreateInfo.BlendConstants[2] = graphicsPipelineCreateInfo.BlendConstants.B;
|
||||||
sdlGraphicsPipelineCreateInfo.BlendConstants[3] = graphicsPipelineCreateInfo.BlendConstants.A;
|
refreshGraphicsPipelineCreateInfo.BlendConstants[3] = graphicsPipelineCreateInfo.BlendConstants.A;
|
||||||
|
|
||||||
Handle = Refresh.Refresh_CreateGraphicsPipeline(device.Handle, sdlGraphicsPipelineCreateInfo);
|
Handle = Refresh.Refresh_CreateGraphicsPipeline(device.Handle, refreshGraphicsPipelineCreateInfo);
|
||||||
if (Handle == IntPtr.Zero)
|
if (Handle == IntPtr.Zero)
|
||||||
{
|
{
|
||||||
throw new Exception("Could not create graphics pipeline!");
|
throw new Exception("Could not create graphics pipeline!");
|
||||||
|
|
Loading…
Reference in New Issue