D3D11 support
parent
019afa91f5
commit
c84752f38c
|
@ -1 +1 @@
|
|||
Subproject commit 86cc5fa1422c8b79c436c4e4fc345114e9615dbb
|
||||
Subproject commit 7465d4d4de1a0f2c5de5a2d0b3240671e83776d1
|
|
@ -53,6 +53,7 @@ namespace MoonWorks
|
|||
public Game(
|
||||
WindowCreateInfo windowCreateInfo,
|
||||
FrameLimiterSettings frameLimiterSettings,
|
||||
Backend backend = Backend.Vulkan,
|
||||
int targetTimestep = 60,
|
||||
bool debugMode = false
|
||||
)
|
||||
|
@ -82,7 +83,7 @@ namespace MoonWorks
|
|||
|
||||
Logger.LogInfo("Initializing graphics device...");
|
||||
GraphicsDevice = new GraphicsDevice(
|
||||
Backend.Vulkan,
|
||||
backend,
|
||||
debugMode
|
||||
);
|
||||
|
||||
|
|
|
@ -2087,94 +2087,6 @@ namespace MoonWorks.Graphics
|
|||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the contents of a Texture to a GpuBuffer.
|
||||
/// This copy occurs on the GPU timeline.
|
||||
///
|
||||
/// You MAY assume that the copy has finished in subsequent commands.
|
||||
/// </summary>
|
||||
public void CopyTextureToBuffer(
|
||||
in TextureRegion textureRegion,
|
||||
GpuBuffer buffer,
|
||||
in BufferImageCopy copyParams,
|
||||
WriteOptions option
|
||||
) {
|
||||
#if DEBUG
|
||||
AssertNotSubmitted();
|
||||
AssertInCopyPass("Cannot download from texture outside of copy pass!");
|
||||
AssertBufferBoundsCheck(buffer.Size, copyParams.BufferOffset, textureRegion.Size);
|
||||
#endif
|
||||
|
||||
Refresh.Refresh_CopyTextureToBuffer(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
textureRegion.ToRefreshTextureRegion(),
|
||||
buffer.Handle,
|
||||
copyParams.ToRefresh(),
|
||||
(Refresh.WriteOptions) option
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the entire contents of a Texture to a GpuBuffer.
|
||||
/// </summary>
|
||||
public void CopyTextureToBuffer(
|
||||
Texture texture,
|
||||
GpuBuffer buffer,
|
||||
WriteOptions option
|
||||
) {
|
||||
CopyTextureToBuffer(
|
||||
new TextureRegion(texture),
|
||||
buffer,
|
||||
new BufferImageCopy(0, 0, 0),
|
||||
option
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the contents of a GpuBuffer to a Texture.
|
||||
/// This copy occurs on the GPU timeline.
|
||||
///
|
||||
/// You MAY assume that the copy has finished in subsequent commands.
|
||||
/// </summary>
|
||||
public void CopyBufferToTexture(
|
||||
GpuBuffer gpuBuffer,
|
||||
in TextureRegion textureRegion,
|
||||
in BufferImageCopy copyParams,
|
||||
WriteOptions option
|
||||
) {
|
||||
#if DEBUG
|
||||
AssertNotSubmitted();
|
||||
AssertInCopyPass("Cannot download from texture outside of copy pass!");
|
||||
AssertBufferBoundsCheck(gpuBuffer.Size, copyParams.BufferOffset, textureRegion.Size);
|
||||
#endif
|
||||
|
||||
Refresh.Refresh_CopyBufferToTexture(
|
||||
Device.Handle,
|
||||
Handle,
|
||||
gpuBuffer.Handle,
|
||||
textureRegion.ToRefreshTextureRegion(),
|
||||
copyParams.ToRefresh(),
|
||||
(Refresh.WriteOptions) option
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the entire contents of a Texture with no mips to a GpuBuffer.
|
||||
/// </summary>
|
||||
public void CopyBufferToTexture(
|
||||
GpuBuffer buffer,
|
||||
Texture texture,
|
||||
WriteOptions option
|
||||
) {
|
||||
CopyBufferToTexture(
|
||||
buffer,
|
||||
new TextureRegion(texture),
|
||||
new BufferImageCopy(0, 0, 0),
|
||||
option
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies data from a GpuBuffer to another GpuBuffer.
|
||||
/// This copy occurs on the GPU timeline.
|
||||
|
|
|
@ -313,6 +313,7 @@ namespace MoonWorks.Graphics
|
|||
{
|
||||
DontCare,
|
||||
Vulkan,
|
||||
D3D11,
|
||||
PS5,
|
||||
Invalid
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue