// d3dumddi.h
typedef struct _D3DDDICB_SUBMITCOMMAND {
D3DGPU_VIRTUAL_ADDRESS Commands;
UINT CommandLength;
D3DDDICB_SUBMITCOMMANDFLAGS Flags;
UINT BroadcastContextCount;
HANDLE BroadcastContext[D3DDDI_MAX_BROADCAST_CONTEXT];
VOID *pPrivateDriverData;
UINT PrivateDriverDataSize;
UINT NumPrimaries;
D3DKMT_HANDLE WrittenPrimaries[D3DDDI_MAX_WRITTEN_PRIMARIES];
D3DDDI_MARKERLOGTYPE MarkerLogType;
UINT RenderCBSequence;
union {
struct {
UINT FirstAPISequenceNumberHigh;
UINT CompletedAPISequenceNumberLow0Size;
UINT CompletedAPISequenceNumberLow1Size;
UINT BegunAPISequenceNumberLow0Size;
UINT BegunAPISequenceNumberLow1Size;
};
UINT BatchedMarkerDataCount;
};
union {
struct {
const UINT *pCompletedAPISequenceNumberLow0;
const UINT *pCompletedAPISequenceNumberLow1;
const UINT *pBegunAPISequenceNumberLow0;
const UINT *pBegunAPISequenceNumberLow1;
};
const D3DDDI_BATCHEDMARKERDATA *pBatchedMarkerData;
};
UINT Reserved;
UINT NumHistoryBuffers;
D3DKMT_HANDLE *HistoryBufferArray;
HANDLE hSyncToken;
void *pReserved;
} D3DDDICB_SUBMITCOMMAND;
View the official Windows Driver Kit DDI referenceNo description available.
The D3DDDICB_SUBMITCOMMAND structure is used to submit command buffers on contexts that support graphics processing unit (GPU) virtual addressing.
CommandsGPU virtual address to the commands being submitted to the context for execution. This information is provided to the kernel mode driver during command submission and is also used for debugging purposes.
CommandLengthSpecifies the length, in bytes, of the commands being submitted to the GPU. This information is provided to the kernel mode driver during command submission and is also used for debugging purposes.
FlagsAn instance of the D3DDDICB_SUBMITCOMMANDFLAGS structure.
BroadcastContextCountSpecifies the number of context these command should be submitted to. This count must be at least 1.
BroadcastContext[D3DDDI_MAX_BROADCAST_CONTEXT]Specifies the handle of the context to execute the specified commands.
pPrivateDriverDataPointer to driver private data to be passed to the kernel mode driver as part of this submission.
PrivateDriverDataSizeSize of the private driver data information being passed. This size must be smaller than the size requested by the kernel mode driver for submission private driver data.
NumPrimariesSpecifies the number of primaries and swapchain back buffers being written to by the submitted commands. This is equal to the number of allocations in the WrittenPrimaries array.
WrittenPrimaries[D3DDDI_MAX_WRITTEN_PRIMARIES]Arrays of handle to the primaries and swapchain back buffers being written to by the submitted commands.
MarkerLogTypeA D3DDDI_MARKERLOGTYPE enumeration that indicates the type of marker in the Event Tracing for Windows (ETW) log that the user-mode display driver supports.
RenderCBSequenceA unique identifier for each pfnRenderCb function call. Starts at a value of 1 for contexts associated with single-threaded user-mode DDIs and ranges to a value of 0x80000001 for contexts associated with free-threaded user mode DDIs. The user-mode display driver must increment the value for each pfnRenderCb call it makes on any engine.
FirstAPISequenceNumberHighUsed by the driver to pass the context's API sequence number.
CompletedAPISequenceNumberLow0SizeUsed by the driver to pass the context's API sequence number.
CompletedAPISequenceNumberLow1SizeUsed by the driver to pass the context's API sequence number.
BegunAPISequenceNumberLow0SizeUsed by the driver to pass the context's API sequence number.
BegunAPISequenceNumberLow1SizeUsed by the driver to pass the context's API sequence number.
BatchedMarkerDataCountUsed by the driver to pass the context's batched marker data count.
pCompletedAPISequenceNumberLow0A pointer used by the driver to pass the context's API sequence number.
pCompletedAPISequenceNumberLow1A pointer used by the driver to pass the context's API sequence number.
pBegunAPISequenceNumberLow0A pointer used by the driver to pass the context's API sequence number.
pBegunAPISequenceNumberLow1A pointer used by the driver to pass the context's API sequence number.
pBatchedMarkerDataA pointer used by the driver to pass the context's batched marker data.
ReservedThis member is reserved and should be set to zero.
NumHistoryBuffersThe number of history buffers.
HistoryBufferArrayA pointer to the array of history buffers.
hSyncTokenpReservedThe pfnSubmitCommandCb code path no longer provides an allocation list for the user mode driver to provide a list of allocations that will be read and written to during this command. However, it is necessary to synchronize some writes that would not normally be known without the allocation list. For this, a new small allocation list specifically for surfaces which will be written to and used for displaying content. The WrittenPrimaries array should be used to provide such allocations.
Despite the name, WrittenPrimaries must contain allocations that are considered SwapChainBackBuffer allocations according to the runtime in addition to the primaries. This is exposed to the user mode driver by a new flag in D3D10_DDI_RESOURCE_MISC_FLAG. The runtime will provide the D3DWDDM2_0DDI_RESOURCE_MISC_DISPLAYABLE_SURFACE flag to the user mode driver during calls to create a resource or heap that is created as a FlipEx swapchain or primary. The driver may use this flag to determine all allocations that should be put in the WrittenPrimaries list for Microsoft Direct3D 11. Other runtimes have not changed.
If the driver receives a call to CreateResource that has this flag, the allocation should be added to this list on every pfnSubmitCommandCb call that writes to the surface.