-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Direct3D12] - Lot of raytracing bindings and improvements.
- Loading branch information
1 parent
0b63f0b
commit ea17b58
Showing
32 changed files
with
446 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/Vortice.Direct3D12/BuildRaytracingAccelerationStructureDescription.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) Amer Koleci and contributors. | ||
// Distributed under the MIT license. See the LICENSE file in the project root for more information. | ||
|
||
namespace Vortice.Direct3D12 | ||
{ | ||
/// <summary> | ||
/// Describes a raytracing acceleration structure. Pass this structure into <see cref="ID3D12GraphicsCommandList4.BuildRaytracingAccelerationStructure(BuildRaytracingAccelerationStructureDescription)"/> to describe the acceleration structure to be built. | ||
/// </summary> | ||
public partial struct BuildRaytracingAccelerationStructureDescription | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="BuildRaytracingAccelerationStructureDescription"/> struct. | ||
/// </summary> | ||
/// <param name="destinationAccelerationStructureData"> | ||
/// Location to store resulting acceleration structure. <see cref="ID3D12Device5.GetRaytracingAccelerationStructurePrebuildInfo(BuildRaytracingAccelerationStructureInputs)"/> reports the amount of memory required for the result here given a set of acceleration structure build parameters. | ||
/// The address must be aligned to 256 bytes, defined as <see cref="RaytracingAccelerationStructureByteAlignment"/>. | ||
/// The memory pointed to must be in state <see cref="ResourceStates.RaytracingAccelerationStructure"/>. | ||
/// </param> | ||
/// <param name="inputs">Description of the input data for the acceleration structure build. This is data is stored in a separate structure because it is also used with <see cref="ID3D12Device5.GetRaytracingAccelerationStructurePrebuildInfo(BuildRaytracingAccelerationStructureInputs)"/>.</param> | ||
/// <param name="sourceAccelerationStructureData">Address of an existing acceleration structure if an acceleration structure update (an incremental build) is being requested, by setting <see cref="RaytracingAccelerationStructureBuildFlags.PerformUpdate"/> in the Flags parameter. Otherwise this address must be 0.</param> | ||
/// <param name="scratchAccelerationStructureData">Location where the build will store temporary data. <see cref="ID3D12Device5.GetRaytracingAccelerationStructurePrebuildInfo(BuildRaytracingAccelerationStructureInputs)"/> reports the amount of scratch memory the implementation will need for a given set of acceleration structure build parameters.</param> | ||
public BuildRaytracingAccelerationStructureDescription( | ||
ulong destinationAccelerationStructureData, | ||
BuildRaytracingAccelerationStructureInputs inputs, | ||
ulong sourceAccelerationStructureData, | ||
ulong scratchAccelerationStructureData) | ||
{ | ||
DestinationAccelerationStructureData = destinationAccelerationStructureData; | ||
Inputs = inputs; | ||
SourceAccelerationStructureData = sourceAccelerationStructureData; | ||
ScratchAccelerationStructureData = scratchAccelerationStructureData; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Amer Koleci and contributors. | ||
// Distributed under the MIT license. See the LICENSE file in the project root for more information. | ||
|
||
namespace Vortice.Direct3D12 | ||
{ | ||
/// <summary> | ||
/// Describes a GPU virtual address and indexing stride. | ||
/// </summary> | ||
public partial struct GpuVirtualAddressAndStride | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="GpuVirtualAddressAndStride"/> struct. | ||
/// </summary> | ||
/// <param name="startAddress">The beginning of the virtual address range.</param> | ||
/// <param name="strideInBytes">Defines indexing stride, such as for vertices. Only the bottom 32 bits are used. The field is 64 bits to make alignment of containing structures consistent everywhere.</param> | ||
public GpuVirtualAddressAndStride(ulong startAddress, ulong strideInBytes) | ||
{ | ||
StartAddress = startAddress; | ||
StrideInBytes = strideInBytes; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Amer Koleci and contributors. | ||
// Distributed under the MIT license. See the LICENSE file in the project root for more information. | ||
|
||
namespace Vortice.Direct3D12 | ||
{ | ||
/// <summary> | ||
/// Describes a GPU virtual address range. | ||
/// </summary> | ||
public partial struct GpuVirtualAddressRange | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="GpuVirtualAddressRange"/> struct. | ||
/// </summary> | ||
/// <param name="startAddress">The beginning of the virtual address range.</param> | ||
/// <param name="sizeInBytes">The size of the virtual address range, in bytes.</param> | ||
public GpuVirtualAddressRange(ulong startAddress, ulong sizeInBytes) | ||
{ | ||
StartAddress = startAddress; | ||
SizeInBytes = sizeInBytes; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Amer Koleci and contributors. | ||
// Distributed under the MIT license. See the LICENSE file in the project root for more information. | ||
|
||
namespace Vortice.Direct3D12 | ||
{ | ||
/// <summary> | ||
/// Describes a GPU virtual address range and stride. | ||
/// </summary> | ||
public partial struct GpuVirtualAddressRangeAndStride | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="GpuVirtualAddressRangeAndStride"/> struct. | ||
/// </summary> | ||
/// <param name="startAddress">The beginning of the virtual address range.</param> | ||
/// <param name="sizeInBytes">The size of the virtual address range, in bytes.</param> | ||
/// <param name="strideInBytes">Defines the record-indexing stride within the memory range.</param> | ||
public GpuVirtualAddressRangeAndStride(ulong startAddress, ulong sizeInBytes, ulong strideInBytes) | ||
{ | ||
StartAddress = startAddress; | ||
SizeInBytes = sizeInBytes; | ||
StrideInBytes = strideInBytes; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.