forked from MoonsideGames/MoonWorks
move uniform pushes to pipeline
parent
0daf548fd3
commit
29a86c2040
|
@ -1 +1 @@
|
|||
Subproject commit fcb16a6121f556b2aebfbb7e72b71e94041dc1d1
|
||||
Subproject commit a92549a91395900f30fe9010dfe86e19fedd4e85
|
|
@ -69,21 +69,6 @@ namespace MoonWorks.Graphics
|
|||
);
|
||||
}
|
||||
|
||||
public unsafe uint PushComputeShaderUniforms<T>(
|
||||
params T[] uniforms
|
||||
) where T : unmanaged
|
||||
{
|
||||
fixed (T* ptr = &uniforms[0])
|
||||
{
|
||||
return Refresh.Refresh_PushComputeShaderUniforms(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
(IntPtr) ptr,
|
||||
(uint) (uniforms.Length * Marshal.SizeOf<T>())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe void BindComputeBuffers(
|
||||
params Buffer[] buffers
|
||||
) {
|
||||
|
@ -128,36 +113,6 @@ namespace MoonWorks.Graphics
|
|||
);
|
||||
}
|
||||
|
||||
public unsafe uint PushVertexShaderUniforms<T>(
|
||||
params T[] uniforms
|
||||
) where T : unmanaged
|
||||
{
|
||||
fixed (T* ptr = &uniforms[0])
|
||||
{
|
||||
return Refresh.Refresh_PushVertexShaderUniforms(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
(IntPtr) ptr,
|
||||
(uint) (uniforms.Length * Marshal.SizeOf<T>())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe uint PushFragmentShaderUniforms<T>(
|
||||
params T[] uniforms
|
||||
) where T : unmanaged
|
||||
{
|
||||
fixed (T* ptr = &uniforms[0])
|
||||
{
|
||||
return Refresh.Refresh_PushFragmentShaderUniforms(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
(IntPtr) ptr,
|
||||
(uint) (uniforms.Length * Marshal.SizeOf<T>())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe void BindVertexBuffers(
|
||||
uint firstBinding,
|
||||
params BufferBinding[] bufferBindings
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using RefreshCS;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace MoonWorks.Graphics
|
||||
{
|
||||
|
@ -39,5 +40,20 @@ namespace MoonWorks.Graphics
|
|||
|
||||
ComputeShaderState = computeShaderState;
|
||||
}
|
||||
|
||||
public unsafe uint PushComputeShaderUniforms<T>(
|
||||
params T[] uniforms
|
||||
) where T : unmanaged
|
||||
{
|
||||
fixed (T* ptr = &uniforms[0])
|
||||
{
|
||||
return Refresh.Refresh_PushComputeShaderUniforms(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
(IntPtr) ptr,
|
||||
(uint) (uniforms.Length * Marshal.SizeOf<T>())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,5 +124,35 @@ namespace MoonWorks.Graphics
|
|||
FragmentShaderState = fragmentShaderState;
|
||||
RenderPass = renderPass;
|
||||
}
|
||||
|
||||
public unsafe uint PushVertexShaderUniforms<T>(
|
||||
params T[] uniforms
|
||||
) where T : unmanaged
|
||||
{
|
||||
fixed (T* ptr = &uniforms[0])
|
||||
{
|
||||
return Refresh.Refresh_PushVertexShaderUniforms(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
(IntPtr) ptr,
|
||||
(uint) (uniforms.Length * Marshal.SizeOf<T>())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe uint PushFragmentShaderUniforms<T>(
|
||||
params T[] uniforms
|
||||
) where T : unmanaged
|
||||
{
|
||||
fixed (T* ptr = &uniforms[0])
|
||||
{
|
||||
return Refresh.Refresh_PushFragmentShaderUniforms(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
(IntPtr) ptr,
|
||||
(uint) (uniforms.Length * Marshal.SizeOf<T>())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue