Documentation
¶
Overview ¶
Package d3d12 provides low-level Direct3D 12 COM bindings for Windows.
This package uses syscall to directly call D3D12 COM vtable methods, providing a zero-CGO approach to GPU programming on Windows.
Architecture ¶
D3D12 uses COM (Component Object Model) interfaces. Each interface is represented as a Go struct containing a pointer to a vtable. The vtable contains function pointers for all methods.
type ID3D12Device struct {
vtbl *id3d12DeviceVtbl
}
Usage ¶
lib, err := d3d12.LoadD3D12()
if err != nil {
log.Fatal(err)
}
device, err := lib.CreateDevice(nil, D3D_FEATURE_LEVEL_12_0)
if err != nil {
log.Fatal(err)
}
defer device.Release()
queue, err := device.CreateCommandQueue(&D3D12_COMMAND_QUEUE_DESC{
Type: D3D12_COMMAND_LIST_TYPE_DIRECT,
})
if err != nil {
log.Fatal(err)
}
defer queue.Release()
Error Handling ¶
All COM methods that return HRESULT are wrapped to return Go errors. Use HRESULTError to get the underlying error code.
if err != nil {
if hr, ok := err.(HRESULTError); ok {
fmt.Printf("HRESULT: 0x%08X\n", uint32(hr))
}
}
Memory Management ¶
COM objects use reference counting. Call Release() when done:
device, _ := lib.CreateDevice(...) defer device.Release()
References ¶
- D3D12 API Reference: https://learn.microsoft.com/en-us/windows/win32/api/_direct3d12/
- gonutz/d3d9: https://github.com/gonutz/d3d9 (pattern reference)
Index ¶
- Constants
- Variables
- func AutoBreadcrumbOpName(op D3D12AutoBreadcrumbOp) string
- func Failed(hr int32) bool
- func Succeeded(hr int32) bool
- type D3D12AutoBreadcrumbNode1
- type D3D12AutoBreadcrumbOp
- type D3D12DREDAllocationNode1
- type D3D12DREDAutoBreadcrumbsOutput1
- type D3D12DREDEnablement
- type D3D12DREDPageFaultOutput1
- type D3D12Lib
- func (lib *D3D12Lib) CreateDevice(adapter unsafe.Pointer, minFeatureLevel D3D_FEATURE_LEVEL) (*ID3D12Device, error)
- func (lib *D3D12Lib) GetDREDSettings() (*ID3D12DeviceRemovedExtendedDataSettings, error)
- func (lib *D3D12Lib) GetDebugInterface() (*ID3D12Debug, error)
- func (lib *D3D12Lib) GetDebugInterface1() (*ID3D12Debug1, error)
- func (lib *D3D12Lib) GetDebugInterface3() (*ID3D12Debug3, error)
- func (lib *D3D12Lib) SerializeRootSignature(desc *D3D12_ROOT_SIGNATURE_DESC, version D3D12_ROOT_SIGNATURE_VERSION) (*ID3DBlob, *ID3DBlob, error)
- type D3D12Message
- type D3D12MessageSeverity
- type D3D12_BLEND
- type D3D12_BLEND_DESC
- type D3D12_BLEND_OP
- type D3D12_BOX
- type D3D12_CACHED_PIPELINE_STATE
- type D3D12_CLEAR_FLAGS
- type D3D12_CLEAR_VALUE
- type D3D12_COLOR_WRITE_ENABLE
- type D3D12_COMMAND_LIST_TYPE
- type D3D12_COMMAND_QUEUE_DESC
- type D3D12_COMMAND_QUEUE_FLAGS
- type D3D12_COMMAND_QUEUE_PRIORITY
- type D3D12_COMMAND_SIGNATURE_DESC
- type D3D12_COMPARISON_FUNC
- type D3D12_COMPUTE_PIPELINE_STATE_DESC
- type D3D12_CONSERVATIVE_RASTERIZATION_MODE
- type D3D12_CONSTANT_BUFFER_VIEW_DESC
- type D3D12_CPU_DESCRIPTOR_HANDLE
- type D3D12_CPU_PAGE_PROPERTY
- type D3D12_CULL_MODE
- type D3D12_DEPTH_STENCILOP_DESC
- type D3D12_DEPTH_STENCIL_DESC
- type D3D12_DEPTH_STENCIL_VALUE
- type D3D12_DEPTH_STENCIL_VIEW_DESC
- type D3D12_DEPTH_WRITE_MASK
- type D3D12_DESCRIPTOR_HEAP_DESC
- type D3D12_DESCRIPTOR_HEAP_FLAGS
- type D3D12_DESCRIPTOR_HEAP_TYPE
- type D3D12_DESCRIPTOR_RANGE
- type D3D12_DESCRIPTOR_RANGE_TYPE
- type D3D12_DISCARD_REGION
- type D3D12_DISPATCH_ARGUMENTS
- type D3D12_DRAW_ARGUMENTS
- type D3D12_DRAW_INDEXED_ARGUMENTS
- type D3D12_DSV_DIMENSION
- type D3D12_DSV_FLAGS
- type D3D12_FEATURE
- type D3D12_FEATURE_DATA_D3D12_OPTIONS
- type D3D12_FEATURE_DATA_FEATURE_LEVELS
- type D3D12_FEATURE_DATA_SHADER_MODEL
- type D3D12_FENCE_FLAGS
- type D3D12_FILL_MODE
- type D3D12_FILTER
- type D3D12_GPU_DESCRIPTOR_HANDLE
- type D3D12_GRAPHICS_PIPELINE_STATE_DESC
- type D3D12_HEAP_DESC
- type D3D12_HEAP_FLAGS
- type D3D12_HEAP_PROPERTIES
- type D3D12_HEAP_TYPE
- type D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
- type D3D12_INDEX_BUFFER_VIEW
- type D3D12_INDIRECT_ARGUMENT_DESC
- type D3D12_INDIRECT_ARGUMENT_TYPE
- type D3D12_INPUT_CLASSIFICATION
- type D3D12_INPUT_ELEMENT_DESC
- type D3D12_INPUT_LAYOUT_DESC
- type D3D12_LOGIC_OP
- type D3D12_MEMORY_POOL
- type D3D12_PIPELINE_STATE_FLAGS
- type D3D12_PLACED_SUBRESOURCE_FOOTPRINT
- type D3D12_PREDICATION_OP
- type D3D12_PRIMITIVE_TOPOLOGY_TYPE
- type D3D12_QUERY_DATA_PIPELINE_STATISTICS
- type D3D12_QUERY_DATA_SO_STATISTICS
- type D3D12_QUERY_HEAP_DESC
- type D3D12_QUERY_HEAP_TYPE
- type D3D12_QUERY_TYPE
- type D3D12_RANGE
- type D3D12_RASTERIZER_DESC
- type D3D12_RECT
- type D3D12_RENDER_PASS_BEGINNING_ACCESS
- type D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS
- type D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE
- type D3D12_RENDER_PASS_DEPTH_STENCIL_DESC
- type D3D12_RENDER_PASS_ENDING_ACCESS
- type D3D12_RENDER_PASS_ENDING_ACCESS_TYPE
- type D3D12_RENDER_PASS_FLAGS
- type D3D12_RENDER_PASS_RENDER_TARGET_DESC
- type D3D12_RENDER_TARGET_BLEND_DESC
- type D3D12_RENDER_TARGET_VIEW_DESC
- func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture1D(mipSlice uint32)
- func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture2D(mipSlice, planeSlice uint32)
- func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture2DArray(mipSlice, firstArraySlice, arraySize, planeSlice uint32)
- func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture3D(mipSlice, firstWSlice, wSize uint32)
- type D3D12_RESOURCE_ALIASING_BARRIER
- type D3D12_RESOURCE_ALLOCATION_INFO
- type D3D12_RESOURCE_BARRIER
- type D3D12_RESOURCE_BARRIER_FLAGS
- type D3D12_RESOURCE_BARRIER_TYPE
- type D3D12_RESOURCE_DESC
- type D3D12_RESOURCE_DIMENSION
- type D3D12_RESOURCE_FLAGS
- type D3D12_RESOURCE_STATES
- type D3D12_RESOURCE_TRANSITION_BARRIER
- type D3D12_RESOURCE_UAV_BARRIER
- type D3D12_ROOT_CONSTANTS
- type D3D12_ROOT_DESCRIPTOR
- type D3D12_ROOT_DESCRIPTOR_TABLE
- type D3D12_ROOT_PARAMETER
- type D3D12_ROOT_PARAMETER_TYPE
- type D3D12_ROOT_SIGNATURE_DESC
- type D3D12_ROOT_SIGNATURE_FLAGS
- type D3D12_ROOT_SIGNATURE_VERSION
- type D3D12_RTV_DIMENSION
- type D3D12_SAMPLER_DESC
- type D3D12_SHADER_BYTECODE
- type D3D12_SHADER_RESOURCE_VIEW_DESC
- func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture1D(mostDetailedMip, mipLevels uint32, resourceMinLODClamp float32)
- func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture2D(mostDetailedMip, mipLevels, planeSlice uint32, resourceMinLODClamp float32)
- func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture2DArray(mostDetailedMip, mipLevels, firstArraySlice, arraySize, planeSlice uint32, ...)
- func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture3D(mostDetailedMip, mipLevels uint32, resourceMinLODClamp float32)
- func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTextureCube(mostDetailedMip, mipLevels uint32, resourceMinLODClamp float32)
- func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTextureCubeArray(mostDetailedMip, mipLevels, first2DArrayFace, numCubes uint32, ...)
- type D3D12_SHADER_VISIBILITY
- type D3D12_SO_DECLARATION_ENTRY
- type D3D12_SRV_DIMENSION
- type D3D12_STATIC_BORDER_COLOR
- type D3D12_STATIC_SAMPLER_DESC
- type D3D12_STATIC_SAMPLER_DESC_FLAGS
- type D3D12_STENCIL_OP
- type D3D12_STREAM_OUTPUT_BUFFER_VIEW
- type D3D12_STREAM_OUTPUT_DESC
- type D3D12_SUBRESOURCE_FOOTPRINT
- type D3D12_TEXTURE_ADDRESS_MODE
- type D3D12_TEXTURE_COPY_LOCATION
- type D3D12_TEXTURE_COPY_TYPE
- type D3D12_TEXTURE_LAYOUT
- type D3D12_TILED_RESOURCE_COORDINATE
- type D3D12_TILE_REGION_SIZE
- type D3D12_UAV_DIMENSION
- type D3D12_UNORDERED_ACCESS_VIEW_DESC
- type D3D12_VERTEX_BUFFER_VIEW
- type D3D12_VIEWPORT
- type D3D12_WRITEBUFFERIMMEDIATE_MODE
- type D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
- type D3D_FEATURE_LEVEL
- type D3D_PRIMITIVE_TOPOLOGY
- type D3D_SHADER_MODEL
- type DXGI_FORMAT
- type DXGI_SAMPLE_DESC
- type GUID
- type HRESULTError
- type ID3D12CommandAllocator
- type ID3D12CommandList
- type ID3D12CommandQueue
- func (q *ID3D12CommandQueue) ExecuteCommandLists(numCommandLists uint32, commandLists **ID3D12GraphicsCommandList)
- func (q *ID3D12CommandQueue) GetDesc() D3D12_COMMAND_QUEUE_DESC
- func (q *ID3D12CommandQueue) GetTimestampFrequency() (uint64, error)
- func (q *ID3D12CommandQueue) Release() uint32
- func (q *ID3D12CommandQueue) Signal(fence *ID3D12Fence, value uint64) error
- func (q *ID3D12CommandQueue) Wait(fence *ID3D12Fence, value uint64) error
- type ID3D12CommandSignature
- type ID3D12Debug
- type ID3D12Debug1
- type ID3D12Debug2
- type ID3D12Debug3
- type ID3D12DescriptorHeap
- func (h *ID3D12DescriptorHeap) GetCPUDescriptorHandleForHeapStart() D3D12_CPU_DESCRIPTOR_HANDLE
- func (h *ID3D12DescriptorHeap) GetDesc() D3D12_DESCRIPTOR_HEAP_DESC
- func (h *ID3D12DescriptorHeap) GetGPUDescriptorHandleForHeapStart() D3D12_GPU_DESCRIPTOR_HANDLE
- func (h *ID3D12DescriptorHeap) Release() uint32
- type ID3D12Device
- func (d *ID3D12Device) AddRef() uint32
- func (d *ID3D12Device) CheckFeatureSupport(feature D3D12_FEATURE, featureData unsafe.Pointer, featureDataSize uint32) error
- func (d *ID3D12Device) CopyDescriptors(numDestRanges uint32, destRangeStarts *D3D12_CPU_DESCRIPTOR_HANDLE, ...)
- func (d *ID3D12Device) CopyDescriptorsSimple(numDescriptors uint32, ...)
- func (d *ID3D12Device) CreateCommandAllocator(listType D3D12_COMMAND_LIST_TYPE) (*ID3D12CommandAllocator, error)
- func (d *ID3D12Device) CreateCommandList(nodeMask uint32, listType D3D12_COMMAND_LIST_TYPE, ...) (*ID3D12GraphicsCommandList, error)
- func (d *ID3D12Device) CreateCommandQueue(desc *D3D12_COMMAND_QUEUE_DESC) (*ID3D12CommandQueue, error)
- func (d *ID3D12Device) CreateCommandSignature(desc *D3D12_COMMAND_SIGNATURE_DESC, rootSignature *ID3D12RootSignature) (*ID3D12CommandSignature, error)
- func (d *ID3D12Device) CreateCommittedResource(heapProperties *D3D12_HEAP_PROPERTIES, heapFlags D3D12_HEAP_FLAGS, ...) (*ID3D12Resource, error)
- func (d *ID3D12Device) CreateComputePipelineState(desc *D3D12_COMPUTE_PIPELINE_STATE_DESC) (*ID3D12PipelineState, error)
- func (d *ID3D12Device) CreateConstantBufferView(desc *D3D12_CONSTANT_BUFFER_VIEW_DESC, ...)
- func (d *ID3D12Device) CreateDepthStencilView(resource *ID3D12Resource, desc *D3D12_DEPTH_STENCIL_VIEW_DESC, ...)
- func (d *ID3D12Device) CreateDescriptorHeap(desc *D3D12_DESCRIPTOR_HEAP_DESC) (*ID3D12DescriptorHeap, error)
- func (d *ID3D12Device) CreateFence(initialValue uint64, flags D3D12_FENCE_FLAGS) (*ID3D12Fence, error)
- func (d *ID3D12Device) CreateGraphicsPipelineState(desc *D3D12_GRAPHICS_PIPELINE_STATE_DESC) (*ID3D12PipelineState, error)
- func (d *ID3D12Device) CreateHeap(desc *D3D12_HEAP_DESC) (*ID3D12Heap, error)
- func (d *ID3D12Device) CreatePlacedResource(heap *ID3D12Heap, heapOffset uint64, desc *D3D12_RESOURCE_DESC, ...) (*ID3D12Resource, error)
- func (d *ID3D12Device) CreateQueryHeap(desc *D3D12_QUERY_HEAP_DESC) (*ID3D12QueryHeap, error)
- func (d *ID3D12Device) CreateRenderTargetView(resource *ID3D12Resource, desc *D3D12_RENDER_TARGET_VIEW_DESC, ...)
- func (d *ID3D12Device) CreateRootSignature(nodeMask uint32, blobWithRootSignature unsafe.Pointer, ...) (*ID3D12RootSignature, error)
- func (d *ID3D12Device) CreateSampler(desc *D3D12_SAMPLER_DESC, destDescriptor D3D12_CPU_DESCRIPTOR_HANDLE)
- func (d *ID3D12Device) CreateShaderResourceView(resource *ID3D12Resource, desc *D3D12_SHADER_RESOURCE_VIEW_DESC, ...)
- func (d *ID3D12Device) CreateUnorderedAccessView(resource *ID3D12Resource, counterResource *ID3D12Resource, ...)
- func (d *ID3D12Device) GetDescriptorHandleIncrementSize(heapType D3D12_DESCRIPTOR_HEAP_TYPE) uint32
- func (d *ID3D12Device) GetDeviceRemovedReason() error
- func (d *ID3D12Device) GetNodeCount() uint32
- func (d *ID3D12Device) GetResourceAllocationInfo(visibleMask uint32, numResourceDescs uint32, ...) D3D12_RESOURCE_ALLOCATION_INFO
- func (d *ID3D12Device) QueryDRED1() *ID3D12DeviceRemovedExtendedData1
- func (d *ID3D12Device) QueryInfoQueue() *ID3D12InfoQueue
- func (d *ID3D12Device) Release() uint32
- type ID3D12DeviceChild
- type ID3D12DeviceRemovedExtendedData1
- type ID3D12DeviceRemovedExtendedDataSettings
- type ID3D12Fence
- type ID3D12Fence1
- type ID3D12GraphicsCommandList
- func (c *ID3D12GraphicsCommandList) ClearDepthStencilView(depthStencilView D3D12_CPU_DESCRIPTOR_HANDLE, clearFlags D3D12_CLEAR_FLAGS, ...)
- func (c *ID3D12GraphicsCommandList) ClearRenderTargetView(renderTargetView D3D12_CPU_DESCRIPTOR_HANDLE, colorRGBA *[4]float32, ...)
- func (c *ID3D12GraphicsCommandList) ClearState(pipelineState *ID3D12PipelineState)
- func (c *ID3D12GraphicsCommandList) Close() error
- func (c *ID3D12GraphicsCommandList) CopyBufferRegion(dstBuffer *ID3D12Resource, dstOffset uint64, srcBuffer *ID3D12Resource, ...)
- func (c *ID3D12GraphicsCommandList) CopyResource(dstResource, srcResource *ID3D12Resource)
- func (c *ID3D12GraphicsCommandList) CopyTextureRegion(dst *D3D12_TEXTURE_COPY_LOCATION, dstX, dstY, dstZ uint32, ...)
- func (c *ID3D12GraphicsCommandList) Dispatch(threadGroupCountX, threadGroupCountY, threadGroupCountZ uint32)
- func (c *ID3D12GraphicsCommandList) DrawIndexedInstanced(indexCountPerInstance, instanceCount, startIndexLocation uint32, ...)
- func (c *ID3D12GraphicsCommandList) DrawInstanced(vertexCountPerInstance, instanceCount, startVertexLocation, ... uint32)
- func (c *ID3D12GraphicsCommandList) IASetIndexBuffer(view *D3D12_INDEX_BUFFER_VIEW)
- func (c *ID3D12GraphicsCommandList) IASetPrimitiveTopology(topology D3D_PRIMITIVE_TOPOLOGY)
- func (c *ID3D12GraphicsCommandList) IASetVertexBuffers(startSlot, numViews uint32, views *D3D12_VERTEX_BUFFER_VIEW)
- func (c *ID3D12GraphicsCommandList) OMSetBlendFactor(blendFactor *[4]float32)
- func (c *ID3D12GraphicsCommandList) OMSetRenderTargets(numRenderTargetDescriptors uint32, ...)
- func (c *ID3D12GraphicsCommandList) OMSetStencilRef(stencilRef uint32)
- func (c *ID3D12GraphicsCommandList) RSSetScissorRects(numRects uint32, rects *D3D12_RECT)
- func (c *ID3D12GraphicsCommandList) RSSetViewports(numViewports uint32, viewports *D3D12_VIEWPORT)
- func (c *ID3D12GraphicsCommandList) Release() uint32
- func (c *ID3D12GraphicsCommandList) Reset(allocator *ID3D12CommandAllocator, initialState *ID3D12PipelineState) error
- func (c *ID3D12GraphicsCommandList) ResolveSubresource(dstResource *ID3D12Resource, dstSubresource uint32, ...)
- func (c *ID3D12GraphicsCommandList) ResourceBarrier(numBarriers uint32, barriers *D3D12_RESOURCE_BARRIER)
- func (c *ID3D12GraphicsCommandList) SetComputeRoot32BitConstant(rootParameterIndex, srcData, destOffsetIn32BitValues uint32)
- func (c *ID3D12GraphicsCommandList) SetComputeRootDescriptorTable(rootParameterIndex uint32, baseDescriptor D3D12_GPU_DESCRIPTOR_HANDLE)
- func (c *ID3D12GraphicsCommandList) SetComputeRootSignature(rootSignature *ID3D12RootSignature)
- func (c *ID3D12GraphicsCommandList) SetDescriptorHeaps(numDescriptorHeaps uint32, descriptorHeaps **ID3D12DescriptorHeap)
- func (c *ID3D12GraphicsCommandList) SetGraphicsRoot32BitConstant(rootParameterIndex, srcData, destOffsetIn32BitValues uint32)
- func (c *ID3D12GraphicsCommandList) SetGraphicsRootDescriptorTable(rootParameterIndex uint32, baseDescriptor D3D12_GPU_DESCRIPTOR_HANDLE)
- func (c *ID3D12GraphicsCommandList) SetGraphicsRootSignature(rootSignature *ID3D12RootSignature)
- func (c *ID3D12GraphicsCommandList) SetPipelineState(pipelineState *ID3D12PipelineState)
- type ID3D12GraphicsCommandList1
- type ID3D12GraphicsCommandList2
- type ID3D12GraphicsCommandList3
- type ID3D12GraphicsCommandList4
- type ID3D12Heap
- type ID3D12Heap1
- type ID3D12InfoQueue
- type ID3D12Object
- type ID3D12Pageable
- type ID3D12PipelineState
- type ID3D12QueryHeap
- type ID3D12Resource
- func (r *ID3D12Resource) GetDesc() D3D12_RESOURCE_DESC
- func (r *ID3D12Resource) GetGPUVirtualAddress() uint64
- func (r *ID3D12Resource) Map(subresource uint32, readRange *D3D12_RANGE) (unsafe.Pointer, error)
- func (r *ID3D12Resource) Release() uint32
- func (r *ID3D12Resource) Unmap(subresource uint32, writtenRange *D3D12_RANGE)
- type ID3D12Resource1
- type ID3D12RootSignature
- type ID3DBlob
Constants ¶
const ( S_OK = HRESULTError(0) S_FALSE = HRESULTError(1) // Generic errors E_UNEXPECTED = HRESULTError(-2147418113) // 0x8000FFFF E_NOTIMPL = HRESULTError(-2147467263) // 0x80004001 E_OUTOFMEMORY = HRESULTError(-2147024882) // 0x8007000E E_INVALIDARG = HRESULTError(-2147024809) // 0x80070057 E_NOINTERFACE = HRESULTError(-2147467262) // 0x80004002 E_POINTER = HRESULTError(-2147467261) // 0x80004003 E_HANDLE = HRESULTError(-2147024890) // 0x80070006 E_ABORT = HRESULTError(-2147467260) // 0x80004004 E_FAIL = HRESULTError(-2147467259) // 0x80004005 E_ACCESSDENIED = HRESULTError(-2147024891) // 0x80070005 // DXGI errors DXGI_ERROR_INVALID_CALL = HRESULTError(-2005270527) // 0x887A0001 DXGI_ERROR_NOT_FOUND = HRESULTError(-2005270526) // 0x887A0002 DXGI_ERROR_MORE_DATA = HRESULTError(-2005270525) // 0x887A0003 DXGI_ERROR_UNSUPPORTED = HRESULTError(-2005270524) // 0x887A0004 DXGI_ERROR_DEVICE_REMOVED = HRESULTError(-2005270523) // 0x887A0005 DXGI_ERROR_DEVICE_HUNG = HRESULTError(-2005270522) // 0x887A0006 DXGI_ERROR_DEVICE_RESET = HRESULTError(-2005270521) // 0x887A0007 DXGI_ERROR_WAS_STILL_DRAWING = HRESULTError(-2005270518) // 0x887A000A DXGI_ERROR_FRAME_STATISTICS_DISJOINT = HRESULTError(-2005270517) // 0x887A000B DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE = HRESULTError(-2005270516) // 0x887A000C DXGI_ERROR_DRIVER_INTERNAL_ERROR = HRESULTError(-2005270496) // 0x887A0020 DXGI_ERROR_NONEXCLUSIVE = HRESULTError(-2005270495) // 0x887A0021 DXGI_ERROR_NOT_CURRENTLY_AVAILABLE = HRESULTError(-2005270494) // 0x887A0022 DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED = HRESULTError(-2005270493) // 0x887A0023 DXGI_ERROR_REMOTE_OUTOFMEMORY = HRESULTError(-2005270492) // 0x887A0024 DXGI_ERROR_ACCESS_LOST = HRESULTError(-2005270490) // 0x887A0026 DXGI_ERROR_WAIT_TIMEOUT = HRESULTError(-2005270489) // 0x887A0027 DXGI_ERROR_SESSION_DISCONNECTED = HRESULTError(-2005270488) // 0x887A0028 DXGI_ERROR_RESTRICT_TO_OUTPUT_STALE = HRESULTError(-2005270487) // 0x887A0029 DXGI_ERROR_CANNOT_PROTECT_CONTENT = HRESULTError(-2005270486) // 0x887A002A DXGI_ERROR_ACCESS_DENIED = HRESULTError(-2005270485) // 0x887A002B DXGI_ERROR_NAME_ALREADY_EXISTS = HRESULTError(-2005270484) // 0x887A002C DXGI_ERROR_SDK_COMPONENT_MISSING = HRESULTError(-2005270483) // 0x887A002D DXGI_ERROR_NOT_CURRENT = HRESULTError(-2005270482) // 0x887A002E DXGI_ERROR_HW_PROTECTION_OUTOFMEMORY = HRESULTError(-2005270480) // 0x887A0030 DXGI_ERROR_DYNAMIC_CODE_POLICY_VIOLATION = HRESULTError(-2005270479) // 0x887A0031 DXGI_ERROR_NON_COMPOSITED_UI = HRESULTError(-2005270478) // 0x887A0032 // D3D12 specific errors D3D12_ERROR_ADAPTER_NOT_FOUND = HRESULTError(-2005008383) // 0x887E0001 D3D12_ERROR_DRIVER_VERSION_MISMATCH = HRESULTError(-2005008382) // 0x887E0002 D3D12_ERROR_INVALID_REDIST = HRESULTError(-2005008381) // 0x887E0003 // D3D errors (shared with D3D11) D3D_ERROR_FILE_NOT_FOUND = HRESULTError(-2005336062) // 0x88790002 D3D_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS = HRESULTError(-2005336063) // 0x88790001 )
Common HRESULT values.
const D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING = 0x1688
D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING is the default shader component mapping. This maps each component to itself: RGBA -> RGBA.
const (
D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES uint32 = 0xFFFFFFFF
)
D3D12 subresource constants.
Variables ¶
var IID_ID3D12CommandAllocator = GUID{ Data1: 0x6102DEE4, Data2: 0xAF59, Data3: 0x4B09, Data4: [8]byte{0xB9, 0x99, 0xB4, 0x4D, 0x73, 0xF0, 0x9B, 0x24}, }
IID_ID3D12CommandAllocator is the interface ID for ID3D12CommandAllocator. {6102DEE4-AF59-4B09-B999-B44D73F09B24}
var IID_ID3D12CommandList = GUID{ Data1: 0x7116D91C, Data2: 0xE7E4, Data3: 0x47CE, Data4: [8]byte{0xB8, 0xC6, 0xEC, 0x81, 0x68, 0xF4, 0x37, 0xE5}, }
IID_ID3D12CommandList is the interface ID for ID3D12CommandList. {7116D91C-E7E4-47CE-B8C6-EC8168F437E5}
var IID_ID3D12CommandQueue = GUID{ Data1: 0x0EC870A6, Data2: 0x5D7E, Data3: 0x4C22, Data4: [8]byte{0x8C, 0xFC, 0x5B, 0xAA, 0xE0, 0x76, 0x16, 0xED}, }
IID_ID3D12CommandQueue is the interface ID for ID3D12CommandQueue. {0EC870A6-5D7E-4C22-8CFC-5BAAE07616ED}
var IID_ID3D12CommandSignature = GUID{ Data1: 0xC36A797C, Data2: 0xEC80, Data3: 0x4F0A, Data4: [8]byte{0x89, 0x85, 0xA7, 0xB2, 0x47, 0x50, 0x82, 0xD1}, }
IID_ID3D12CommandSignature is the interface ID for ID3D12CommandSignature. {C36A797C-EC80-4F0A-8985-A7B2475082D1}
var IID_ID3D12Debug = GUID{ Data1: 0x344488B7, Data2: 0x6846, Data3: 0x474B, Data4: [8]byte{0xB9, 0x89, 0xF0, 0x27, 0x44, 0x82, 0x45, 0xE0}, }
IID_ID3D12Debug is the interface ID for ID3D12Debug. {344488B7-6846-474B-B989-F027448245E0}
var IID_ID3D12Debug1 = GUID{ Data1: 0xAFFAA4CA, Data2: 0x63FE, Data3: 0x4D8E, Data4: [8]byte{0xB8, 0xAD, 0x15, 0x90, 0x00, 0xAF, 0x43, 0x04}, }
IID_ID3D12Debug1 is the interface ID for ID3D12Debug1. {AFFAA4CA-63FE-4D8E-B8AD-159000AF4304}
var IID_ID3D12Debug2 = GUID{ Data1: 0x93A665C4, Data2: 0xA3B2, Data3: 0x4E5D, Data4: [8]byte{0xB6, 0x92, 0xA2, 0x6A, 0xE1, 0x4E, 0x33, 0x74}, }
IID_ID3D12Debug2 is the interface ID for ID3D12Debug2. {93A665C4-A3B2-4E5D-B692-A26AE14E3374}
var IID_ID3D12Debug3 = GUID{ Data1: 0x5CF4E58F, Data2: 0xF671, Data3: 0x4FF1, Data4: [8]byte{0xA5, 0x42, 0x36, 0x86, 0xE3, 0xD1, 0x53, 0xD1}, }
IID_ID3D12Debug3 is the interface ID for ID3D12Debug3. {5CF4E58F-F671-4FF1-A542-3686E3D153D1}
var IID_ID3D12DescriptorHeap = GUID{ Data1: 0x8EFB471D, Data2: 0x616C, Data3: 0x4F49, Data4: [8]byte{0x90, 0xF7, 0x12, 0x7B, 0xB7, 0x63, 0xFA, 0x51}, }
IID_ID3D12DescriptorHeap is the interface ID for ID3D12DescriptorHeap. {8EFB471D-616C-4F49-90F7-127BB763FA51}
var IID_ID3D12Device = GUID{ Data1: 0x189819F1, Data2: 0x1DB6, Data3: 0x4B57, Data4: [8]byte{0xBE, 0x54, 0x18, 0x21, 0x33, 0x9B, 0x85, 0xF7}, }
IID_ID3D12Device is the interface ID for ID3D12Device. {189819F1-1DB6-4B57-BE54-1821339B85F7}
var IID_ID3D12Device1 = GUID{ Data1: 0x77ACCE80, Data2: 0x638E, Data3: 0x4E65, Data4: [8]byte{0x88, 0x95, 0xC1, 0xF2, 0x33, 0x86, 0x86, 0x3E}, }
IID_ID3D12Device1 is the interface ID for ID3D12Device1. {77ACCE80-638E-4E65-8895-C1F23386863E}
var IID_ID3D12Device2 = GUID{ Data1: 0x30BAA41E, Data2: 0xB15B, Data3: 0x475C, Data4: [8]byte{0xA0, 0xBB, 0x1A, 0xF5, 0xC5, 0xB6, 0x43, 0x28}, }
IID_ID3D12Device2 is the interface ID for ID3D12Device2. {30BAA41E-B15B-475C-A0BB-1AF5C5B64328}
var IID_ID3D12Device3 = GUID{ Data1: 0x81DADC15, Data2: 0x2BAD, Data3: 0x4392, Data4: [8]byte{0x93, 0xC5, 0x10, 0x13, 0x45, 0xC4, 0xAA, 0x98}, }
IID_ID3D12Device3 is the interface ID for ID3D12Device3. {81DADC15-2BAD-4392-93C5-101345C4AA98}
var IID_ID3D12Device4 = GUID{ Data1: 0xE865DF17, Data2: 0xA9EE, Data3: 0x46F9, Data4: [8]byte{0xA4, 0x63, 0x30, 0x98, 0x31, 0x5A, 0xA2, 0xE5}, }
IID_ID3D12Device4 is the interface ID for ID3D12Device4. {E865DF17-A9EE-46F9-A463-3098315AA2E5}
var IID_ID3D12Device5 = GUID{ Data1: 0x8B4F173B, Data2: 0x2FEA, Data3: 0x4B80, Data4: [8]byte{0x8F, 0x58, 0x43, 0x07, 0x19, 0x1A, 0xB9, 0x5D}, }
IID_ID3D12Device5 is the interface ID for ID3D12Device5. {8B4F173B-2FEA-4B80-8F58-4307191AB95D}
var IID_ID3D12DeviceChild = GUID{ Data1: 0x905DB94B, Data2: 0xA00C, Data3: 0x4140, Data4: [8]byte{0x9D, 0xF5, 0x2B, 0x64, 0xCA, 0x9E, 0xA3, 0x57}, }
IID_ID3D12DeviceChild is the interface ID for ID3D12DeviceChild. {905DB94B-A00C-4140-9DF5-2B64CA9EA357}
var IID_ID3D12DeviceRemovedExtendedData1 = GUID{ Data1: 0x8727A009, Data2: 0xF2F4, Data3: 0x424F, Data4: [8]byte{0x8B, 0x91, 0xB9, 0xC9, 0xC4, 0x72, 0xD8, 0xE6}, }
IID_ID3D12DeviceRemovedExtendedData1 is the interface ID for ID3D12DeviceRemovedExtendedData1 (query DRED data after device removal). {8727A009-F2F4-424F-8B91-B9C9C472D8E6}
var IID_ID3D12DeviceRemovedExtendedDataSettings = GUID{ Data1: 0x82BC481C, Data2: 0x6B9B, Data3: 0x4030, Data4: [8]byte{0xAE, 0xDB, 0x7E, 0xE3, 0xD1, 0xDF, 0x1E, 0x63}, }
IID_ID3D12DeviceRemovedExtendedDataSettings is the interface ID for ID3D12DeviceRemovedExtendedDataSettings (DRED settings, before device creation). {82BC481C-6B9B-4030-AEDB-7EE3D1DF1E63}
var IID_ID3D12Fence = GUID{ Data1: 0x0A753DCF, Data2: 0xC4D8, Data3: 0x4B91, Data4: [8]byte{0xAD, 0xF6, 0xBE, 0x5A, 0x60, 0xD9, 0x5A, 0x76}, }
IID_ID3D12Fence is the interface ID for ID3D12Fence. {0A753DCF-C4D8-4B91-ADF6-BE5A60D95A76}
var IID_ID3D12Fence1 = GUID{ Data1: 0x433685FE, Data2: 0xE22B, Data3: 0x4CA0, Data4: [8]byte{0xA8, 0xDB, 0xB5, 0xB4, 0xF4, 0xDD, 0x0E, 0x4A}, }
IID_ID3D12Fence1 is the interface ID for ID3D12Fence1. {433685FE-E22B-4CA0-A8DB-B5B4F4DD0E4A}
var IID_ID3D12GraphicsCommandList = GUID{ Data1: 0x5B160D0F, Data2: 0xAC1B, Data3: 0x4185, Data4: [8]byte{0x8B, 0xA8, 0xB3, 0xAE, 0x42, 0xA5, 0xA4, 0x55}, }
IID_ID3D12GraphicsCommandList is the interface ID for ID3D12GraphicsCommandList. {5B160D0F-AC1B-4185-8BA8-B3AE42A5A455}
var IID_ID3D12GraphicsCommandList1 = GUID{ Data1: 0x553103FB, Data2: 0x1FE7, Data3: 0x4557, Data4: [8]byte{0xBB, 0x38, 0x94, 0x6D, 0x7D, 0x0E, 0x7C, 0xA7}, }
IID_ID3D12GraphicsCommandList1 is the interface ID for ID3D12GraphicsCommandList1. {553103FB-1FE7-4557-BB38-946D7D0E7CA7}
var IID_ID3D12GraphicsCommandList2 = GUID{ Data1: 0x38C3E585, Data2: 0xFF17, Data3: 0x412C, Data4: [8]byte{0x91, 0x50, 0x4F, 0xC6, 0xF9, 0xD7, 0x2A, 0x28}, }
IID_ID3D12GraphicsCommandList2 is the interface ID for ID3D12GraphicsCommandList2. {38C3E585-FF17-412C-9150-4FC6F9D72A28}
var IID_ID3D12GraphicsCommandList3 = GUID{ Data1: 0x6FDA83A7, Data2: 0xB84C, Data3: 0x4E38, Data4: [8]byte{0x9A, 0xC8, 0xC7, 0xBD, 0x22, 0x01, 0x6B, 0x3D}, }
IID_ID3D12GraphicsCommandList3 is the interface ID for ID3D12GraphicsCommandList3. {6FDA83A7-B84C-4E38-9AC8-C7BD22016B3D}
var IID_ID3D12GraphicsCommandList4 = GUID{ Data1: 0x8754318E, Data2: 0xD3A9, Data3: 0x4541, Data4: [8]byte{0x98, 0xCF, 0x64, 0x5B, 0x50, 0xDC, 0x48, 0x74}, }
IID_ID3D12GraphicsCommandList4 is the interface ID for ID3D12GraphicsCommandList4. {8754318E-D3A9-4541-98CF-645B50DC4874}
var IID_ID3D12Heap = GUID{ Data1: 0x6B3B2502, Data2: 0x6E51, Data3: 0x45B3, Data4: [8]byte{0x90, 0xEE, 0x98, 0x84, 0x26, 0x5E, 0x8D, 0xF3}, }
IID_ID3D12Heap is the interface ID for ID3D12Heap. {6B3B2502-6E51-45B3-90EE-9884265E8DF3}
var IID_ID3D12Heap1 = GUID{ Data1: 0x572F7389, Data2: 0x2168, Data3: 0x49E3, Data4: [8]byte{0x96, 0x93, 0xD6, 0xDF, 0x58, 0x71, 0xBF, 0x6D}, }
IID_ID3D12Heap1 is the interface ID for ID3D12Heap1. {572F7389-2168-49E3-9693-D6DF5871BF6D}
var IID_ID3D12InfoQueue = GUID{ Data1: 0x0742A90B, Data2: 0xC387, Data3: 0x483F, Data4: [8]byte{0xB9, 0x46, 0x30, 0xA7, 0xE4, 0xE6, 0x14, 0x58}, }
IID_ID3D12InfoQueue is the interface ID for ID3D12InfoQueue. {0742A90B-C387-483F-B946-30A7E4E61458}
var IID_ID3D12Object = GUID{ Data1: 0xC4FEC28F, Data2: 0x7966, Data3: 0x4E95, Data4: [8]byte{0x9F, 0x94, 0xF4, 0x31, 0xCB, 0x56, 0xC3, 0xB8}, }
IID_ID3D12Object is the interface ID for ID3D12Object. {C4FEC28F-7966-4E95-9F94-F431CB56C3B8}
var IID_ID3D12Pageable = GUID{ Data1: 0x63EE58FB, Data2: 0x1268, Data3: 0x4835, Data4: [8]byte{0x86, 0xDA, 0xF0, 0x08, 0xCE, 0x62, 0xF0, 0xD6}, }
IID_ID3D12Pageable is the interface ID for ID3D12Pageable. {63EE58FB-1268-4835-86DA-F008CE62F0D6}
var IID_ID3D12PipelineState = GUID{ Data1: 0x765A30F3, Data2: 0xF624, Data3: 0x4C6F, Data4: [8]byte{0xA8, 0x28, 0xAC, 0xE9, 0x48, 0x62, 0x24, 0x45}, }
IID_ID3D12PipelineState is the interface ID for ID3D12PipelineState. {765A30F3-F624-4C6F-A828-ACE948622445}
var IID_ID3D12QueryHeap = GUID{ Data1: 0x0D9658AE, Data2: 0xED45, Data3: 0x469E, Data4: [8]byte{0xA6, 0x1D, 0x97, 0x0E, 0xC5, 0x83, 0xCA, 0xB4}, }
IID_ID3D12QueryHeap is the interface ID for ID3D12QueryHeap. {0D9658AE-ED45-469E-A61D-970EC583CAB4}
var IID_ID3D12Resource = GUID{ Data1: 0x696442BE, Data2: 0xA72E, Data3: 0x4059, Data4: [8]byte{0xBC, 0x79, 0x5B, 0x5C, 0x98, 0x04, 0x0F, 0xAD}, }
IID_ID3D12Resource is the interface ID for ID3D12Resource. {696442BE-A72E-4059-BC79-5B5C98040FAD}
var IID_ID3D12Resource1 = GUID{ Data1: 0x9D5E227A, Data2: 0x4430, Data3: 0x4161, Data4: [8]byte{0x88, 0xB3, 0x3E, 0xCA, 0x6B, 0xB1, 0x6E, 0x19}, }
IID_ID3D12Resource1 is the interface ID for ID3D12Resource1. {9D5E227A-4430-4161-88B3-3ECA6BB16E19}
var IID_ID3D12RootSignature = GUID{ Data1: 0xC54A6B66, Data2: 0x72DF, Data3: 0x4EE8, Data4: [8]byte{0x8B, 0xE5, 0xA9, 0x46, 0xA1, 0x42, 0x92, 0x14}, }
IID_ID3D12RootSignature is the interface ID for ID3D12RootSignature. {C54A6B66-72DF-4EE8-8BE5-A946A1429214}
var IID_ID3DBlob = GUID{ Data1: 0x8BA5FB08, Data2: 0x5195, Data3: 0x40E2, Data4: [8]byte{0xAC, 0x58, 0x0D, 0x98, 0x9C, 0x3A, 0x01, 0x02}, }
IID_ID3DBlob is the interface ID for ID3DBlob (ID3D10Blob). {8BA5FB08-5195-40E2-AC58-0D989C3A0102}
Functions ¶
func AutoBreadcrumbOpName ¶ added in v0.23.6
func AutoBreadcrumbOpName(op D3D12AutoBreadcrumbOp) string
AutoBreadcrumbOpName returns a human-readable name for the breadcrumb operation.
Types ¶
type D3D12AutoBreadcrumbNode1 ¶ added in v0.23.6
type D3D12AutoBreadcrumbNode1 struct {
CommandListDebugNameW *uint16
CommandQueueDebugNameW *uint16
CommandList uintptr
CommandQueue uintptr
BreadcrumbCount uint32
LastBreadcrumbValue *uint32
CommandHistory *D3D12AutoBreadcrumbOp
Next *D3D12AutoBreadcrumbNode1
BreadcrumbContextsCount uint32
BreadcrumbContexts uintptr
// contains filtered or unexported fields
}
D3D12AutoBreadcrumbNode1 represents a single command list/queue breadcrumb record. This is a linked list node — pNext points to the next node.
Layout matches D3D12_AUTO_BREADCRUMB_NODE1 exactly:
WCHAR* pCommandListDebugNameW; // +0 WCHAR* pCommandQueueDebugNameW; // +8 ID3D12GraphicsCommandList* pCommandList; // +16 ID3D12CommandQueue* pCommandQueue; // +24 UINT BreadcrumbCount; // +32 const UINT* pLastBreadcrumbValue; // +40 const D3D12_AUTO_BREADCRUMB_OP* pCommandHistory; // +48 D3D12_AUTO_BREADCRUMB_NODE1* pNext; // +56 UINT BreadcrumbContextsCount; // +64 D3D12_DRED_BREADCRUMB_CONTEXT* pBreadcrumbContexts; // +72
func (*D3D12AutoBreadcrumbNode1) BreadcrumbOps ¶ added in v0.23.6
func (n *D3D12AutoBreadcrumbNode1) BreadcrumbOps() []D3D12AutoBreadcrumbOp
BreadcrumbOps returns the command history as a Go slice. The returned slice references the original DRED memory and must not be used after the DRED interface is released.
func (*D3D12AutoBreadcrumbNode1) LastCompleted ¶ added in v0.23.6
func (n *D3D12AutoBreadcrumbNode1) LastCompleted() uint32
LastCompleted returns the index of the last breadcrumb the GPU completed. Returns 0 if no breadcrumb value is available.
type D3D12AutoBreadcrumbOp ¶ added in v0.23.6
type D3D12AutoBreadcrumbOp int32
D3D12AutoBreadcrumbOp identifies the type of GPU operation recorded as an auto-breadcrumb by DRED.
const ( D3D12AutoBreadcrumbOpSetMarker D3D12AutoBreadcrumbOp = 0 D3D12AutoBreadcrumbOpBeginEvent D3D12AutoBreadcrumbOp = 1 D3D12AutoBreadcrumbOpEndEvent D3D12AutoBreadcrumbOp = 2 D3D12AutoBreadcrumbOpDrawInstanced D3D12AutoBreadcrumbOp = 3 D3D12AutoBreadcrumbOpDrawIndexedInstanced D3D12AutoBreadcrumbOp = 4 D3D12AutoBreadcrumbOpExecuteIndirect D3D12AutoBreadcrumbOp = 5 D3D12AutoBreadcrumbOpDispatch D3D12AutoBreadcrumbOp = 6 D3D12AutoBreadcrumbOpCopyBufferRegion D3D12AutoBreadcrumbOp = 7 D3D12AutoBreadcrumbOpCopyTextureRegion D3D12AutoBreadcrumbOp = 8 D3D12AutoBreadcrumbOpCopyResource D3D12AutoBreadcrumbOp = 9 D3D12AutoBreadcrumbOpCopyTiles D3D12AutoBreadcrumbOp = 10 D3D12AutoBreadcrumbOpResolveSubresource D3D12AutoBreadcrumbOp = 11 D3D12AutoBreadcrumbOpClearRenderTargetView D3D12AutoBreadcrumbOp = 12 D3D12AutoBreadcrumbOpClearUnorderedAccessView D3D12AutoBreadcrumbOp = 13 D3D12AutoBreadcrumbOpClearDepthStencilView D3D12AutoBreadcrumbOp = 14 D3D12AutoBreadcrumbOpResourceBarrier D3D12AutoBreadcrumbOp = 15 D3D12AutoBreadcrumbOpExecuteBundle D3D12AutoBreadcrumbOp = 16 D3D12AutoBreadcrumbOpPresent D3D12AutoBreadcrumbOp = 17 D3D12AutoBreadcrumbOpResolveQueryData D3D12AutoBreadcrumbOp = 18 D3D12AutoBreadcrumbOpBeginSubmission D3D12AutoBreadcrumbOp = 19 D3D12AutoBreadcrumbOpEndSubmission D3D12AutoBreadcrumbOp = 20 D3D12AutoBreadcrumbOpDecodeFrame D3D12AutoBreadcrumbOp = 21 D3D12AutoBreadcrumbOpProcessFrames D3D12AutoBreadcrumbOp = 22 D3D12AutoBreadcrumbOpAtomicCopyBufferUINT D3D12AutoBreadcrumbOp = 23 D3D12AutoBreadcrumbOpAtomicCopyBufferUINT64 D3D12AutoBreadcrumbOp = 24 D3D12AutoBreadcrumbOpResolveSubresourceRegion D3D12AutoBreadcrumbOp = 25 D3D12AutoBreadcrumbOpWriteBufferImmediate D3D12AutoBreadcrumbOp = 26 D3D12AutoBreadcrumbOpDecodeFrame1 D3D12AutoBreadcrumbOp = 27 D3D12AutoBreadcrumbOpSetProtectedResourceSession D3D12AutoBreadcrumbOp = 28 D3D12AutoBreadcrumbOpDecodeFrame2 D3D12AutoBreadcrumbOp = 29 D3D12AutoBreadcrumbOpProcessFrames1 D3D12AutoBreadcrumbOp = 30 D3D12AutoBreadcrumbOpBuildRaytracingAccelerationStructure D3D12AutoBreadcrumbOp = 31 D3D12AutoBreadcrumbOpEmitRaytracingAccelerationStructurePostbuildInfo D3D12AutoBreadcrumbOp = 32 D3D12AutoBreadcrumbOpCopyRaytracingAccelerationStructure D3D12AutoBreadcrumbOp = 33 D3D12AutoBreadcrumbOpDispatchRays D3D12AutoBreadcrumbOp = 34 D3D12AutoBreadcrumbOpInitializeMetaCommand D3D12AutoBreadcrumbOp = 35 D3D12AutoBreadcrumbOpExecuteMetaCommand D3D12AutoBreadcrumbOp = 36 D3D12AutoBreadcrumbOpEstimateMotion D3D12AutoBreadcrumbOp = 37 D3D12AutoBreadcrumbOpResolveMotionVectorHeap D3D12AutoBreadcrumbOp = 38 D3D12AutoBreadcrumbOpSetPipelineState1 D3D12AutoBreadcrumbOp = 39 D3D12AutoBreadcrumbOpInitializeExtensionCommand D3D12AutoBreadcrumbOp = 40 D3D12AutoBreadcrumbOpExecuteExtensionCommand D3D12AutoBreadcrumbOp = 41 D3D12AutoBreadcrumbOpDispatchMesh D3D12AutoBreadcrumbOp = 42 D3D12AutoBreadcrumbOpEncodeFrame D3D12AutoBreadcrumbOp = 43 D3D12AutoBreadcrumbOpResolveEncoderOutputMetadata D3D12AutoBreadcrumbOp = 44 )
type D3D12DREDAllocationNode1 ¶ added in v0.23.6
type D3D12DREDAllocationNode1 struct {
ObjectNameA *byte
ObjectNameW *uint16
AllocationType int32
Next *D3D12DREDAllocationNode1
// contains filtered or unexported fields
}
D3D12DREDAllocationNode1 represents a single allocation tracked by DRED for page fault reporting.
Layout matches D3D12_DRED_ALLOCATION_NODE1:
const char* ObjectNameA; // +0 const WCHAR* ObjectNameW; // +8 D3D12_DRED_ALLOCATION_TYPE AllocationType; // +16 D3D12_DRED_ALLOCATION_NODE1* pNext; // +24
type D3D12DREDAutoBreadcrumbsOutput1 ¶ added in v0.23.6
type D3D12DREDAutoBreadcrumbsOutput1 struct {
HeadAutoBreadcrumbNode *D3D12AutoBreadcrumbNode1
}
D3D12DREDAutoBreadcrumbsOutput1 is the output structure for DRED auto-breadcrumbs.
Layout matches D3D12_DRED_AUTO_BREADCRUMBS_OUTPUT1:
D3D12_AUTO_BREADCRUMB_NODE1* pHeadAutoBreadcrumbNode; // +0
type D3D12DREDEnablement ¶ added in v0.23.6
type D3D12DREDEnablement int32
D3D12DREDEnablement controls DRED feature enablement.
const ( // D3D12DREDEnablementSystemControlled lets the system decide. D3D12DREDEnablementSystemControlled D3D12DREDEnablement = 0 // D3D12DREDEnablementForcedOff disables the feature. D3D12DREDEnablementForcedOff D3D12DREDEnablement = 1 // D3D12DREDEnablementForcedOn enables the feature. D3D12DREDEnablementForcedOn D3D12DREDEnablement = 2 )
type D3D12DREDPageFaultOutput1 ¶ added in v0.23.6
type D3D12DREDPageFaultOutput1 struct {
PageFaultVA uint64
HeadExistingAllocationNode *D3D12DREDAllocationNode1
HeadRecentFreedAllocationNode *D3D12DREDAllocationNode1
}
D3D12DREDPageFaultOutput1 is the output structure for DRED page fault information.
Layout matches D3D12_DRED_PAGE_FAULT_OUTPUT1:
D3D12_GPU_VIRTUAL_ADDRESS PageFaultVA; // +0 D3D12_DRED_ALLOCATION_NODE1* pHeadExistingAllocationNode; // +8 D3D12_DRED_ALLOCATION_NODE1* pHeadRecentFreedAllocationNode; // +16
type D3D12Lib ¶
type D3D12Lib struct {
// contains filtered or unexported fields
}
D3D12Lib provides access to D3D12 functions.
func (*D3D12Lib) CreateDevice ¶
func (lib *D3D12Lib) CreateDevice(adapter unsafe.Pointer, minFeatureLevel D3D_FEATURE_LEVEL) (*ID3D12Device, error)
CreateDevice creates a D3D12 device.
adapter can be nil to use the default adapter. minFeatureLevel is the minimum feature level required.
func (*D3D12Lib) GetDREDSettings ¶ added in v0.23.6
func (lib *D3D12Lib) GetDREDSettings() (*ID3D12DeviceRemovedExtendedDataSettings, error)
GetDREDSettings retrieves the DRED settings interface via D3D12GetDebugInterface. DRED must be configured BEFORE device creation. Returns an error if DRED is not available (older Windows versions or missing debug layer).
func (*D3D12Lib) GetDebugInterface ¶
func (lib *D3D12Lib) GetDebugInterface() (*ID3D12Debug, error)
GetDebugInterface retrieves the D3D12 debug interface.
func (*D3D12Lib) GetDebugInterface1 ¶
func (lib *D3D12Lib) GetDebugInterface1() (*ID3D12Debug1, error)
GetDebugInterface1 retrieves the D3D12Debug1 debug interface.
func (*D3D12Lib) GetDebugInterface3 ¶
func (lib *D3D12Lib) GetDebugInterface3() (*ID3D12Debug3, error)
GetDebugInterface3 retrieves the D3D12Debug3 debug interface.
func (*D3D12Lib) SerializeRootSignature ¶
func (lib *D3D12Lib) SerializeRootSignature( desc *D3D12_ROOT_SIGNATURE_DESC, version D3D12_ROOT_SIGNATURE_VERSION, ) (*ID3DBlob, *ID3DBlob, error)
SerializeRootSignature serializes a root signature.
type D3D12Message ¶ added in v0.16.0
type D3D12Message struct {
Category int32
Severity D3D12MessageSeverity
ID int32
PDescription *byte
DescriptionByteLength uintptr
}
D3D12Message represents a debug message from the D3D12 runtime. Layout must match the native D3D12_MESSAGE struct.
func (*D3D12Message) Description ¶ added in v0.16.0
func (m *D3D12Message) Description() string
Description returns the message text as a Go string.
type D3D12MessageSeverity ¶ added in v0.16.0
type D3D12MessageSeverity int32
D3D12MessageSeverity represents the severity of a debug message.
const ( D3D12MessageSeverityCorruption D3D12MessageSeverity = 0 D3D12MessageSeverityError D3D12MessageSeverity = 1 D3D12MessageSeverityWarning D3D12MessageSeverity = 2 D3D12MessageSeverityInfo D3D12MessageSeverity = 3 D3D12MessageSeverityMessage D3D12MessageSeverity = 4 )
func (D3D12MessageSeverity) String ¶ added in v0.16.0
func (s D3D12MessageSeverity) String() string
String returns a human-readable severity name.
type D3D12_BLEND ¶
type D3D12_BLEND uint32
D3D12_BLEND specifies blend factors.
const ( D3D12_BLEND_ZERO D3D12_BLEND = 1 D3D12_BLEND_ONE D3D12_BLEND = 2 D3D12_BLEND_SRC_COLOR D3D12_BLEND = 3 D3D12_BLEND_INV_SRC_COLOR D3D12_BLEND = 4 D3D12_BLEND_SRC_ALPHA D3D12_BLEND = 5 D3D12_BLEND_INV_SRC_ALPHA D3D12_BLEND = 6 D3D12_BLEND_DEST_ALPHA D3D12_BLEND = 7 D3D12_BLEND_INV_DEST_ALPHA D3D12_BLEND = 8 D3D12_BLEND_DEST_COLOR D3D12_BLEND = 9 D3D12_BLEND_INV_DEST_COLOR D3D12_BLEND = 10 D3D12_BLEND_SRC_ALPHA_SAT D3D12_BLEND = 11 D3D12_BLEND_BLEND_FACTOR D3D12_BLEND = 14 D3D12_BLEND_INV_BLEND_FACTOR D3D12_BLEND = 15 D3D12_BLEND_SRC1_COLOR D3D12_BLEND = 16 D3D12_BLEND_INV_SRC1_COLOR D3D12_BLEND = 17 D3D12_BLEND_SRC1_ALPHA D3D12_BLEND = 18 D3D12_BLEND_INV_SRC1_ALPHA D3D12_BLEND = 19 )
Blend factor constants.
type D3D12_BLEND_DESC ¶
type D3D12_BLEND_DESC struct {
AlphaToCoverageEnable int32 // BOOL
IndependentBlendEnable int32 // BOOL
RenderTarget [8]D3D12_RENDER_TARGET_BLEND_DESC
}
D3D12_BLEND_DESC describes the blend state.
type D3D12_BLEND_OP ¶
type D3D12_BLEND_OP uint32
D3D12_BLEND_OP specifies the blend operation.
const ( D3D12_BLEND_OP_ADD D3D12_BLEND_OP = 1 D3D12_BLEND_OP_SUBTRACT D3D12_BLEND_OP = 2 D3D12_BLEND_OP_REV_SUBTRACT D3D12_BLEND_OP = 3 D3D12_BLEND_OP_MIN D3D12_BLEND_OP = 4 D3D12_BLEND_OP_MAX D3D12_BLEND_OP = 5 )
Blend operation constants.
type D3D12_BOX ¶
type D3D12_BOX struct {
Left uint32
Top uint32
Front uint32
Right uint32
Bottom uint32
Back uint32
}
D3D12_BOX describes a 3D box.
type D3D12_CACHED_PIPELINE_STATE ¶
D3D12_CACHED_PIPELINE_STATE describes a cached pipeline state.
type D3D12_CLEAR_FLAGS ¶
type D3D12_CLEAR_FLAGS uint32
D3D12_CLEAR_FLAGS specifies clear flags.
const ( D3D12_CLEAR_FLAG_DEPTH D3D12_CLEAR_FLAGS = 0x1 D3D12_CLEAR_FLAG_STENCIL D3D12_CLEAR_FLAGS = 0x2 )
Clear flag constants.
type D3D12_CLEAR_VALUE ¶
type D3D12_CLEAR_VALUE struct {
Format DXGI_FORMAT
// This is a union in C. We use the larger Color field and reinterpret for DepthStencil.
Color [4]float32
}
D3D12_CLEAR_VALUE describes an optimized clear value.
func (*D3D12_CLEAR_VALUE) SetColor ¶
func (d *D3D12_CLEAR_VALUE) SetColor(color [4]float32)
SetColor sets up a color clear value.
func (*D3D12_CLEAR_VALUE) SetDepthStencil ¶
func (d *D3D12_CLEAR_VALUE) SetDepthStencil(depth float32, stencil uint8)
SetDepthStencil sets up a depth/stencil clear value. This reinterprets the Color field as depth/stencil values.
type D3D12_COLOR_WRITE_ENABLE ¶
type D3D12_COLOR_WRITE_ENABLE uint8
D3D12_COLOR_WRITE_ENABLE specifies color write enable flags.
const ( D3D12_COLOR_WRITE_ENABLE_RED D3D12_COLOR_WRITE_ENABLE = 1 D3D12_COLOR_WRITE_ENABLE_GREEN D3D12_COLOR_WRITE_ENABLE = 2 D3D12_COLOR_WRITE_ENABLE_BLUE D3D12_COLOR_WRITE_ENABLE = 4 D3D12_COLOR_WRITE_ENABLE_ALPHA D3D12_COLOR_WRITE_ENABLE = 8 D3D12_COLOR_WRITE_ENABLE_ALL D3D12_COLOR_WRITE_ENABLE = 0xF )
Color write enable constants.
type D3D12_COMMAND_LIST_TYPE ¶
type D3D12_COMMAND_LIST_TYPE uint32
D3D12_COMMAND_LIST_TYPE specifies the type of command list.
const ( D3D12_COMMAND_LIST_TYPE_DIRECT D3D12_COMMAND_LIST_TYPE = 0 D3D12_COMMAND_LIST_TYPE_BUNDLE D3D12_COMMAND_LIST_TYPE = 1 D3D12_COMMAND_LIST_TYPE_COMPUTE D3D12_COMMAND_LIST_TYPE = 2 D3D12_COMMAND_LIST_TYPE_COPY D3D12_COMMAND_LIST_TYPE = 3 D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE D3D12_COMMAND_LIST_TYPE = 4 D3D12_COMMAND_LIST_TYPE_VIDEO_PROCESS D3D12_COMMAND_LIST_TYPE = 5 D3D12_COMMAND_LIST_TYPE_VIDEO_ENCODE D3D12_COMMAND_LIST_TYPE = 6 )
Command list type constants.
type D3D12_COMMAND_QUEUE_DESC ¶
type D3D12_COMMAND_QUEUE_DESC struct {
Type D3D12_COMMAND_LIST_TYPE
Priority int32
Flags D3D12_COMMAND_QUEUE_FLAGS
NodeMask uint32
}
D3D12_COMMAND_QUEUE_DESC describes a command queue.
type D3D12_COMMAND_QUEUE_FLAGS ¶
type D3D12_COMMAND_QUEUE_FLAGS uint32
D3D12_COMMAND_QUEUE_FLAGS specifies command queue flags.
const ( D3D12_COMMAND_QUEUE_FLAG_NONE D3D12_COMMAND_QUEUE_FLAGS = 0 D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT D3D12_COMMAND_QUEUE_FLAGS = 1 )
Command queue flag constants.
type D3D12_COMMAND_QUEUE_PRIORITY ¶
type D3D12_COMMAND_QUEUE_PRIORITY int32
D3D12_COMMAND_QUEUE_PRIORITY specifies the priority level for a command queue.
const ( D3D12_COMMAND_QUEUE_PRIORITY_NORMAL D3D12_COMMAND_QUEUE_PRIORITY = 0 D3D12_COMMAND_QUEUE_PRIORITY_HIGH D3D12_COMMAND_QUEUE_PRIORITY = 100 D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME D3D12_COMMAND_QUEUE_PRIORITY = 10000 )
Command queue priority constants.
type D3D12_COMMAND_SIGNATURE_DESC ¶
type D3D12_COMMAND_SIGNATURE_DESC struct {
ByteStride uint32
NumArgumentDescs uint32
ArgumentDescs *D3D12_INDIRECT_ARGUMENT_DESC
NodeMask uint32
}
D3D12_COMMAND_SIGNATURE_DESC describes a command signature.
type D3D12_COMPARISON_FUNC ¶
type D3D12_COMPARISON_FUNC uint32
D3D12_COMPARISON_FUNC specifies the comparison function.
const ( D3D12_COMPARISON_FUNC_NEVER D3D12_COMPARISON_FUNC = 1 D3D12_COMPARISON_FUNC_LESS D3D12_COMPARISON_FUNC = 2 D3D12_COMPARISON_FUNC_EQUAL D3D12_COMPARISON_FUNC = 3 D3D12_COMPARISON_FUNC_LESS_EQUAL D3D12_COMPARISON_FUNC = 4 D3D12_COMPARISON_FUNC_GREATER D3D12_COMPARISON_FUNC = 5 D3D12_COMPARISON_FUNC_NOT_EQUAL D3D12_COMPARISON_FUNC = 6 D3D12_COMPARISON_FUNC_GREATER_EQUAL D3D12_COMPARISON_FUNC = 7 D3D12_COMPARISON_FUNC_ALWAYS D3D12_COMPARISON_FUNC = 8 )
Comparison function constants.
type D3D12_COMPUTE_PIPELINE_STATE_DESC ¶
type D3D12_COMPUTE_PIPELINE_STATE_DESC struct {
RootSignature *ID3D12RootSignature
CS D3D12_SHADER_BYTECODE
NodeMask uint32
CachedPSO D3D12_CACHED_PIPELINE_STATE
Flags D3D12_PIPELINE_STATE_FLAGS
}
D3D12_COMPUTE_PIPELINE_STATE_DESC describes a compute pipeline state.
type D3D12_CONSERVATIVE_RASTERIZATION_MODE ¶
type D3D12_CONSERVATIVE_RASTERIZATION_MODE uint32
D3D12_CONSERVATIVE_RASTERIZATION_MODE specifies conservative rasterization mode.
const ( D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF D3D12_CONSERVATIVE_RASTERIZATION_MODE = 0 D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON D3D12_CONSERVATIVE_RASTERIZATION_MODE = 1 )
Conservative rasterization mode constants.
type D3D12_CONSTANT_BUFFER_VIEW_DESC ¶
D3D12_CONSTANT_BUFFER_VIEW_DESC describes a constant buffer view.
type D3D12_CPU_DESCRIPTOR_HANDLE ¶
type D3D12_CPU_DESCRIPTOR_HANDLE struct {
Ptr uintptr
}
D3D12_CPU_DESCRIPTOR_HANDLE represents a CPU descriptor handle.
func (D3D12_CPU_DESCRIPTOR_HANDLE) Offset ¶
func (h D3D12_CPU_DESCRIPTOR_HANDLE) Offset(index int, incrementSize uint32) D3D12_CPU_DESCRIPTOR_HANDLE
Offset returns a new handle offset by the given number of descriptors.
type D3D12_CPU_PAGE_PROPERTY ¶
type D3D12_CPU_PAGE_PROPERTY uint32
D3D12_CPU_PAGE_PROPERTY specifies the CPU-page properties for the heap.
const ( D3D12_CPU_PAGE_PROPERTY_UNKNOWN D3D12_CPU_PAGE_PROPERTY = 0 D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE D3D12_CPU_PAGE_PROPERTY = 1 D3D12_CPU_PAGE_PROPERTY_WRITE_COMBINE D3D12_CPU_PAGE_PROPERTY = 2 D3D12_CPU_PAGE_PROPERTY_WRITE_BACK D3D12_CPU_PAGE_PROPERTY = 3 )
CPU page property constants.
type D3D12_CULL_MODE ¶
type D3D12_CULL_MODE uint32
D3D12_CULL_MODE specifies the cull mode.
const ( D3D12_CULL_MODE_NONE D3D12_CULL_MODE = 1 D3D12_CULL_MODE_FRONT D3D12_CULL_MODE = 2 D3D12_CULL_MODE_BACK D3D12_CULL_MODE = 3 )
Cull mode constants.
type D3D12_DEPTH_STENCILOP_DESC ¶
type D3D12_DEPTH_STENCILOP_DESC struct {
StencilFailOp D3D12_STENCIL_OP
StencilDepthFailOp D3D12_STENCIL_OP
StencilPassOp D3D12_STENCIL_OP
StencilFunc D3D12_COMPARISON_FUNC
}
D3D12_DEPTH_STENCILOP_DESC describes stencil operations.
type D3D12_DEPTH_STENCIL_DESC ¶
type D3D12_DEPTH_STENCIL_DESC struct {
DepthEnable int32 // BOOL
DepthWriteMask D3D12_DEPTH_WRITE_MASK
DepthFunc D3D12_COMPARISON_FUNC
StencilEnable int32 // BOOL
StencilReadMask uint8
StencilWriteMask uint8
FrontFace D3D12_DEPTH_STENCILOP_DESC
BackFace D3D12_DEPTH_STENCILOP_DESC
}
D3D12_DEPTH_STENCIL_DESC describes the depth-stencil state.
type D3D12_DEPTH_STENCIL_VALUE ¶
D3D12_DEPTH_STENCIL_VALUE describes depth/stencil clear values.
type D3D12_DEPTH_STENCIL_VIEW_DESC ¶
type D3D12_DEPTH_STENCIL_VIEW_DESC struct {
Format DXGI_FORMAT
ViewDimension D3D12_DSV_DIMENSION
Flags D3D12_DSV_FLAGS
// Union of different view types
Union [8]byte
}
D3D12_DEPTH_STENCIL_VIEW_DESC describes a depth stencil view.
func (*D3D12_DEPTH_STENCIL_VIEW_DESC) SetTexture1D ¶
func (d *D3D12_DEPTH_STENCIL_VIEW_DESC) SetTexture1D(mipSlice uint32)
SetTexture1D sets up a 1D texture DSV.
func (*D3D12_DEPTH_STENCIL_VIEW_DESC) SetTexture2D ¶
func (d *D3D12_DEPTH_STENCIL_VIEW_DESC) SetTexture2D(mipSlice uint32)
SetTexture2D sets up a 2D texture DSV.
func (*D3D12_DEPTH_STENCIL_VIEW_DESC) SetTexture2DArray ¶
func (d *D3D12_DEPTH_STENCIL_VIEW_DESC) SetTexture2DArray(mipSlice, firstArraySlice, arraySize uint32)
SetTexture2DArray sets up a 2D texture array DSV.
type D3D12_DEPTH_WRITE_MASK ¶
type D3D12_DEPTH_WRITE_MASK uint32
D3D12_DEPTH_WRITE_MASK specifies depth write mask.
const ( D3D12_DEPTH_WRITE_MASK_ZERO D3D12_DEPTH_WRITE_MASK = 0 D3D12_DEPTH_WRITE_MASK_ALL D3D12_DEPTH_WRITE_MASK = 1 )
Depth write mask constants.
type D3D12_DESCRIPTOR_HEAP_DESC ¶
type D3D12_DESCRIPTOR_HEAP_DESC struct {
Type D3D12_DESCRIPTOR_HEAP_TYPE
NumDescriptors uint32
Flags D3D12_DESCRIPTOR_HEAP_FLAGS
NodeMask uint32
}
D3D12_DESCRIPTOR_HEAP_DESC describes a descriptor heap.
type D3D12_DESCRIPTOR_HEAP_FLAGS ¶
type D3D12_DESCRIPTOR_HEAP_FLAGS uint32
D3D12_DESCRIPTOR_HEAP_FLAGS specifies descriptor heap flags.
const ( D3D12_DESCRIPTOR_HEAP_FLAG_NONE D3D12_DESCRIPTOR_HEAP_FLAGS = 0 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE D3D12_DESCRIPTOR_HEAP_FLAGS = 1 )
Descriptor heap flag constants.
type D3D12_DESCRIPTOR_HEAP_TYPE ¶
type D3D12_DESCRIPTOR_HEAP_TYPE uint32
D3D12_DESCRIPTOR_HEAP_TYPE specifies the type of descriptor heap.
const ( D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV D3D12_DESCRIPTOR_HEAP_TYPE = 0 D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER D3D12_DESCRIPTOR_HEAP_TYPE = 1 D3D12_DESCRIPTOR_HEAP_TYPE_RTV D3D12_DESCRIPTOR_HEAP_TYPE = 2 D3D12_DESCRIPTOR_HEAP_TYPE_DSV D3D12_DESCRIPTOR_HEAP_TYPE = 3 D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES D3D12_DESCRIPTOR_HEAP_TYPE = 4 )
Descriptor heap type constants.
type D3D12_DESCRIPTOR_RANGE ¶
type D3D12_DESCRIPTOR_RANGE struct {
RangeType D3D12_DESCRIPTOR_RANGE_TYPE
NumDescriptors uint32
BaseShaderRegister uint32
RegisterSpace uint32
OffsetInDescriptorsFromTableStart uint32
}
D3D12_DESCRIPTOR_RANGE describes a descriptor range.
type D3D12_DESCRIPTOR_RANGE_TYPE ¶
type D3D12_DESCRIPTOR_RANGE_TYPE uint32
D3D12_DESCRIPTOR_RANGE_TYPE specifies the type of descriptor range.
const ( D3D12_DESCRIPTOR_RANGE_TYPE_SRV D3D12_DESCRIPTOR_RANGE_TYPE = 0 D3D12_DESCRIPTOR_RANGE_TYPE_UAV D3D12_DESCRIPTOR_RANGE_TYPE = 1 D3D12_DESCRIPTOR_RANGE_TYPE_CBV D3D12_DESCRIPTOR_RANGE_TYPE = 2 D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER D3D12_DESCRIPTOR_RANGE_TYPE = 3 )
Descriptor range type constants.
type D3D12_DISCARD_REGION ¶
type D3D12_DISCARD_REGION struct {
NumRects uint32
Rects *D3D12_RECT
FirstSubresource uint32
NumSubresources uint32
}
D3D12_DISCARD_REGION describes a discard region.
type D3D12_DISPATCH_ARGUMENTS ¶
type D3D12_DISPATCH_ARGUMENTS struct {
ThreadGroupCountX uint32
ThreadGroupCountY uint32
ThreadGroupCountZ uint32
}
D3D12_DISPATCH_ARGUMENTS describes dispatch arguments.
type D3D12_DRAW_ARGUMENTS ¶
type D3D12_DRAW_ARGUMENTS struct {
VertexCountPerInstance uint32
InstanceCount uint32
StartVertexLocation uint32
StartInstanceLocation uint32
}
D3D12_DRAW_ARGUMENTS describes draw arguments.
type D3D12_DRAW_INDEXED_ARGUMENTS ¶
type D3D12_DRAW_INDEXED_ARGUMENTS struct {
IndexCountPerInstance uint32
InstanceCount uint32
StartIndexLocation uint32
BaseVertexLocation int32
StartInstanceLocation uint32
}
D3D12_DRAW_INDEXED_ARGUMENTS describes draw indexed arguments.
type D3D12_DSV_DIMENSION ¶
type D3D12_DSV_DIMENSION uint32
D3D12_DSV_DIMENSION specifies depth stencil view dimension.
const ( D3D12_DSV_DIMENSION_UNKNOWN D3D12_DSV_DIMENSION = 0 D3D12_DSV_DIMENSION_TEXTURE1D D3D12_DSV_DIMENSION = 1 D3D12_DSV_DIMENSION_TEXTURE1DARRAY D3D12_DSV_DIMENSION = 2 D3D12_DSV_DIMENSION_TEXTURE2D D3D12_DSV_DIMENSION = 3 D3D12_DSV_DIMENSION_TEXTURE2DARRAY D3D12_DSV_DIMENSION = 4 D3D12_DSV_DIMENSION_TEXTURE2DMS D3D12_DSV_DIMENSION = 5 D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY D3D12_DSV_DIMENSION = 6 )
DSV dimension constants.
type D3D12_DSV_FLAGS ¶
type D3D12_DSV_FLAGS uint32
D3D12_DSV_FLAGS specifies depth stencil view flags.
const ( D3D12_DSV_FLAG_NONE D3D12_DSV_FLAGS = 0 D3D12_DSV_FLAG_READ_ONLY_DEPTH D3D12_DSV_FLAGS = 0x1 D3D12_DSV_FLAG_READ_ONLY_STENCIL D3D12_DSV_FLAGS = 0x2 )
DSV flag constants.
type D3D12_FEATURE ¶
type D3D12_FEATURE uint32
D3D12_FEATURE specifies the feature to query.
const ( D3D12_FEATURE_D3D12_OPTIONS D3D12_FEATURE = 0 D3D12_FEATURE_ARCHITECTURE D3D12_FEATURE = 1 D3D12_FEATURE_FEATURE_LEVELS D3D12_FEATURE = 2 D3D12_FEATURE_FORMAT_SUPPORT D3D12_FEATURE = 3 D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS D3D12_FEATURE = 4 D3D12_FEATURE_FORMAT_INFO D3D12_FEATURE = 5 D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT D3D12_FEATURE = 6 D3D12_FEATURE_SHADER_MODEL D3D12_FEATURE = 7 D3D12_FEATURE_D3D12_OPTIONS1 D3D12_FEATURE = 8 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT D3D12_FEATURE = 10 D3D12_FEATURE_ROOT_SIGNATURE D3D12_FEATURE = 12 D3D12_FEATURE_ARCHITECTURE1 D3D12_FEATURE = 16 D3D12_FEATURE_D3D12_OPTIONS2 D3D12_FEATURE = 18 D3D12_FEATURE_SHADER_CACHE D3D12_FEATURE = 19 D3D12_FEATURE_COMMAND_QUEUE_PRIORITY D3D12_FEATURE = 20 D3D12_FEATURE_D3D12_OPTIONS3 D3D12_FEATURE = 21 D3D12_FEATURE_EXISTING_HEAPS D3D12_FEATURE = 22 D3D12_FEATURE_D3D12_OPTIONS4 D3D12_FEATURE = 23 D3D12_FEATURE_SERIALIZATION D3D12_FEATURE = 24 D3D12_FEATURE_CROSS_NODE D3D12_FEATURE = 25 D3D12_FEATURE_D3D12_OPTIONS5 D3D12_FEATURE = 27 D3D12_FEATURE_D3D12_OPTIONS6 D3D12_FEATURE = 30 D3D12_FEATURE_QUERY_META_COMMAND D3D12_FEATURE = 31 D3D12_FEATURE_D3D12_OPTIONS7 D3D12_FEATURE = 32 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPE_COUNT D3D12_FEATURE = 33 D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPES D3D12_FEATURE = 34 )
D3D12 feature constants.
type D3D12_FEATURE_DATA_D3D12_OPTIONS ¶
type D3D12_FEATURE_DATA_D3D12_OPTIONS struct {
DoublePrecisionFloatShaderOps int32 // BOOL
OutputMergerLogicOp int32 // BOOL
MinPrecisionSupport uint32 // D3D12_SHADER_MIN_PRECISION_SUPPORT
TiledResourcesTier uint32 // D3D12_TILED_RESOURCES_TIER
ResourceBindingTier uint32 // D3D12_RESOURCE_BINDING_TIER
PSSpecifiedStencilRefSupported int32 // BOOL
TypedUAVLoadAdditionalFormats int32 // BOOL
ROVsSupported int32 // BOOL
ConservativeRasterizationTier uint32 // D3D12_CONSERVATIVE_RASTERIZATION_TIER
MaxGPUVirtualAddressBitsPerResource uint32
StandardSwizzle64KBSupported int32 // BOOL
CrossNodeSharingTier uint32 // D3D12_CROSS_NODE_SHARING_TIER
CrossAdapterRowMajorTextureSupported int32 // BOOL
VPAndRTArrayIndexFromAnyShaderFeedingRasterizerSupportedWithoutGSEmulation int32 // BOOL
ResourceHeapTier uint32 // D3D12_RESOURCE_HEAP_TIER
}
D3D12_FEATURE_DATA_D3D12_OPTIONS describes D3D12 options feature data.
type D3D12_FEATURE_DATA_FEATURE_LEVELS ¶
type D3D12_FEATURE_DATA_FEATURE_LEVELS struct {
NumFeatureLevels uint32
FeatureLevelsRequested *D3D_FEATURE_LEVEL
MaxSupportedFeatureLevel D3D_FEATURE_LEVEL
}
D3D12_FEATURE_DATA_FEATURE_LEVELS describes feature levels.
type D3D12_FEATURE_DATA_SHADER_MODEL ¶
type D3D12_FEATURE_DATA_SHADER_MODEL struct {
HighestShaderModel D3D_SHADER_MODEL
}
D3D12_FEATURE_DATA_SHADER_MODEL describes shader model feature data.
type D3D12_FENCE_FLAGS ¶
type D3D12_FENCE_FLAGS uint32
D3D12_FENCE_FLAGS specifies fence flags.
const ( D3D12_FENCE_FLAG_NONE D3D12_FENCE_FLAGS = 0 D3D12_FENCE_FLAG_SHARED D3D12_FENCE_FLAGS = 1 D3D12_FENCE_FLAG_SHARED_CROSS_ADAPTER D3D12_FENCE_FLAGS = 2 D3D12_FENCE_FLAG_NON_MONITORED D3D12_FENCE_FLAGS = 4 )
Fence flag constants.
type D3D12_FILL_MODE ¶
type D3D12_FILL_MODE uint32
D3D12_FILL_MODE specifies the fill mode.
const ( D3D12_FILL_MODE_WIREFRAME D3D12_FILL_MODE = 2 D3D12_FILL_MODE_SOLID D3D12_FILL_MODE = 3 )
Fill mode constants.
type D3D12_FILTER ¶
type D3D12_FILTER uint32
D3D12_FILTER specifies filtering options.
const ( D3D12_FILTER_MIN_MAG_MIP_POINT D3D12_FILTER = 0 D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR D3D12_FILTER = 0x1 D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT D3D12_FILTER = 0x4 D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR D3D12_FILTER = 0x5 D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT D3D12_FILTER = 0x10 D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR D3D12_FILTER = 0x11 D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT D3D12_FILTER = 0x14 D3D12_FILTER_MIN_MAG_MIP_LINEAR D3D12_FILTER = 0x15 D3D12_FILTER_ANISOTROPIC D3D12_FILTER = 0x55 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_POINT D3D12_FILTER = 0x80 D3D12_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR D3D12_FILTER = 0x81 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT D3D12_FILTER = 0x84 D3D12_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR D3D12_FILTER = 0x85 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT D3D12_FILTER = 0x90 D3D12_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR D3D12_FILTER = 0x91 D3D12_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT D3D12_FILTER = 0x94 D3D12_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR D3D12_FILTER = 0x95 D3D12_FILTER_COMPARISON_ANISOTROPIC D3D12_FILTER = 0xD5 )
Filter constants.
type D3D12_GPU_DESCRIPTOR_HANDLE ¶
type D3D12_GPU_DESCRIPTOR_HANDLE struct {
Ptr uint64
}
D3D12_GPU_DESCRIPTOR_HANDLE represents a GPU descriptor handle.
func (D3D12_GPU_DESCRIPTOR_HANDLE) Offset ¶
func (h D3D12_GPU_DESCRIPTOR_HANDLE) Offset(index int, incrementSize uint32) D3D12_GPU_DESCRIPTOR_HANDLE
Offset returns a new handle offset by the given number of descriptors.
type D3D12_GRAPHICS_PIPELINE_STATE_DESC ¶
type D3D12_GRAPHICS_PIPELINE_STATE_DESC struct {
RootSignature *ID3D12RootSignature
VS D3D12_SHADER_BYTECODE
PS D3D12_SHADER_BYTECODE
DS D3D12_SHADER_BYTECODE
HS D3D12_SHADER_BYTECODE
GS D3D12_SHADER_BYTECODE
StreamOutput D3D12_STREAM_OUTPUT_DESC
BlendState D3D12_BLEND_DESC
SampleMask uint32
RasterizerState D3D12_RASTERIZER_DESC
DepthStencilState D3D12_DEPTH_STENCIL_DESC
InputLayout D3D12_INPUT_LAYOUT_DESC
IBStripCutValue D3D12_INDEX_BUFFER_STRIP_CUT_VALUE
PrimitiveTopologyType D3D12_PRIMITIVE_TOPOLOGY_TYPE
NumRenderTargets uint32
RTVFormats [8]DXGI_FORMAT
DSVFormat DXGI_FORMAT
SampleDesc DXGI_SAMPLE_DESC
NodeMask uint32
CachedPSO D3D12_CACHED_PIPELINE_STATE
Flags D3D12_PIPELINE_STATE_FLAGS
}
D3D12_GRAPHICS_PIPELINE_STATE_DESC describes a graphics pipeline state.
type D3D12_HEAP_DESC ¶
type D3D12_HEAP_DESC struct {
SizeInBytes uint64
Properties D3D12_HEAP_PROPERTIES
Alignment uint64
Flags D3D12_HEAP_FLAGS
}
D3D12_HEAP_DESC describes a heap.
type D3D12_HEAP_FLAGS ¶
type D3D12_HEAP_FLAGS uint32
D3D12_HEAP_FLAGS specifies heap options.
const ( D3D12_HEAP_FLAG_NONE D3D12_HEAP_FLAGS = 0 D3D12_HEAP_FLAG_SHARED D3D12_HEAP_FLAGS = 1 D3D12_HEAP_FLAG_DENY_BUFFERS D3D12_HEAP_FLAGS = 4 D3D12_HEAP_FLAG_ALLOW_DISPLAY D3D12_HEAP_FLAGS = 8 D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER D3D12_HEAP_FLAGS = 32 D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES D3D12_HEAP_FLAGS = 64 D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES D3D12_HEAP_FLAGS = 128 D3D12_HEAP_FLAG_HARDWARE_PROTECTED D3D12_HEAP_FLAGS = 256 D3D12_HEAP_FLAG_ALLOW_WRITE_WATCH D3D12_HEAP_FLAGS = 512 D3D12_HEAP_FLAG_ALLOW_SHADER_ATOMICS D3D12_HEAP_FLAGS = 1024 D3D12_HEAP_FLAG_CREATE_NOT_RESIDENT D3D12_HEAP_FLAGS = 2048 D3D12_HEAP_FLAG_CREATE_NOT_ZEROED D3D12_HEAP_FLAGS = 4096 D3D12_HEAP_FLAG_ALLOW_ALL_BUFFERS_AND_TEXTURES D3D12_HEAP_FLAGS = 0 D3D12_HEAP_FLAG_ALLOW_ONLY_BUFFERS D3D12_HEAP_FLAGS = 192 D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURES D3D12_HEAP_FLAGS = 68 D3D12_HEAP_FLAG_ALLOW_ONLY_RT_DS_TEXTURES D3D12_HEAP_FLAGS = 132 )
Heap flag constants.
type D3D12_HEAP_PROPERTIES ¶
type D3D12_HEAP_PROPERTIES struct {
Type D3D12_HEAP_TYPE
CPUPageProperty D3D12_CPU_PAGE_PROPERTY
MemoryPoolPreference D3D12_MEMORY_POOL
CreationNodeMask uint32
VisibleNodeMask uint32
}
D3D12_HEAP_PROPERTIES describes heap properties.
type D3D12_HEAP_TYPE ¶
type D3D12_HEAP_TYPE uint32
D3D12_HEAP_TYPE specifies the type of heap.
const ( D3D12_HEAP_TYPE_DEFAULT D3D12_HEAP_TYPE = 1 D3D12_HEAP_TYPE_UPLOAD D3D12_HEAP_TYPE = 2 D3D12_HEAP_TYPE_READBACK D3D12_HEAP_TYPE = 3 D3D12_HEAP_TYPE_CUSTOM D3D12_HEAP_TYPE = 4 )
Heap type constants.
type D3D12_INDEX_BUFFER_STRIP_CUT_VALUE ¶
type D3D12_INDEX_BUFFER_STRIP_CUT_VALUE uint32
D3D12_INDEX_BUFFER_STRIP_CUT_VALUE specifies index buffer strip cut value.
const ( D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_DISABLED D3D12_INDEX_BUFFER_STRIP_CUT_VALUE = 0 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF D3D12_INDEX_BUFFER_STRIP_CUT_VALUE = 1 D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF D3D12_INDEX_BUFFER_STRIP_CUT_VALUE = 2 )
Index buffer strip cut value constants.
type D3D12_INDEX_BUFFER_VIEW ¶
type D3D12_INDEX_BUFFER_VIEW struct {
BufferLocation uint64
SizeInBytes uint32
Format DXGI_FORMAT
}
D3D12_INDEX_BUFFER_VIEW describes an index buffer view.
type D3D12_INDIRECT_ARGUMENT_DESC ¶
type D3D12_INDIRECT_ARGUMENT_DESC struct {
Type D3D12_INDIRECT_ARGUMENT_TYPE
// Union for different argument types
Union [8]byte
}
D3D12_INDIRECT_ARGUMENT_DESC describes an indirect argument.
type D3D12_INDIRECT_ARGUMENT_TYPE ¶
type D3D12_INDIRECT_ARGUMENT_TYPE uint32
D3D12_INDIRECT_ARGUMENT_TYPE specifies indirect argument type.
const ( D3D12_INDIRECT_ARGUMENT_TYPE_DRAW D3D12_INDIRECT_ARGUMENT_TYPE = 0 D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED D3D12_INDIRECT_ARGUMENT_TYPE = 1 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH D3D12_INDIRECT_ARGUMENT_TYPE = 2 D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW D3D12_INDIRECT_ARGUMENT_TYPE = 3 D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW D3D12_INDIRECT_ARGUMENT_TYPE = 4 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT D3D12_INDIRECT_ARGUMENT_TYPE = 5 D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW D3D12_INDIRECT_ARGUMENT_TYPE = 6 D3D12_INDIRECT_ARGUMENT_TYPE_SHADER_RESOURCE_VIEW D3D12_INDIRECT_ARGUMENT_TYPE = 7 D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW D3D12_INDIRECT_ARGUMENT_TYPE = 8 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_RAYS D3D12_INDIRECT_ARGUMENT_TYPE = 9 D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_MESH D3D12_INDIRECT_ARGUMENT_TYPE = 10 )
Indirect argument type constants.
type D3D12_INPUT_CLASSIFICATION ¶
type D3D12_INPUT_CLASSIFICATION uint32
D3D12_INPUT_CLASSIFICATION specifies input slot classification.
const ( D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA D3D12_INPUT_CLASSIFICATION = 0 D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA D3D12_INPUT_CLASSIFICATION = 1 )
Input classification constants.
type D3D12_INPUT_ELEMENT_DESC ¶
type D3D12_INPUT_ELEMENT_DESC struct {
SemanticName *byte
SemanticIndex uint32
Format DXGI_FORMAT
InputSlot uint32
AlignedByteOffset uint32
InputSlotClass D3D12_INPUT_CLASSIFICATION
InstanceDataStepRate uint32
}
D3D12_INPUT_ELEMENT_DESC describes an input element.
type D3D12_INPUT_LAYOUT_DESC ¶
type D3D12_INPUT_LAYOUT_DESC struct {
InputElementDescs *D3D12_INPUT_ELEMENT_DESC
NumElements uint32
}
D3D12_INPUT_LAYOUT_DESC describes an input layout.
type D3D12_LOGIC_OP ¶
type D3D12_LOGIC_OP uint32
D3D12_LOGIC_OP specifies the logical operation.
const ( D3D12_LOGIC_OP_CLEAR D3D12_LOGIC_OP = 0 D3D12_LOGIC_OP_SET D3D12_LOGIC_OP = 1 D3D12_LOGIC_OP_COPY D3D12_LOGIC_OP = 2 D3D12_LOGIC_OP_COPY_INVERTED D3D12_LOGIC_OP = 3 D3D12_LOGIC_OP_NOOP D3D12_LOGIC_OP = 4 D3D12_LOGIC_OP_INVERT D3D12_LOGIC_OP = 5 D3D12_LOGIC_OP_AND D3D12_LOGIC_OP = 6 D3D12_LOGIC_OP_NAND D3D12_LOGIC_OP = 7 D3D12_LOGIC_OP_OR D3D12_LOGIC_OP = 8 D3D12_LOGIC_OP_NOR D3D12_LOGIC_OP = 9 D3D12_LOGIC_OP_XOR D3D12_LOGIC_OP = 10 D3D12_LOGIC_OP_EQUIV D3D12_LOGIC_OP = 11 D3D12_LOGIC_OP_AND_REVERSE D3D12_LOGIC_OP = 12 D3D12_LOGIC_OP_AND_INVERTED D3D12_LOGIC_OP = 13 D3D12_LOGIC_OP_OR_REVERSE D3D12_LOGIC_OP = 14 D3D12_LOGIC_OP_OR_INVERTED D3D12_LOGIC_OP = 15 )
Logic operation constants.
type D3D12_MEMORY_POOL ¶
type D3D12_MEMORY_POOL uint32
D3D12_MEMORY_POOL specifies the memory pool for the heap.
const ( D3D12_MEMORY_POOL_UNKNOWN D3D12_MEMORY_POOL = 0 D3D12_MEMORY_POOL_L0 D3D12_MEMORY_POOL = 1 D3D12_MEMORY_POOL_L1 D3D12_MEMORY_POOL = 2 )
Memory pool constants.
type D3D12_PIPELINE_STATE_FLAGS ¶
type D3D12_PIPELINE_STATE_FLAGS uint32
D3D12_PIPELINE_STATE_FLAGS specifies pipeline state flags.
const ( D3D12_PIPELINE_STATE_FLAG_NONE D3D12_PIPELINE_STATE_FLAGS = 0 D3D12_PIPELINE_STATE_FLAG_TOOL_DEBUG D3D12_PIPELINE_STATE_FLAGS = 0x1 )
Pipeline state flag constants.
type D3D12_PLACED_SUBRESOURCE_FOOTPRINT ¶
type D3D12_PLACED_SUBRESOURCE_FOOTPRINT struct {
Offset uint64
Footprint D3D12_SUBRESOURCE_FOOTPRINT
}
D3D12_PLACED_SUBRESOURCE_FOOTPRINT describes a placed subresource footprint.
type D3D12_PREDICATION_OP ¶
type D3D12_PREDICATION_OP uint32
D3D12_PREDICATION_OP specifies predication operation.
const ( D3D12_PREDICATION_OP_EQUAL_ZERO D3D12_PREDICATION_OP = 0 D3D12_PREDICATION_OP_NOT_EQUAL_ZERO D3D12_PREDICATION_OP = 1 )
Predication operation constants.
type D3D12_PRIMITIVE_TOPOLOGY_TYPE ¶
type D3D12_PRIMITIVE_TOPOLOGY_TYPE uint32
D3D12_PRIMITIVE_TOPOLOGY_TYPE specifies primitive topology type.
const ( D3D12_PRIMITIVE_TOPOLOGY_TYPE_UNDEFINED D3D12_PRIMITIVE_TOPOLOGY_TYPE = 0 D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT D3D12_PRIMITIVE_TOPOLOGY_TYPE = 1 D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE D3D12_PRIMITIVE_TOPOLOGY_TYPE = 2 D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE D3D12_PRIMITIVE_TOPOLOGY_TYPE = 3 D3D12_PRIMITIVE_TOPOLOGY_TYPE_PATCH D3D12_PRIMITIVE_TOPOLOGY_TYPE = 4 )
Primitive topology type constants.
type D3D12_QUERY_DATA_PIPELINE_STATISTICS ¶
type D3D12_QUERY_DATA_PIPELINE_STATISTICS struct {
IAVertices uint64
IAPrimitives uint64
VSInvocations uint64
GSInvocations uint64
GSPrimitives uint64
CInvocations uint64
CPrimitives uint64
PSInvocations uint64
HSInvocations uint64
DSInvocations uint64
CSInvocations uint64
}
D3D12_QUERY_DATA_PIPELINE_STATISTICS contains pipeline statistics query data.
type D3D12_QUERY_DATA_SO_STATISTICS ¶
type D3D12_QUERY_DATA_SO_STATISTICS struct {
NumPrimitivesWritten uint64
PrimitivesStorageNeeded uint64
}
D3D12_QUERY_DATA_SO_STATISTICS contains stream output statistics query data.
type D3D12_QUERY_HEAP_DESC ¶
type D3D12_QUERY_HEAP_DESC struct {
Type D3D12_QUERY_HEAP_TYPE
Count uint32
NodeMask uint32
}
D3D12_QUERY_HEAP_DESC describes a query heap.
type D3D12_QUERY_HEAP_TYPE ¶
type D3D12_QUERY_HEAP_TYPE uint32
D3D12_QUERY_HEAP_TYPE specifies query heap types.
const ( D3D12_QUERY_HEAP_TYPE_OCCLUSION D3D12_QUERY_HEAP_TYPE = 0 D3D12_QUERY_HEAP_TYPE_TIMESTAMP D3D12_QUERY_HEAP_TYPE = 1 D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS D3D12_QUERY_HEAP_TYPE = 2 D3D12_QUERY_HEAP_TYPE_SO_STATISTICS D3D12_QUERY_HEAP_TYPE = 3 D3D12_QUERY_HEAP_TYPE_VIDEO_DECODE_STATISTICS D3D12_QUERY_HEAP_TYPE = 4 D3D12_QUERY_HEAP_TYPE_COPY_QUEUE_TIMESTAMP D3D12_QUERY_HEAP_TYPE = 5 )
Query heap type constants.
type D3D12_QUERY_TYPE ¶
type D3D12_QUERY_TYPE uint32
D3D12_QUERY_TYPE specifies query types.
const ( D3D12_QUERY_TYPE_OCCLUSION D3D12_QUERY_TYPE = 0 D3D12_QUERY_TYPE_BINARY_OCCLUSION D3D12_QUERY_TYPE = 1 D3D12_QUERY_TYPE_TIMESTAMP D3D12_QUERY_TYPE = 2 D3D12_QUERY_TYPE_PIPELINE_STATISTICS D3D12_QUERY_TYPE = 3 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM0 D3D12_QUERY_TYPE = 4 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM1 D3D12_QUERY_TYPE = 5 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM2 D3D12_QUERY_TYPE = 6 D3D12_QUERY_TYPE_SO_STATISTICS_STREAM3 D3D12_QUERY_TYPE = 7 D3D12_QUERY_TYPE_VIDEO_DECODE_STATISTICS D3D12_QUERY_TYPE = 8 )
Query type constants.
type D3D12_RANGE ¶
D3D12_RANGE describes a memory range.
type D3D12_RASTERIZER_DESC ¶
type D3D12_RASTERIZER_DESC struct {
FillMode D3D12_FILL_MODE
CullMode D3D12_CULL_MODE
FrontCounterClockwise int32 // BOOL
DepthBias int32
DepthBiasClamp float32
SlopeScaledDepthBias float32
DepthClipEnable int32 // BOOL
MultisampleEnable int32 // BOOL
AntialiasedLineEnable int32 // BOOL
ForcedSampleCount uint32
ConservativeRaster D3D12_CONSERVATIVE_RASTERIZATION_MODE
}
D3D12_RASTERIZER_DESC describes the rasterizer state.
type D3D12_RECT ¶
D3D12_RECT describes a rectangle.
type D3D12_RENDER_PASS_BEGINNING_ACCESS ¶
type D3D12_RENDER_PASS_BEGINNING_ACCESS struct {
Type D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE
// Union for Clear (D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS)
Union [20]byte
}
D3D12_RENDER_PASS_BEGINNING_ACCESS describes render pass beginning access.
type D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS ¶
type D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS struct {
ClearValue D3D12_CLEAR_VALUE
}
D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS describes clear parameters.
type D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE ¶
type D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE uint32
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE specifies render pass beginning access type.
const ( D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_DISCARD D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE = 0 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE = 1 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE = 2 D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE = 3 )
Render pass beginning access type constants.
type D3D12_RENDER_PASS_DEPTH_STENCIL_DESC ¶
type D3D12_RENDER_PASS_DEPTH_STENCIL_DESC struct {
CPUDescriptor D3D12_CPU_DESCRIPTOR_HANDLE
DepthBeginningAccess D3D12_RENDER_PASS_BEGINNING_ACCESS
StencilBeginningAccess D3D12_RENDER_PASS_BEGINNING_ACCESS
DepthEndingAccess D3D12_RENDER_PASS_ENDING_ACCESS
StencilEndingAccess D3D12_RENDER_PASS_ENDING_ACCESS
}
D3D12_RENDER_PASS_DEPTH_STENCIL_DESC describes a render pass depth stencil.
type D3D12_RENDER_PASS_ENDING_ACCESS ¶
type D3D12_RENDER_PASS_ENDING_ACCESS struct {
Type D3D12_RENDER_PASS_ENDING_ACCESS_TYPE
// Union for Resolve (D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS)
Union [48]byte
}
D3D12_RENDER_PASS_ENDING_ACCESS describes render pass ending access.
type D3D12_RENDER_PASS_ENDING_ACCESS_TYPE ¶
type D3D12_RENDER_PASS_ENDING_ACCESS_TYPE uint32
D3D12_RENDER_PASS_ENDING_ACCESS_TYPE specifies render pass ending access type.
const ( D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD D3D12_RENDER_PASS_ENDING_ACCESS_TYPE = 0 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE D3D12_RENDER_PASS_ENDING_ACCESS_TYPE = 1 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE D3D12_RENDER_PASS_ENDING_ACCESS_TYPE = 2 D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS D3D12_RENDER_PASS_ENDING_ACCESS_TYPE = 3 )
Render pass ending access type constants.
type D3D12_RENDER_PASS_FLAGS ¶
type D3D12_RENDER_PASS_FLAGS uint32
D3D12_RENDER_PASS_FLAGS specifies render pass flags.
const ( D3D12_RENDER_PASS_FLAG_NONE D3D12_RENDER_PASS_FLAGS = 0 D3D12_RENDER_PASS_FLAG_ALLOW_UAV_WRITES D3D12_RENDER_PASS_FLAGS = 0x1 D3D12_RENDER_PASS_FLAG_SUSPENDING_PASS D3D12_RENDER_PASS_FLAGS = 0x2 D3D12_RENDER_PASS_FLAG_RESUMING_PASS D3D12_RENDER_PASS_FLAGS = 0x4 )
Render pass flag constants.
type D3D12_RENDER_PASS_RENDER_TARGET_DESC ¶
type D3D12_RENDER_PASS_RENDER_TARGET_DESC struct {
CPUDescriptor D3D12_CPU_DESCRIPTOR_HANDLE
BeginningAccess D3D12_RENDER_PASS_BEGINNING_ACCESS
EndingAccess D3D12_RENDER_PASS_ENDING_ACCESS
}
D3D12_RENDER_PASS_RENDER_TARGET_DESC describes a render pass render target.
type D3D12_RENDER_TARGET_BLEND_DESC ¶
type D3D12_RENDER_TARGET_BLEND_DESC struct {
BlendEnable int32 // BOOL
LogicOpEnable int32 // BOOL
SrcBlend D3D12_BLEND
DestBlend D3D12_BLEND
BlendOp D3D12_BLEND_OP
SrcBlendAlpha D3D12_BLEND
DestBlendAlpha D3D12_BLEND
BlendOpAlpha D3D12_BLEND_OP
LogicOp D3D12_LOGIC_OP
RenderTargetWriteMask uint8
}
D3D12_RENDER_TARGET_BLEND_DESC describes the blend state for a render target.
type D3D12_RENDER_TARGET_VIEW_DESC ¶
type D3D12_RENDER_TARGET_VIEW_DESC struct {
Format DXGI_FORMAT
ViewDimension D3D12_RTV_DIMENSION
// Union of different view types
Union [12]byte
}
D3D12_RENDER_TARGET_VIEW_DESC describes a render target view.
func (*D3D12_RENDER_TARGET_VIEW_DESC) SetTexture1D ¶
func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture1D(mipSlice uint32)
SetTexture1D sets up a 1D texture RTV.
func (*D3D12_RENDER_TARGET_VIEW_DESC) SetTexture2D ¶
func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture2D(mipSlice, planeSlice uint32)
SetTexture2D sets up a 2D texture RTV.
func (*D3D12_RENDER_TARGET_VIEW_DESC) SetTexture2DArray ¶
func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture2DArray(mipSlice, firstArraySlice, arraySize, planeSlice uint32)
SetTexture2DArray sets up a 2D texture array RTV.
func (*D3D12_RENDER_TARGET_VIEW_DESC) SetTexture3D ¶
func (d *D3D12_RENDER_TARGET_VIEW_DESC) SetTexture3D(mipSlice, firstWSlice, wSize uint32)
SetTexture3D sets up a 3D texture RTV.
type D3D12_RESOURCE_ALIASING_BARRIER ¶
type D3D12_RESOURCE_ALIASING_BARRIER struct {
ResourceBefore *ID3D12Resource
ResourceAfter *ID3D12Resource
}
D3D12_RESOURCE_ALIASING_BARRIER describes a resource aliasing barrier.
type D3D12_RESOURCE_ALLOCATION_INFO ¶
D3D12_RESOURCE_ALLOCATION_INFO describes resource allocation information.
type D3D12_RESOURCE_BARRIER ¶
type D3D12_RESOURCE_BARRIER struct {
Type D3D12_RESOURCE_BARRIER_TYPE
Flags D3D12_RESOURCE_BARRIER_FLAGS
// This is a union in C. We use a fixed-size array and interpret based on Type.
// Transition: 24 bytes, Aliasing: 16 bytes, UAV: 8 bytes
// We use 24 bytes to accommodate the largest variant.
Union [24]byte
}
D3D12_RESOURCE_BARRIER describes a resource barrier.
func NewAliasingBarrier ¶
func NewAliasingBarrier(before, after *ID3D12Resource) D3D12_RESOURCE_BARRIER
NewAliasingBarrier creates an aliasing barrier.
func NewTransitionBarrier ¶
func NewTransitionBarrier(resource *ID3D12Resource, stateBefore, stateAfter D3D12_RESOURCE_STATES, subresource uint32) D3D12_RESOURCE_BARRIER
NewTransitionBarrier creates a transition barrier.
func NewUAVBarrier ¶
func NewUAVBarrier(resource *ID3D12Resource) D3D12_RESOURCE_BARRIER
NewUAVBarrier creates a UAV barrier.
type D3D12_RESOURCE_BARRIER_FLAGS ¶
type D3D12_RESOURCE_BARRIER_FLAGS uint32
D3D12_RESOURCE_BARRIER_FLAGS specifies resource barrier flags.
const ( D3D12_RESOURCE_BARRIER_FLAG_NONE D3D12_RESOURCE_BARRIER_FLAGS = 0 D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY D3D12_RESOURCE_BARRIER_FLAGS = 1 D3D12_RESOURCE_BARRIER_FLAG_END_ONLY D3D12_RESOURCE_BARRIER_FLAGS = 2 )
Resource barrier flag constants.
type D3D12_RESOURCE_BARRIER_TYPE ¶
type D3D12_RESOURCE_BARRIER_TYPE uint32
D3D12_RESOURCE_BARRIER_TYPE specifies the type of resource barrier.
const ( D3D12_RESOURCE_BARRIER_TYPE_TRANSITION D3D12_RESOURCE_BARRIER_TYPE = 0 D3D12_RESOURCE_BARRIER_TYPE_ALIASING D3D12_RESOURCE_BARRIER_TYPE = 1 D3D12_RESOURCE_BARRIER_TYPE_UAV D3D12_RESOURCE_BARRIER_TYPE = 2 )
Resource barrier type constants.
type D3D12_RESOURCE_DESC ¶
type D3D12_RESOURCE_DESC struct {
Dimension D3D12_RESOURCE_DIMENSION
Alignment uint64
Width uint64
Height uint32
DepthOrArraySize uint16
MipLevels uint16
Format DXGI_FORMAT
SampleDesc DXGI_SAMPLE_DESC
Layout D3D12_TEXTURE_LAYOUT
Flags D3D12_RESOURCE_FLAGS
}
D3D12_RESOURCE_DESC describes a resource.
type D3D12_RESOURCE_DIMENSION ¶
type D3D12_RESOURCE_DIMENSION uint32
D3D12_RESOURCE_DIMENSION specifies the dimension of a resource.
const ( D3D12_RESOURCE_DIMENSION_UNKNOWN D3D12_RESOURCE_DIMENSION = 0 D3D12_RESOURCE_DIMENSION_BUFFER D3D12_RESOURCE_DIMENSION = 1 D3D12_RESOURCE_DIMENSION_TEXTURE1D D3D12_RESOURCE_DIMENSION = 2 D3D12_RESOURCE_DIMENSION_TEXTURE2D D3D12_RESOURCE_DIMENSION = 3 D3D12_RESOURCE_DIMENSION_TEXTURE3D D3D12_RESOURCE_DIMENSION = 4 )
Resource dimension constants.
type D3D12_RESOURCE_FLAGS ¶
type D3D12_RESOURCE_FLAGS uint32
D3D12_RESOURCE_FLAGS specifies resource options.
const ( D3D12_RESOURCE_FLAG_NONE D3D12_RESOURCE_FLAGS = 0 D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET D3D12_RESOURCE_FLAGS = 1 D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL D3D12_RESOURCE_FLAGS = 2 D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS D3D12_RESOURCE_FLAGS = 4 D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE D3D12_RESOURCE_FLAGS = 8 D3D12_RESOURCE_FLAG_ALLOW_CROSS_ADAPTER D3D12_RESOURCE_FLAGS = 16 D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS D3D12_RESOURCE_FLAGS = 32 D3D12_RESOURCE_FLAG_VIDEO_DECODE_REFERENCE_ONLY D3D12_RESOURCE_FLAGS = 64 )
Resource flag constants.
type D3D12_RESOURCE_STATES ¶
type D3D12_RESOURCE_STATES uint32
D3D12_RESOURCE_STATES specifies the state of a resource.
const ( D3D12_RESOURCE_STATE_COMMON D3D12_RESOURCE_STATES = 0 D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER D3D12_RESOURCE_STATES = 0x1 D3D12_RESOURCE_STATE_INDEX_BUFFER D3D12_RESOURCE_STATES = 0x2 D3D12_RESOURCE_STATE_RENDER_TARGET D3D12_RESOURCE_STATES = 0x4 D3D12_RESOURCE_STATE_UNORDERED_ACCESS D3D12_RESOURCE_STATES = 0x8 D3D12_RESOURCE_STATE_DEPTH_WRITE D3D12_RESOURCE_STATES = 0x10 D3D12_RESOURCE_STATE_DEPTH_READ D3D12_RESOURCE_STATES = 0x20 D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE D3D12_RESOURCE_STATES = 0x40 D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE D3D12_RESOURCE_STATES = 0x80 D3D12_RESOURCE_STATE_STREAM_OUT D3D12_RESOURCE_STATES = 0x100 D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT D3D12_RESOURCE_STATES = 0x200 D3D12_RESOURCE_STATE_COPY_DEST D3D12_RESOURCE_STATES = 0x400 D3D12_RESOURCE_STATE_COPY_SOURCE D3D12_RESOURCE_STATES = 0x800 D3D12_RESOURCE_STATE_RESOLVE_DEST D3D12_RESOURCE_STATES = 0x1000 D3D12_RESOURCE_STATE_RESOLVE_SOURCE D3D12_RESOURCE_STATES = 0x2000 D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE D3D12_RESOURCE_STATES = 0x400000 D3D12_RESOURCE_STATE_SHADING_RATE_SOURCE D3D12_RESOURCE_STATES = 0x1000000 D3D12_RESOURCE_STATE_GENERIC_READ D3D12_RESOURCE_STATES = 0x1 | 0x2 | 0x40 | 0x80 | 0x200 | 0x800 D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE D3D12_RESOURCE_STATES = 0x40 | 0x80 D3D12_RESOURCE_STATE_PRESENT D3D12_RESOURCE_STATES = 0 D3D12_RESOURCE_STATE_PREDICATION D3D12_RESOURCE_STATES = 0x200 D3D12_RESOURCE_STATE_VIDEO_DECODE_READ D3D12_RESOURCE_STATES = 0x10000 D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE D3D12_RESOURCE_STATES = 0x20000 D3D12_RESOURCE_STATE_VIDEO_PROCESS_READ D3D12_RESOURCE_STATES = 0x40000 D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE D3D12_RESOURCE_STATES = 0x80000 D3D12_RESOURCE_STATE_VIDEO_ENCODE_READ D3D12_RESOURCE_STATES = 0x200000 D3D12_RESOURCE_STATE_VIDEO_ENCODE_WRITE D3D12_RESOURCE_STATES = 0x800000 )
Resource state constants.
type D3D12_RESOURCE_TRANSITION_BARRIER ¶
type D3D12_RESOURCE_TRANSITION_BARRIER struct {
Resource *ID3D12Resource
Subresource uint32
StateBefore D3D12_RESOURCE_STATES
StateAfter D3D12_RESOURCE_STATES
}
D3D12_RESOURCE_TRANSITION_BARRIER describes a resource transition barrier.
type D3D12_RESOURCE_UAV_BARRIER ¶
type D3D12_RESOURCE_UAV_BARRIER struct {
Resource *ID3D12Resource
}
D3D12_RESOURCE_UAV_BARRIER describes a UAV barrier.
type D3D12_ROOT_CONSTANTS ¶
type D3D12_ROOT_CONSTANTS struct {
ShaderRegister uint32
RegisterSpace uint32
Num32BitValues uint32
}
D3D12_ROOT_CONSTANTS describes root constants.
type D3D12_ROOT_DESCRIPTOR ¶
D3D12_ROOT_DESCRIPTOR describes a root descriptor.
type D3D12_ROOT_DESCRIPTOR_TABLE ¶
type D3D12_ROOT_DESCRIPTOR_TABLE struct {
NumDescriptorRanges uint32
DescriptorRanges *D3D12_DESCRIPTOR_RANGE
}
D3D12_ROOT_DESCRIPTOR_TABLE describes a descriptor table.
type D3D12_ROOT_PARAMETER ¶
type D3D12_ROOT_PARAMETER struct {
ParameterType D3D12_ROOT_PARAMETER_TYPE
// Union of DescriptorTable, Constants, or Descriptor.
// Access via unsafe.Pointer(&Union[0]) cast to the appropriate type.
Union [2]uint64
ShaderVisibility D3D12_SHADER_VISIBILITY
}
D3D12_ROOT_PARAMETER describes a root parameter. The Union field uses [2]uint64 (not [16]byte) to enforce 8-byte alignment, matching the C ABI where the union contains a pointer (D3D12_ROOT_DESCRIPTOR_TABLE). With [16]byte (alignment 1), Go places Union at offset 4 → 24-byte struct. With [2]uint64 (alignment 8), Go pads to offset 8 → 32-byte struct (correct).
type D3D12_ROOT_PARAMETER_TYPE ¶
type D3D12_ROOT_PARAMETER_TYPE uint32
D3D12_ROOT_PARAMETER_TYPE specifies the type of root parameter.
const ( D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE D3D12_ROOT_PARAMETER_TYPE = 0 D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS D3D12_ROOT_PARAMETER_TYPE = 1 D3D12_ROOT_PARAMETER_TYPE_CBV D3D12_ROOT_PARAMETER_TYPE = 2 D3D12_ROOT_PARAMETER_TYPE_SRV D3D12_ROOT_PARAMETER_TYPE = 3 D3D12_ROOT_PARAMETER_TYPE_UAV D3D12_ROOT_PARAMETER_TYPE = 4 )
Root parameter type constants.
type D3D12_ROOT_SIGNATURE_DESC ¶
type D3D12_ROOT_SIGNATURE_DESC struct {
NumParameters uint32
Parameters *D3D12_ROOT_PARAMETER
NumStaticSamplers uint32
StaticSamplers *D3D12_STATIC_SAMPLER_DESC
Flags D3D12_ROOT_SIGNATURE_FLAGS
}
D3D12_ROOT_SIGNATURE_DESC describes a root signature.
type D3D12_ROOT_SIGNATURE_FLAGS ¶
type D3D12_ROOT_SIGNATURE_FLAGS uint32
D3D12_ROOT_SIGNATURE_FLAGS specifies root signature flags.
const ( D3D12_ROOT_SIGNATURE_FLAG_NONE D3D12_ROOT_SIGNATURE_FLAGS = 0 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT D3D12_ROOT_SIGNATURE_FLAGS = 0x1 D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS D3D12_ROOT_SIGNATURE_FLAGS = 0x2 D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS D3D12_ROOT_SIGNATURE_FLAGS = 0x4 D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS D3D12_ROOT_SIGNATURE_FLAGS = 0x8 D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS D3D12_ROOT_SIGNATURE_FLAGS = 0x10 D3D12_ROOT_SIGNATURE_FLAG_DENY_PIXEL_SHADER_ROOT_ACCESS D3D12_ROOT_SIGNATURE_FLAGS = 0x20 D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT D3D12_ROOT_SIGNATURE_FLAGS = 0x40 D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE D3D12_ROOT_SIGNATURE_FLAGS = 0x80 D3D12_ROOT_SIGNATURE_FLAG_DENY_AMPLIFICATION_SHADER_ROOT_ACCESS D3D12_ROOT_SIGNATURE_FLAGS = 0x100 D3D12_ROOT_SIGNATURE_FLAG_DENY_MESH_SHADER_ROOT_ACCESS D3D12_ROOT_SIGNATURE_FLAGS = 0x200 D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED D3D12_ROOT_SIGNATURE_FLAGS = 0x400 D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED D3D12_ROOT_SIGNATURE_FLAGS = 0x800 )
Root signature flag constants.
type D3D12_ROOT_SIGNATURE_VERSION ¶
type D3D12_ROOT_SIGNATURE_VERSION uint32
D3D12_ROOT_SIGNATURE_VERSION specifies root signature version.
const ( D3D_ROOT_SIGNATURE_VERSION_1 D3D12_ROOT_SIGNATURE_VERSION = 0x1 D3D_ROOT_SIGNATURE_VERSION_1_0 D3D12_ROOT_SIGNATURE_VERSION = 0x1 D3D_ROOT_SIGNATURE_VERSION_1_1 D3D12_ROOT_SIGNATURE_VERSION = 0x2 )
Root signature version constants.
type D3D12_RTV_DIMENSION ¶
type D3D12_RTV_DIMENSION uint32
D3D12_RTV_DIMENSION specifies render target view dimension.
const ( D3D12_RTV_DIMENSION_UNKNOWN D3D12_RTV_DIMENSION = 0 D3D12_RTV_DIMENSION_BUFFER D3D12_RTV_DIMENSION = 1 D3D12_RTV_DIMENSION_TEXTURE1D D3D12_RTV_DIMENSION = 2 D3D12_RTV_DIMENSION_TEXTURE1DARRAY D3D12_RTV_DIMENSION = 3 D3D12_RTV_DIMENSION_TEXTURE2D D3D12_RTV_DIMENSION = 4 D3D12_RTV_DIMENSION_TEXTURE2DARRAY D3D12_RTV_DIMENSION = 5 D3D12_RTV_DIMENSION_TEXTURE2DMS D3D12_RTV_DIMENSION = 6 D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY D3D12_RTV_DIMENSION = 7 D3D12_RTV_DIMENSION_TEXTURE3D D3D12_RTV_DIMENSION = 8 )
RTV dimension constants.
type D3D12_SAMPLER_DESC ¶
type D3D12_SAMPLER_DESC struct {
Filter D3D12_FILTER
AddressU D3D12_TEXTURE_ADDRESS_MODE
AddressV D3D12_TEXTURE_ADDRESS_MODE
AddressW D3D12_TEXTURE_ADDRESS_MODE
MipLODBias float32
MaxAnisotropy uint32
ComparisonFunc D3D12_COMPARISON_FUNC
BorderColor [4]float32
MinLOD float32
MaxLOD float32
}
D3D12_SAMPLER_DESC describes a sampler state.
type D3D12_SHADER_BYTECODE ¶
D3D12_SHADER_BYTECODE describes shader bytecode.
type D3D12_SHADER_RESOURCE_VIEW_DESC ¶
type D3D12_SHADER_RESOURCE_VIEW_DESC struct {
Format DXGI_FORMAT
ViewDimension D3D12_SRV_DIMENSION
Shader4ComponentMapping uint32
Union [24]byte // various texture/buffer SRV view params
// contains filtered or unexported fields
}
D3D12_SHADER_RESOURCE_VIEW_DESC describes a shader resource view. The Union field must start at offset 16 to match C ABI alignment. In C, the union contains D3D12_BUFFER_SRV which starts with UINT64 FirstElement, requiring 8-byte alignment. Without explicit padding, Go places [24]byte (alignment 1) at offset 12 → wrong layout. With _ uint32, Go adds 4 bytes at offset 12, pushing Union to offset 16 → correct 40-byte struct.
func (*D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture1D ¶
func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture1D(mostDetailedMip, mipLevels uint32, resourceMinLODClamp float32)
SetTexture1D sets up a 1D texture SRV.
func (*D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture2D ¶
func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture2D(mostDetailedMip, mipLevels, planeSlice uint32, resourceMinLODClamp float32)
SetTexture2D sets up a 2D texture SRV.
func (*D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture2DArray ¶
func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture2DArray(mostDetailedMip, mipLevels, firstArraySlice, arraySize, planeSlice uint32, resourceMinLODClamp float32)
SetTexture2DArray sets up a 2D texture array SRV.
func (*D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture3D ¶
func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTexture3D(mostDetailedMip, mipLevels uint32, resourceMinLODClamp float32)
SetTexture3D sets up a 3D texture SRV.
func (*D3D12_SHADER_RESOURCE_VIEW_DESC) SetTextureCube ¶
func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTextureCube(mostDetailedMip, mipLevels uint32, resourceMinLODClamp float32)
SetTextureCube sets up a cube texture SRV.
func (*D3D12_SHADER_RESOURCE_VIEW_DESC) SetTextureCubeArray ¶
func (d *D3D12_SHADER_RESOURCE_VIEW_DESC) SetTextureCubeArray(mostDetailedMip, mipLevels, first2DArrayFace, numCubes uint32, resourceMinLODClamp float32)
SetTextureCubeArray sets up a cube texture array SRV.
type D3D12_SHADER_VISIBILITY ¶
type D3D12_SHADER_VISIBILITY uint32
D3D12_SHADER_VISIBILITY specifies shader visibility for root signature parameters.
const ( D3D12_SHADER_VISIBILITY_ALL D3D12_SHADER_VISIBILITY = 0 D3D12_SHADER_VISIBILITY_VERTEX D3D12_SHADER_VISIBILITY = 1 D3D12_SHADER_VISIBILITY_HULL D3D12_SHADER_VISIBILITY = 2 D3D12_SHADER_VISIBILITY_DOMAIN D3D12_SHADER_VISIBILITY = 3 D3D12_SHADER_VISIBILITY_GEOMETRY D3D12_SHADER_VISIBILITY = 4 D3D12_SHADER_VISIBILITY_PIXEL D3D12_SHADER_VISIBILITY = 5 D3D12_SHADER_VISIBILITY_AMPLIFICATION D3D12_SHADER_VISIBILITY = 6 D3D12_SHADER_VISIBILITY_MESH D3D12_SHADER_VISIBILITY = 7 )
Shader visibility constants.
type D3D12_SO_DECLARATION_ENTRY ¶
type D3D12_SO_DECLARATION_ENTRY struct {
Stream uint32
SemanticName *byte
SemanticIndex uint32
StartComponent uint8
ComponentCount uint8
OutputSlot uint8
}
D3D12_SO_DECLARATION_ENTRY describes a stream output declaration entry.
type D3D12_SRV_DIMENSION ¶
type D3D12_SRV_DIMENSION uint32
D3D12_SRV_DIMENSION specifies shader resource view dimension.
const ( D3D12_SRV_DIMENSION_UNKNOWN D3D12_SRV_DIMENSION = 0 D3D12_SRV_DIMENSION_BUFFER D3D12_SRV_DIMENSION = 1 D3D12_SRV_DIMENSION_TEXTURE1D D3D12_SRV_DIMENSION = 2 D3D12_SRV_DIMENSION_TEXTURE1DARRAY D3D12_SRV_DIMENSION = 3 D3D12_SRV_DIMENSION_TEXTURE2D D3D12_SRV_DIMENSION = 4 D3D12_SRV_DIMENSION_TEXTURE2DARRAY D3D12_SRV_DIMENSION = 5 D3D12_SRV_DIMENSION_TEXTURE2DMS D3D12_SRV_DIMENSION = 6 D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY D3D12_SRV_DIMENSION = 7 D3D12_SRV_DIMENSION_TEXTURE3D D3D12_SRV_DIMENSION = 8 D3D12_SRV_DIMENSION_TEXTURECUBE D3D12_SRV_DIMENSION = 9 D3D12_SRV_DIMENSION_TEXTURECUBEARRAY D3D12_SRV_DIMENSION = 10 D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURE D3D12_SRV_DIMENSION = 11 )
SRV dimension constants.
type D3D12_STATIC_BORDER_COLOR ¶
type D3D12_STATIC_BORDER_COLOR uint32
D3D12_STATIC_BORDER_COLOR specifies static border color.
const ( D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK D3D12_STATIC_BORDER_COLOR = 0 D3D12_STATIC_BORDER_COLOR_OPAQUE_BLACK D3D12_STATIC_BORDER_COLOR = 1 D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE D3D12_STATIC_BORDER_COLOR = 2 )
Static border color constants.
type D3D12_STATIC_SAMPLER_DESC ¶
type D3D12_STATIC_SAMPLER_DESC struct {
Filter D3D12_FILTER
AddressU D3D12_TEXTURE_ADDRESS_MODE
AddressV D3D12_TEXTURE_ADDRESS_MODE
AddressW D3D12_TEXTURE_ADDRESS_MODE
MipLODBias float32
MaxAnisotropy uint32
ComparisonFunc D3D12_COMPARISON_FUNC
BorderColor D3D12_STATIC_BORDER_COLOR
MinLOD float32
MaxLOD float32
ShaderRegister uint32
RegisterSpace uint32
ShaderVisibility D3D12_SHADER_VISIBILITY
}
D3D12_STATIC_SAMPLER_DESC describes a static sampler.
type D3D12_STATIC_SAMPLER_DESC_FLAGS ¶
type D3D12_STATIC_SAMPLER_DESC_FLAGS uint32
D3D12_STATIC_SAMPLER_DESC_FLAGS specifies static sampler flags.
const ( D3D12_STATIC_SAMPLER_FLAG_NONE D3D12_STATIC_SAMPLER_DESC_FLAGS = 0 D3D12_STATIC_SAMPLER_FLAG_BORDER_COLOR_TRANSPARENT_BLACK D3D12_STATIC_SAMPLER_DESC_FLAGS = 1 )
Static sampler flag constants.
type D3D12_STENCIL_OP ¶
type D3D12_STENCIL_OP uint32
D3D12_STENCIL_OP specifies the stencil operation.
const ( D3D12_STENCIL_OP_KEEP D3D12_STENCIL_OP = 1 D3D12_STENCIL_OP_ZERO D3D12_STENCIL_OP = 2 D3D12_STENCIL_OP_REPLACE D3D12_STENCIL_OP = 3 D3D12_STENCIL_OP_INCR_SAT D3D12_STENCIL_OP = 4 D3D12_STENCIL_OP_DECR_SAT D3D12_STENCIL_OP = 5 D3D12_STENCIL_OP_INVERT D3D12_STENCIL_OP = 6 D3D12_STENCIL_OP_INCR D3D12_STENCIL_OP = 7 D3D12_STENCIL_OP_DECR D3D12_STENCIL_OP = 8 )
Stencil operation constants.
type D3D12_STREAM_OUTPUT_BUFFER_VIEW ¶
type D3D12_STREAM_OUTPUT_BUFFER_VIEW struct {
BufferLocation uint64
SizeInBytes uint64
BufferFilledSizeLocation uint64
}
D3D12_STREAM_OUTPUT_BUFFER_VIEW describes a stream output buffer view.
type D3D12_STREAM_OUTPUT_DESC ¶
type D3D12_STREAM_OUTPUT_DESC struct {
SODeclaration *D3D12_SO_DECLARATION_ENTRY
NumEntries uint32
BufferStrides *uint32
NumStrides uint32
RasterizedStream uint32
}
D3D12_STREAM_OUTPUT_DESC describes stream output.
type D3D12_SUBRESOURCE_FOOTPRINT ¶
type D3D12_SUBRESOURCE_FOOTPRINT struct {
Format DXGI_FORMAT
Width uint32
Height uint32
Depth uint32
RowPitch uint32
}
D3D12_SUBRESOURCE_FOOTPRINT describes a subresource footprint.
type D3D12_TEXTURE_ADDRESS_MODE ¶
type D3D12_TEXTURE_ADDRESS_MODE uint32
D3D12_TEXTURE_ADDRESS_MODE specifies texture address mode.
const ( D3D12_TEXTURE_ADDRESS_MODE_WRAP D3D12_TEXTURE_ADDRESS_MODE = 1 D3D12_TEXTURE_ADDRESS_MODE_MIRROR D3D12_TEXTURE_ADDRESS_MODE = 2 D3D12_TEXTURE_ADDRESS_MODE_CLAMP D3D12_TEXTURE_ADDRESS_MODE = 3 D3D12_TEXTURE_ADDRESS_MODE_BORDER D3D12_TEXTURE_ADDRESS_MODE = 4 D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE D3D12_TEXTURE_ADDRESS_MODE = 5 )
Texture address mode constants.
type D3D12_TEXTURE_COPY_LOCATION ¶
type D3D12_TEXTURE_COPY_LOCATION struct {
Resource *ID3D12Resource
Type D3D12_TEXTURE_COPY_TYPE
Union [32]byte // PlacedFootprint (32 bytes) or SubresourceIndex (4 bytes)
// contains filtered or unexported fields
}
D3D12_TEXTURE_COPY_LOCATION describes a texture copy location. The Union field must start at offset 16 to match C ABI alignment. In C, the union contains D3D12_PLACED_SUBRESOURCE_FOOTPRINT which starts with UINT64 Offset, requiring 8-byte alignment. Without explicit padding, Go places [32]byte (alignment 1) at offset 12 → wrong layout. With _ uint32, Go adds 4 bytes at offset 12, pushing Union to offset 16 → correct 48-byte struct.
func (*D3D12_TEXTURE_COPY_LOCATION) SetPlacedFootprint ¶
func (l *D3D12_TEXTURE_COPY_LOCATION) SetPlacedFootprint(footprint D3D12_PLACED_SUBRESOURCE_FOOTPRINT)
SetPlacedFootprint sets the placed footprint for this copy location.
func (*D3D12_TEXTURE_COPY_LOCATION) SetSubresourceIndex ¶
func (l *D3D12_TEXTURE_COPY_LOCATION) SetSubresourceIndex(subresource uint32)
SetSubresourceIndex sets the subresource index for this copy location.
type D3D12_TEXTURE_COPY_TYPE ¶
type D3D12_TEXTURE_COPY_TYPE uint32
D3D12_TEXTURE_COPY_TYPE specifies texture copy type.
const ( D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX D3D12_TEXTURE_COPY_TYPE = 0 D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT D3D12_TEXTURE_COPY_TYPE = 1 )
Texture copy type constants.
type D3D12_TEXTURE_LAYOUT ¶
type D3D12_TEXTURE_LAYOUT uint32
D3D12_TEXTURE_LAYOUT specifies the texture layout options.
const ( D3D12_TEXTURE_LAYOUT_UNKNOWN D3D12_TEXTURE_LAYOUT = 0 D3D12_TEXTURE_LAYOUT_ROW_MAJOR D3D12_TEXTURE_LAYOUT = 1 D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE D3D12_TEXTURE_LAYOUT = 2 D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE D3D12_TEXTURE_LAYOUT = 3 )
Texture layout constants.
type D3D12_TILED_RESOURCE_COORDINATE ¶
D3D12_TILED_RESOURCE_COORDINATE describes a tiled resource coordinate.
type D3D12_TILE_REGION_SIZE ¶
type D3D12_TILE_REGION_SIZE struct {
NumTiles uint32
UseBox int32 // BOOL
Width uint32
Height uint16
Depth uint16
}
D3D12_TILE_REGION_SIZE describes a tile region size.
type D3D12_UAV_DIMENSION ¶
type D3D12_UAV_DIMENSION uint32
D3D12_UAV_DIMENSION specifies unordered access view dimension.
const ( D3D12_UAV_DIMENSION_UNKNOWN D3D12_UAV_DIMENSION = 0 D3D12_UAV_DIMENSION_BUFFER D3D12_UAV_DIMENSION = 1 D3D12_UAV_DIMENSION_TEXTURE1D D3D12_UAV_DIMENSION = 2 D3D12_UAV_DIMENSION_TEXTURE1DARRAY D3D12_UAV_DIMENSION = 3 D3D12_UAV_DIMENSION_TEXTURE2D D3D12_UAV_DIMENSION = 4 D3D12_UAV_DIMENSION_TEXTURE2DARRAY D3D12_UAV_DIMENSION = 5 D3D12_UAV_DIMENSION_TEXTURE3D D3D12_UAV_DIMENSION = 8 )
UAV dimension constants.
type D3D12_UNORDERED_ACCESS_VIEW_DESC ¶
type D3D12_UNORDERED_ACCESS_VIEW_DESC struct {
Format DXGI_FORMAT
ViewDimension D3D12_UAV_DIMENSION
// Union of different view types
Union [16]byte
}
D3D12_UNORDERED_ACCESS_VIEW_DESC describes an unordered access view.
type D3D12_VERTEX_BUFFER_VIEW ¶
type D3D12_VERTEX_BUFFER_VIEW struct {
BufferLocation uint64
SizeInBytes uint32
StrideInBytes uint32
}
D3D12_VERTEX_BUFFER_VIEW describes a vertex buffer view.
type D3D12_VIEWPORT ¶
type D3D12_VIEWPORT struct {
TopLeftX float32
TopLeftY float32
Width float32
Height float32
MinDepth float32
MaxDepth float32
}
D3D12_VIEWPORT describes a viewport.
type D3D12_WRITEBUFFERIMMEDIATE_MODE ¶
type D3D12_WRITEBUFFERIMMEDIATE_MODE uint32
D3D12_WRITEBUFFERIMMEDIATE_MODE specifies write buffer immediate mode.
const ( D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT D3D12_WRITEBUFFERIMMEDIATE_MODE = 0 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN D3D12_WRITEBUFFERIMMEDIATE_MODE = 1 D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT D3D12_WRITEBUFFERIMMEDIATE_MODE = 2 )
Write buffer immediate mode constants.
type D3D12_WRITEBUFFERIMMEDIATE_PARAMETER ¶
D3D12_WRITEBUFFERIMMEDIATE_PARAMETER describes write buffer immediate parameters.
type D3D_FEATURE_LEVEL ¶
type D3D_FEATURE_LEVEL uint32
D3D_FEATURE_LEVEL specifies the Direct3D feature level.
const ( D3D_FEATURE_LEVEL_1_0_CORE D3D_FEATURE_LEVEL = 0x1000 D3D_FEATURE_LEVEL_9_1 D3D_FEATURE_LEVEL = 0x9100 D3D_FEATURE_LEVEL_9_2 D3D_FEATURE_LEVEL = 0x9200 D3D_FEATURE_LEVEL_9_3 D3D_FEATURE_LEVEL = 0x9300 D3D_FEATURE_LEVEL_10_0 D3D_FEATURE_LEVEL = 0xa000 D3D_FEATURE_LEVEL_10_1 D3D_FEATURE_LEVEL = 0xa100 D3D_FEATURE_LEVEL_11_0 D3D_FEATURE_LEVEL = 0xb000 D3D_FEATURE_LEVEL_11_1 D3D_FEATURE_LEVEL = 0xb100 D3D_FEATURE_LEVEL_12_0 D3D_FEATURE_LEVEL = 0xc000 D3D_FEATURE_LEVEL_12_1 D3D_FEATURE_LEVEL = 0xc100 D3D_FEATURE_LEVEL_12_2 D3D_FEATURE_LEVEL = 0xc200 )
Feature level constants.
type D3D_PRIMITIVE_TOPOLOGY ¶
type D3D_PRIMITIVE_TOPOLOGY uint32
D3D_PRIMITIVE_TOPOLOGY specifies primitive topology.
const ( D3D_PRIMITIVE_TOPOLOGY_UNDEFINED D3D_PRIMITIVE_TOPOLOGY = 0 D3D_PRIMITIVE_TOPOLOGY_POINTLIST D3D_PRIMITIVE_TOPOLOGY = 1 D3D_PRIMITIVE_TOPOLOGY_LINELIST D3D_PRIMITIVE_TOPOLOGY = 2 D3D_PRIMITIVE_TOPOLOGY_LINESTRIP D3D_PRIMITIVE_TOPOLOGY = 3 D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST D3D_PRIMITIVE_TOPOLOGY = 4 D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP D3D_PRIMITIVE_TOPOLOGY = 5 D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ D3D_PRIMITIVE_TOPOLOGY = 10 D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ D3D_PRIMITIVE_TOPOLOGY = 11 D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ D3D_PRIMITIVE_TOPOLOGY = 12 D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ D3D_PRIMITIVE_TOPOLOGY = 13 )
Primitive topology constants.
type D3D_SHADER_MODEL ¶
type D3D_SHADER_MODEL uint32
D3D_SHADER_MODEL specifies the shader model version.
const ( D3D_SHADER_MODEL_5_1 D3D_SHADER_MODEL = 0x51 D3D_SHADER_MODEL_6_0 D3D_SHADER_MODEL = 0x60 D3D_SHADER_MODEL_6_1 D3D_SHADER_MODEL = 0x61 D3D_SHADER_MODEL_6_2 D3D_SHADER_MODEL = 0x62 D3D_SHADER_MODEL_6_3 D3D_SHADER_MODEL = 0x63 D3D_SHADER_MODEL_6_4 D3D_SHADER_MODEL = 0x64 D3D_SHADER_MODEL_6_5 D3D_SHADER_MODEL = 0x65 D3D_SHADER_MODEL_6_6 D3D_SHADER_MODEL = 0x66 D3D_SHADER_MODEL_6_7 D3D_SHADER_MODEL = 0x67 )
Shader model constants.
type DXGI_FORMAT ¶
type DXGI_FORMAT uint32
DXGI_FORMAT specifies the DXGI format. This is a shared type between DXGI and D3D12.
const ( DXGI_FORMAT_UNKNOWN DXGI_FORMAT = 0 DXGI_FORMAT_R32G32B32A32_TYPELESS DXGI_FORMAT = 1 DXGI_FORMAT_R32G32B32A32_FLOAT DXGI_FORMAT = 2 DXGI_FORMAT_R32G32B32A32_UINT DXGI_FORMAT = 3 DXGI_FORMAT_R32G32B32A32_SINT DXGI_FORMAT = 4 DXGI_FORMAT_R32G32B32_TYPELESS DXGI_FORMAT = 5 DXGI_FORMAT_R32G32B32_FLOAT DXGI_FORMAT = 6 DXGI_FORMAT_R32G32B32_UINT DXGI_FORMAT = 7 DXGI_FORMAT_R32G32B32_SINT DXGI_FORMAT = 8 DXGI_FORMAT_R16G16B16A16_TYPELESS DXGI_FORMAT = 9 DXGI_FORMAT_R16G16B16A16_FLOAT DXGI_FORMAT = 10 DXGI_FORMAT_R16G16B16A16_UNORM DXGI_FORMAT = 11 DXGI_FORMAT_R16G16B16A16_UINT DXGI_FORMAT = 12 DXGI_FORMAT_R16G16B16A16_SNORM DXGI_FORMAT = 13 DXGI_FORMAT_R16G16B16A16_SINT DXGI_FORMAT = 14 DXGI_FORMAT_R32G32_TYPELESS DXGI_FORMAT = 15 DXGI_FORMAT_R32G32_FLOAT DXGI_FORMAT = 16 DXGI_FORMAT_R32G32_UINT DXGI_FORMAT = 17 DXGI_FORMAT_R32G32_SINT DXGI_FORMAT = 18 DXGI_FORMAT_R10G10B10A2_TYPELESS DXGI_FORMAT = 23 DXGI_FORMAT_R10G10B10A2_UNORM DXGI_FORMAT = 24 DXGI_FORMAT_R10G10B10A2_UINT DXGI_FORMAT = 25 DXGI_FORMAT_R11G11B10_FLOAT DXGI_FORMAT = 26 DXGI_FORMAT_R8G8B8A8_TYPELESS DXGI_FORMAT = 27 DXGI_FORMAT_R8G8B8A8_UNORM DXGI_FORMAT = 28 DXGI_FORMAT_R8G8B8A8_UNORM_SRGB DXGI_FORMAT = 29 DXGI_FORMAT_R8G8B8A8_UINT DXGI_FORMAT = 30 DXGI_FORMAT_R8G8B8A8_SNORM DXGI_FORMAT = 31 DXGI_FORMAT_R8G8B8A8_SINT DXGI_FORMAT = 32 DXGI_FORMAT_R16G16_TYPELESS DXGI_FORMAT = 33 DXGI_FORMAT_R16G16_FLOAT DXGI_FORMAT = 34 DXGI_FORMAT_R16G16_UNORM DXGI_FORMAT = 35 DXGI_FORMAT_R16G16_UINT DXGI_FORMAT = 36 DXGI_FORMAT_R16G16_SNORM DXGI_FORMAT = 37 DXGI_FORMAT_R16G16_SINT DXGI_FORMAT = 38 DXGI_FORMAT_R32_TYPELESS DXGI_FORMAT = 39 DXGI_FORMAT_D32_FLOAT DXGI_FORMAT = 40 DXGI_FORMAT_R32_FLOAT DXGI_FORMAT = 41 DXGI_FORMAT_R32_UINT DXGI_FORMAT = 42 DXGI_FORMAT_R32_SINT DXGI_FORMAT = 43 DXGI_FORMAT_R24G8_TYPELESS DXGI_FORMAT = 44 DXGI_FORMAT_D24_UNORM_S8_UINT DXGI_FORMAT = 45 DXGI_FORMAT_R24_UNORM_X8_TYPELESS DXGI_FORMAT = 46 DXGI_FORMAT_X24_TYPELESS_G8_UINT DXGI_FORMAT = 47 DXGI_FORMAT_R8G8_TYPELESS DXGI_FORMAT = 48 DXGI_FORMAT_R8G8_UNORM DXGI_FORMAT = 49 DXGI_FORMAT_R8G8_UINT DXGI_FORMAT = 50 DXGI_FORMAT_R8G8_SNORM DXGI_FORMAT = 51 DXGI_FORMAT_R8G8_SINT DXGI_FORMAT = 52 DXGI_FORMAT_R16_TYPELESS DXGI_FORMAT = 53 DXGI_FORMAT_R16_FLOAT DXGI_FORMAT = 54 DXGI_FORMAT_D16_UNORM DXGI_FORMAT = 55 DXGI_FORMAT_R16_UNORM DXGI_FORMAT = 56 DXGI_FORMAT_R16_UINT DXGI_FORMAT = 57 DXGI_FORMAT_R16_SNORM DXGI_FORMAT = 58 DXGI_FORMAT_R16_SINT DXGI_FORMAT = 59 DXGI_FORMAT_R8_TYPELESS DXGI_FORMAT = 60 DXGI_FORMAT_R8_UNORM DXGI_FORMAT = 61 DXGI_FORMAT_R8_UINT DXGI_FORMAT = 62 DXGI_FORMAT_R8_SNORM DXGI_FORMAT = 63 DXGI_FORMAT_R8_SINT DXGI_FORMAT = 64 DXGI_FORMAT_A8_UNORM DXGI_FORMAT = 65 DXGI_FORMAT_R1_UNORM DXGI_FORMAT = 66 DXGI_FORMAT_BC1_TYPELESS DXGI_FORMAT = 70 DXGI_FORMAT_BC1_UNORM DXGI_FORMAT = 71 DXGI_FORMAT_BC1_UNORM_SRGB DXGI_FORMAT = 72 DXGI_FORMAT_BC2_TYPELESS DXGI_FORMAT = 73 DXGI_FORMAT_BC2_UNORM DXGI_FORMAT = 74 DXGI_FORMAT_BC2_UNORM_SRGB DXGI_FORMAT = 75 DXGI_FORMAT_BC3_TYPELESS DXGI_FORMAT = 76 DXGI_FORMAT_BC3_UNORM DXGI_FORMAT = 77 DXGI_FORMAT_BC3_UNORM_SRGB DXGI_FORMAT = 78 DXGI_FORMAT_BC4_TYPELESS DXGI_FORMAT = 79 DXGI_FORMAT_BC4_UNORM DXGI_FORMAT = 80 DXGI_FORMAT_BC4_SNORM DXGI_FORMAT = 81 DXGI_FORMAT_BC5_TYPELESS DXGI_FORMAT = 82 DXGI_FORMAT_BC5_UNORM DXGI_FORMAT = 83 DXGI_FORMAT_BC5_SNORM DXGI_FORMAT = 84 DXGI_FORMAT_B5G6R5_UNORM DXGI_FORMAT = 85 DXGI_FORMAT_B5G5R5A1_UNORM DXGI_FORMAT = 86 DXGI_FORMAT_B8G8R8A8_UNORM DXGI_FORMAT = 87 DXGI_FORMAT_B8G8R8X8_UNORM DXGI_FORMAT = 88 DXGI_FORMAT_B8G8R8A8_TYPELESS DXGI_FORMAT = 90 DXGI_FORMAT_B8G8R8A8_UNORM_SRGB DXGI_FORMAT = 91 DXGI_FORMAT_B8G8R8X8_TYPELESS DXGI_FORMAT = 92 DXGI_FORMAT_B8G8R8X8_UNORM_SRGB DXGI_FORMAT = 93 DXGI_FORMAT_BC6H_TYPELESS DXGI_FORMAT = 94 DXGI_FORMAT_BC6H_UF16 DXGI_FORMAT = 95 DXGI_FORMAT_BC6H_SF16 DXGI_FORMAT = 96 DXGI_FORMAT_BC7_TYPELESS DXGI_FORMAT = 97 DXGI_FORMAT_BC7_UNORM DXGI_FORMAT = 98 DXGI_FORMAT_BC7_UNORM_SRGB DXGI_FORMAT = 99 DXGI_FORMAT_R32G8X24_TYPELESS DXGI_FORMAT = 19 DXGI_FORMAT_D32_FLOAT_S8X24_UINT DXGI_FORMAT = 20 DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS DXGI_FORMAT = 21 DXGI_FORMAT_X32_TYPELESS_G8X24_UINT DXGI_FORMAT = 22 )
DXGI format constants (commonly used subset).
type DXGI_SAMPLE_DESC ¶
DXGI_SAMPLE_DESC describes multi-sampling parameters.
type GUID ¶
GUID represents a Windows GUID (Globally Unique Identifier). Layout must match Windows GUID structure exactly.
type HRESULTError ¶
type HRESULTError int32
HRESULTError represents a Windows HRESULT error code.
func (HRESULTError) Error ¶
func (hr HRESULTError) Error() string
Error implements the error interface.
type ID3D12CommandAllocator ¶
type ID3D12CommandAllocator struct {
// contains filtered or unexported fields
}
ID3D12CommandAllocator represents a command allocator.
func (*ID3D12CommandAllocator) Release ¶
func (a *ID3D12CommandAllocator) Release() uint32
Release decrements the reference count.
func (*ID3D12CommandAllocator) Reset ¶
func (a *ID3D12CommandAllocator) Reset() error
Reset resets the command allocator.
type ID3D12CommandList ¶
type ID3D12CommandList struct {
// contains filtered or unexported fields
}
ID3D12CommandList is the base interface for command lists.
type ID3D12CommandQueue ¶
type ID3D12CommandQueue struct {
// contains filtered or unexported fields
}
ID3D12CommandQueue represents a command queue.
func (*ID3D12CommandQueue) ExecuteCommandLists ¶
func (q *ID3D12CommandQueue) ExecuteCommandLists(numCommandLists uint32, commandLists **ID3D12GraphicsCommandList)
ExecuteCommandLists submits command lists for execution.
func (*ID3D12CommandQueue) GetDesc ¶
func (q *ID3D12CommandQueue) GetDesc() D3D12_COMMAND_QUEUE_DESC
GetDesc returns the command queue description. Note: Same calling convention issue as GetCPUDescriptorHandleForHeapStart.
func (*ID3D12CommandQueue) GetTimestampFrequency ¶
func (q *ID3D12CommandQueue) GetTimestampFrequency() (uint64, error)
GetTimestampFrequency gets the GPU timestamp counter frequency.
func (*ID3D12CommandQueue) Release ¶
func (q *ID3D12CommandQueue) Release() uint32
Release decrements the reference count.
func (*ID3D12CommandQueue) Signal ¶
func (q *ID3D12CommandQueue) Signal(fence *ID3D12Fence, value uint64) error
Signal sets a fence to a specified value.
func (*ID3D12CommandQueue) Wait ¶
func (q *ID3D12CommandQueue) Wait(fence *ID3D12Fence, value uint64) error
Wait waits on a fence.
type ID3D12CommandSignature ¶
type ID3D12CommandSignature struct {
// contains filtered or unexported fields
}
ID3D12CommandSignature represents a command signature.
func (*ID3D12CommandSignature) Release ¶
func (s *ID3D12CommandSignature) Release() uint32
Release decrements the reference count.
type ID3D12Debug ¶
type ID3D12Debug struct {
// contains filtered or unexported fields
}
ID3D12Debug is the debug interface.
func (*ID3D12Debug) EnableDebugLayer ¶
func (d *ID3D12Debug) EnableDebugLayer()
EnableDebugLayer enables the debug layer.
func (*ID3D12Debug) Release ¶
func (d *ID3D12Debug) Release() uint32
Release decrements the reference count.
type ID3D12Debug1 ¶
type ID3D12Debug1 struct {
// contains filtered or unexported fields
}
ID3D12Debug1 extends ID3D12Debug.
func (*ID3D12Debug1) EnableDebugLayer ¶
func (d *ID3D12Debug1) EnableDebugLayer()
EnableDebugLayer enables the debug layer.
func (*ID3D12Debug1) Release ¶
func (d *ID3D12Debug1) Release() uint32
Release decrements the reference count.
func (*ID3D12Debug1) SetEnableGPUBasedValidation ¶
func (d *ID3D12Debug1) SetEnableGPUBasedValidation(enable bool)
SetEnableGPUBasedValidation enables or disables GPU-based validation.
func (*ID3D12Debug1) SetEnableSynchronizedCommandQueueValidation ¶
func (d *ID3D12Debug1) SetEnableSynchronizedCommandQueueValidation(enable bool)
SetEnableSynchronizedCommandQueueValidation enables or disables synchronized command queue validation.
type ID3D12Debug2 ¶
type ID3D12Debug2 struct {
// contains filtered or unexported fields
}
ID3D12Debug2 extends ID3D12Debug1.
type ID3D12Debug3 ¶
type ID3D12Debug3 struct {
// contains filtered or unexported fields
}
ID3D12Debug3 extends ID3D12Debug.
func (*ID3D12Debug3) EnableDebugLayer ¶
func (d *ID3D12Debug3) EnableDebugLayer()
EnableDebugLayer enables the debug layer.
func (*ID3D12Debug3) Release ¶
func (d *ID3D12Debug3) Release() uint32
Release decrements the reference count.
func (*ID3D12Debug3) SetEnableGPUBasedValidation ¶
func (d *ID3D12Debug3) SetEnableGPUBasedValidation(enable bool)
SetEnableGPUBasedValidation enables or disables GPU-based validation.
type ID3D12DescriptorHeap ¶
type ID3D12DescriptorHeap struct {
// contains filtered or unexported fields
}
ID3D12DescriptorHeap represents a descriptor heap.
func (*ID3D12DescriptorHeap) GetCPUDescriptorHandleForHeapStart ¶
func (h *ID3D12DescriptorHeap) GetCPUDescriptorHandleForHeapStart() D3D12_CPU_DESCRIPTOR_HANDLE
GetCPUDescriptorHandleForHeapStart returns the CPU handle for the start of the heap. Note: D3D12 C headers incorrectly declare this as returning the struct directly. The actual calling convention requires passing an output pointer. See: https://joshstaiger.org/notes/C-Language-Problems-in-Direct3D-12-GetCPUDescriptorHandleForHeapStart.html
func (*ID3D12DescriptorHeap) GetDesc ¶
func (h *ID3D12DescriptorHeap) GetDesc() D3D12_DESCRIPTOR_HEAP_DESC
GetDesc returns the descriptor heap description. Note: Same calling convention issue as GetCPUDescriptorHandleForHeapStart.
func (*ID3D12DescriptorHeap) GetGPUDescriptorHandleForHeapStart ¶
func (h *ID3D12DescriptorHeap) GetGPUDescriptorHandleForHeapStart() D3D12_GPU_DESCRIPTOR_HANDLE
GetGPUDescriptorHandleForHeapStart returns the GPU handle for the start of the heap. Note: Same calling convention issue as GetCPUDescriptorHandleForHeapStart. See: https://joshstaiger.org/notes/C-Language-Problems-in-Direct3D-12-GetCPUDescriptorHandleForHeapStart.html
func (*ID3D12DescriptorHeap) Release ¶
func (h *ID3D12DescriptorHeap) Release() uint32
Release decrements the reference count.
type ID3D12Device ¶
type ID3D12Device struct {
// contains filtered or unexported fields
}
ID3D12Device represents a virtual adapter.
func (*ID3D12Device) AddRef ¶
func (d *ID3D12Device) AddRef() uint32
AddRef increments the reference count of the object.
func (*ID3D12Device) CheckFeatureSupport ¶
func (d *ID3D12Device) CheckFeatureSupport(feature D3D12_FEATURE, featureData unsafe.Pointer, featureDataSize uint32) error
CheckFeatureSupport queries feature support. feature specifies which feature to query. featureData is a pointer to the feature-specific data structure. featureDataSize is the size of the data structure in bytes.
func (*ID3D12Device) CopyDescriptors ¶ added in v0.22.0
func (d *ID3D12Device) CopyDescriptors( numDestRanges uint32, destRangeStarts *D3D12_CPU_DESCRIPTOR_HANDLE, destRangeSizes *uint32, numSrcRanges uint32, srcRangeStarts *D3D12_CPU_DESCRIPTOR_HANDLE, srcRangeSizes *uint32, heapType D3D12_DESCRIPTOR_HEAP_TYPE, )
CopyDescriptors copies descriptors from multiple non-contiguous source ranges to multiple destination ranges. This is the full D3D12 API that supports scattered source descriptors mapped to contiguous destination ranges.
numDestRanges is the number of destination descriptor ranges. destRangeStarts points to an array of destination CPU descriptor handles. destRangeSizes points to an array of destination range sizes (nil = all 1). numSrcRanges is the number of source descriptor ranges. srcRangeStarts points to an array of source CPU descriptor handles. srcRangeSizes points to an array of source range sizes (nil = all 1). heapType specifies the type of descriptor heap (must match for all ranges).
func (*ID3D12Device) CopyDescriptorsSimple ¶ added in v0.16.0
func (d *ID3D12Device) CopyDescriptorsSimple(numDescriptors uint32, destDescriptorRangeStart, srcDescriptorRangeStart D3D12_CPU_DESCRIPTOR_HANDLE, descriptorHeapsType D3D12_DESCRIPTOR_HEAP_TYPE)
CopyDescriptorsSimple copies descriptors from one location to another. numDescriptors is the number of descriptors to copy. destDescriptorRangeStart is the destination CPU descriptor handle. srcDescriptorRangeStart is the source CPU descriptor handle. descriptorHeapsType specifies the type of descriptor heap.
func (*ID3D12Device) CreateCommandAllocator ¶
func (d *ID3D12Device) CreateCommandAllocator(listType D3D12_COMMAND_LIST_TYPE) (*ID3D12CommandAllocator, error)
CreateCommandAllocator creates a command allocator.
func (*ID3D12Device) CreateCommandList ¶
func (d *ID3D12Device) CreateCommandList( nodeMask uint32, listType D3D12_COMMAND_LIST_TYPE, allocator *ID3D12CommandAllocator, initialState *ID3D12PipelineState, ) (*ID3D12GraphicsCommandList, error)
CreateCommandList creates a command list.
func (*ID3D12Device) CreateCommandQueue ¶
func (d *ID3D12Device) CreateCommandQueue(desc *D3D12_COMMAND_QUEUE_DESC) (*ID3D12CommandQueue, error)
CreateCommandQueue creates a command queue.
func (*ID3D12Device) CreateCommandSignature ¶
func (d *ID3D12Device) CreateCommandSignature( desc *D3D12_COMMAND_SIGNATURE_DESC, rootSignature *ID3D12RootSignature, ) (*ID3D12CommandSignature, error)
CreateCommandSignature creates a command signature.
func (*ID3D12Device) CreateCommittedResource ¶
func (d *ID3D12Device) CreateCommittedResource( heapProperties *D3D12_HEAP_PROPERTIES, heapFlags D3D12_HEAP_FLAGS, desc *D3D12_RESOURCE_DESC, initialResourceState D3D12_RESOURCE_STATES, optimizedClearValue *D3D12_CLEAR_VALUE, ) (*ID3D12Resource, error)
CreateCommittedResource creates a committed resource (heap + resource).
func (*ID3D12Device) CreateComputePipelineState ¶
func (d *ID3D12Device) CreateComputePipelineState(desc *D3D12_COMPUTE_PIPELINE_STATE_DESC) (*ID3D12PipelineState, error)
CreateComputePipelineState creates a compute pipeline state.
func (*ID3D12Device) CreateConstantBufferView ¶
func (d *ID3D12Device) CreateConstantBufferView(desc *D3D12_CONSTANT_BUFFER_VIEW_DESC, destDescriptor D3D12_CPU_DESCRIPTOR_HANDLE)
CreateConstantBufferView creates a constant buffer view.
func (*ID3D12Device) CreateDepthStencilView ¶
func (d *ID3D12Device) CreateDepthStencilView(resource *ID3D12Resource, desc *D3D12_DEPTH_STENCIL_VIEW_DESC, destDescriptor D3D12_CPU_DESCRIPTOR_HANDLE)
CreateDepthStencilView creates a depth stencil view.
func (*ID3D12Device) CreateDescriptorHeap ¶
func (d *ID3D12Device) CreateDescriptorHeap(desc *D3D12_DESCRIPTOR_HEAP_DESC) (*ID3D12DescriptorHeap, error)
CreateDescriptorHeap creates a descriptor heap.
func (*ID3D12Device) CreateFence ¶
func (d *ID3D12Device) CreateFence(initialValue uint64, flags D3D12_FENCE_FLAGS) (*ID3D12Fence, error)
CreateFence creates a fence.
func (*ID3D12Device) CreateGraphicsPipelineState ¶
func (d *ID3D12Device) CreateGraphicsPipelineState(desc *D3D12_GRAPHICS_PIPELINE_STATE_DESC) (*ID3D12PipelineState, error)
CreateGraphicsPipelineState creates a graphics pipeline state.
func (*ID3D12Device) CreateHeap ¶
func (d *ID3D12Device) CreateHeap(desc *D3D12_HEAP_DESC) (*ID3D12Heap, error)
CreateHeap creates a heap.
func (*ID3D12Device) CreatePlacedResource ¶
func (d *ID3D12Device) CreatePlacedResource( heap *ID3D12Heap, heapOffset uint64, desc *D3D12_RESOURCE_DESC, initialState D3D12_RESOURCE_STATES, optimizedClearValue *D3D12_CLEAR_VALUE, ) (*ID3D12Resource, error)
CreatePlacedResource creates a resource placed in an existing heap.
func (*ID3D12Device) CreateQueryHeap ¶
func (d *ID3D12Device) CreateQueryHeap(desc *D3D12_QUERY_HEAP_DESC) (*ID3D12QueryHeap, error)
CreateQueryHeap creates a query heap.
func (*ID3D12Device) CreateRenderTargetView ¶
func (d *ID3D12Device) CreateRenderTargetView(resource *ID3D12Resource, desc *D3D12_RENDER_TARGET_VIEW_DESC, destDescriptor D3D12_CPU_DESCRIPTOR_HANDLE)
CreateRenderTargetView creates a render target view.
func (*ID3D12Device) CreateRootSignature ¶
func (d *ID3D12Device) CreateRootSignature( nodeMask uint32, blobWithRootSignature unsafe.Pointer, blobLengthInBytes uintptr, ) (*ID3D12RootSignature, error)
CreateRootSignature creates a root signature from serialized data.
func (*ID3D12Device) CreateSampler ¶
func (d *ID3D12Device) CreateSampler(desc *D3D12_SAMPLER_DESC, destDescriptor D3D12_CPU_DESCRIPTOR_HANDLE)
CreateSampler creates a sampler.
func (*ID3D12Device) CreateShaderResourceView ¶
func (d *ID3D12Device) CreateShaderResourceView(resource *ID3D12Resource, desc *D3D12_SHADER_RESOURCE_VIEW_DESC, destDescriptor D3D12_CPU_DESCRIPTOR_HANDLE)
CreateShaderResourceView creates a shader resource view.
func (*ID3D12Device) CreateUnorderedAccessView ¶
func (d *ID3D12Device) CreateUnorderedAccessView(resource *ID3D12Resource, counterResource *ID3D12Resource, desc *D3D12_UNORDERED_ACCESS_VIEW_DESC, destDescriptor D3D12_CPU_DESCRIPTOR_HANDLE)
CreateUnorderedAccessView creates an unordered access view.
func (*ID3D12Device) GetDescriptorHandleIncrementSize ¶
func (d *ID3D12Device) GetDescriptorHandleIncrementSize(heapType D3D12_DESCRIPTOR_HEAP_TYPE) uint32
GetDescriptorHandleIncrementSize returns the size of the increment for the specified descriptor heap type.
func (*ID3D12Device) GetDeviceRemovedReason ¶
func (d *ID3D12Device) GetDeviceRemovedReason() error
GetDeviceRemovedReason returns the reason the device was removed.
func (*ID3D12Device) GetNodeCount ¶
func (d *ID3D12Device) GetNodeCount() uint32
GetNodeCount returns the number of physical adapters (nodes) associated with this device.
func (*ID3D12Device) GetResourceAllocationInfo ¶
func (d *ID3D12Device) GetResourceAllocationInfo(visibleMask uint32, numResourceDescs uint32, resourceDescs *D3D12_RESOURCE_DESC) D3D12_RESOURCE_ALLOCATION_INFO
GetResourceAllocationInfo returns resource allocation info. Note: Same calling convention issue as GetCPUDescriptorHandleForHeapStart. See: https://joshstaiger.org/notes/C-Language-Problems-in-Direct3D-12-GetCPUDescriptorHandleForHeapStart.html
func (*ID3D12Device) QueryDRED1 ¶ added in v0.23.6
func (d *ID3D12Device) QueryDRED1() *ID3D12DeviceRemovedExtendedData1
QueryDRED1 queries the device for the ID3D12DeviceRemovedExtendedData1 interface. Returns nil if DRED is not available (device created without DRED enabled, or Windows version too old).
func (*ID3D12Device) QueryInfoQueue ¶ added in v0.16.0
func (d *ID3D12Device) QueryInfoQueue() *ID3D12InfoQueue
QueryInfoQueue queries the device for the ID3D12InfoQueue interface. Returns nil if the debug layer is not enabled or InfoQueue is unavailable.
func (*ID3D12Device) Release ¶
func (d *ID3D12Device) Release() uint32
Release decrements the reference count of the object.
type ID3D12DeviceChild ¶
type ID3D12DeviceChild struct {
// contains filtered or unexported fields
}
ID3D12DeviceChild is the base interface for D3D12 device child objects.
type ID3D12DeviceRemovedExtendedData1 ¶ added in v0.23.6
type ID3D12DeviceRemovedExtendedData1 struct {
// contains filtered or unexported fields
}
ID3D12DeviceRemovedExtendedData1 queries DRED data after device removal. Obtained via QueryInterface on the device. GUID: {8727A009-F2F4-424F-8B91-B9C9C472D8E6}
func (*ID3D12DeviceRemovedExtendedData1) GetAutoBreadcrumbsOutput1 ¶ added in v0.23.6
func (d *ID3D12DeviceRemovedExtendedData1) GetAutoBreadcrumbsOutput1(output *D3D12DREDAutoBreadcrumbsOutput1) error
GetAutoBreadcrumbsOutput1 retrieves the DRED auto-breadcrumb data.
func (*ID3D12DeviceRemovedExtendedData1) GetPageFaultAllocationOutput1 ¶ added in v0.23.6
func (d *ID3D12DeviceRemovedExtendedData1) GetPageFaultAllocationOutput1(output *D3D12DREDPageFaultOutput1) error
GetPageFaultAllocationOutput1 retrieves page fault allocation data.
func (*ID3D12DeviceRemovedExtendedData1) Release ¶ added in v0.23.6
func (d *ID3D12DeviceRemovedExtendedData1) Release() uint32
Release decrements the reference count.
type ID3D12DeviceRemovedExtendedDataSettings ¶ added in v0.23.6
type ID3D12DeviceRemovedExtendedDataSettings struct {
// contains filtered or unexported fields
}
ID3D12DeviceRemovedExtendedDataSettings enables DRED features before device creation. GUID: {82BC481C-6B9B-4030-AEDB-7EE3D1DF1E63}
func (*ID3D12DeviceRemovedExtendedDataSettings) Release ¶ added in v0.23.6
func (s *ID3D12DeviceRemovedExtendedDataSettings) Release() uint32
Release decrements the reference count.
func (*ID3D12DeviceRemovedExtendedDataSettings) SetAutoBreadcrumbsEnablement ¶ added in v0.23.6
func (s *ID3D12DeviceRemovedExtendedDataSettings) SetAutoBreadcrumbsEnablement(enablement D3D12DREDEnablement)
SetAutoBreadcrumbsEnablement enables or disables auto-breadcrumb recording.
func (*ID3D12DeviceRemovedExtendedDataSettings) SetPageFaultEnablement ¶ added in v0.23.6
func (s *ID3D12DeviceRemovedExtendedDataSettings) SetPageFaultEnablement(enablement D3D12DREDEnablement)
SetPageFaultEnablement enables or disables page fault tracking.
type ID3D12Fence ¶
type ID3D12Fence struct {
// contains filtered or unexported fields
}
ID3D12Fence represents a fence for synchronization.
func (*ID3D12Fence) GetCompletedValue ¶
func (f *ID3D12Fence) GetCompletedValue() uint64
GetCompletedValue returns the current fence value.
func (*ID3D12Fence) Release ¶
func (f *ID3D12Fence) Release() uint32
Release decrements the reference count.
func (*ID3D12Fence) SetEventOnCompletion ¶
func (f *ID3D12Fence) SetEventOnCompletion(value uint64, hEvent uintptr) error
SetEventOnCompletion sets an event to be signaled when the fence reaches a value.
func (*ID3D12Fence) Signal ¶
func (f *ID3D12Fence) Signal(value uint64) error
Signal sets the fence to a value from the CPU side.
type ID3D12Fence1 ¶
type ID3D12Fence1 struct {
// contains filtered or unexported fields
}
ID3D12Fence1 extends ID3D12Fence.
type ID3D12GraphicsCommandList ¶
type ID3D12GraphicsCommandList struct {
// contains filtered or unexported fields
}
ID3D12GraphicsCommandList represents a graphics command list.
func (*ID3D12GraphicsCommandList) ClearDepthStencilView ¶
func (c *ID3D12GraphicsCommandList) ClearDepthStencilView(depthStencilView D3D12_CPU_DESCRIPTOR_HANDLE, clearFlags D3D12_CLEAR_FLAGS, depth float32, stencil uint8, numRects uint32, rects *D3D12_RECT)
ClearDepthStencilView clears a depth stencil view.
func (*ID3D12GraphicsCommandList) ClearRenderTargetView ¶
func (c *ID3D12GraphicsCommandList) ClearRenderTargetView(renderTargetView D3D12_CPU_DESCRIPTOR_HANDLE, colorRGBA *[4]float32, numRects uint32, rects *D3D12_RECT)
ClearRenderTargetView clears a render target view.
func (*ID3D12GraphicsCommandList) ClearState ¶
func (c *ID3D12GraphicsCommandList) ClearState(pipelineState *ID3D12PipelineState)
ClearState clears the command list state.
func (*ID3D12GraphicsCommandList) Close ¶
func (c *ID3D12GraphicsCommandList) Close() error
Close closes the command list.
func (*ID3D12GraphicsCommandList) CopyBufferRegion ¶
func (c *ID3D12GraphicsCommandList) CopyBufferRegion(dstBuffer *ID3D12Resource, dstOffset uint64, srcBuffer *ID3D12Resource, srcOffset, numBytes uint64)
CopyBufferRegion copies a region from one buffer to another.
func (*ID3D12GraphicsCommandList) CopyResource ¶
func (c *ID3D12GraphicsCommandList) CopyResource(dstResource, srcResource *ID3D12Resource)
CopyResource copies a resource.
func (*ID3D12GraphicsCommandList) CopyTextureRegion ¶
func (c *ID3D12GraphicsCommandList) CopyTextureRegion(dst *D3D12_TEXTURE_COPY_LOCATION, dstX, dstY, dstZ uint32, src *D3D12_TEXTURE_COPY_LOCATION, srcBox *D3D12_BOX)
CopyTextureRegion copies a region of a texture.
func (*ID3D12GraphicsCommandList) Dispatch ¶
func (c *ID3D12GraphicsCommandList) Dispatch(threadGroupCountX, threadGroupCountY, threadGroupCountZ uint32)
Dispatch dispatches a compute shader.
func (*ID3D12GraphicsCommandList) DrawIndexedInstanced ¶
func (c *ID3D12GraphicsCommandList) DrawIndexedInstanced(indexCountPerInstance, instanceCount, startIndexLocation uint32, baseVertexLocation int32, startInstanceLocation uint32)
DrawIndexedInstanced draws indexed, instanced primitives.
func (*ID3D12GraphicsCommandList) DrawInstanced ¶
func (c *ID3D12GraphicsCommandList) DrawInstanced(vertexCountPerInstance, instanceCount, startVertexLocation, startInstanceLocation uint32)
DrawInstanced draws non-indexed, instanced primitives.
func (*ID3D12GraphicsCommandList) IASetIndexBuffer ¶
func (c *ID3D12GraphicsCommandList) IASetIndexBuffer(view *D3D12_INDEX_BUFFER_VIEW)
IASetIndexBuffer sets the index buffer.
func (*ID3D12GraphicsCommandList) IASetPrimitiveTopology ¶
func (c *ID3D12GraphicsCommandList) IASetPrimitiveTopology(topology D3D_PRIMITIVE_TOPOLOGY)
IASetPrimitiveTopology sets the primitive topology.
func (*ID3D12GraphicsCommandList) IASetVertexBuffers ¶
func (c *ID3D12GraphicsCommandList) IASetVertexBuffers(startSlot, numViews uint32, views *D3D12_VERTEX_BUFFER_VIEW)
IASetVertexBuffers sets vertex buffers.
func (*ID3D12GraphicsCommandList) OMSetBlendFactor ¶
func (c *ID3D12GraphicsCommandList) OMSetBlendFactor(blendFactor *[4]float32)
OMSetBlendFactor sets the blend factor.
func (*ID3D12GraphicsCommandList) OMSetRenderTargets ¶
func (c *ID3D12GraphicsCommandList) OMSetRenderTargets(numRenderTargetDescriptors uint32, renderTargetDescriptors *D3D12_CPU_DESCRIPTOR_HANDLE, rtsSingleHandleToDescriptorRange int32, depthStencilDescriptor *D3D12_CPU_DESCRIPTOR_HANDLE)
OMSetRenderTargets sets render targets and depth stencil.
func (*ID3D12GraphicsCommandList) OMSetStencilRef ¶
func (c *ID3D12GraphicsCommandList) OMSetStencilRef(stencilRef uint32)
OMSetStencilRef sets the stencil reference value.
func (*ID3D12GraphicsCommandList) RSSetScissorRects ¶
func (c *ID3D12GraphicsCommandList) RSSetScissorRects(numRects uint32, rects *D3D12_RECT)
RSSetScissorRects sets the scissor rectangles.
func (*ID3D12GraphicsCommandList) RSSetViewports ¶
func (c *ID3D12GraphicsCommandList) RSSetViewports(numViewports uint32, viewports *D3D12_VIEWPORT)
RSSetViewports sets the viewports.
func (*ID3D12GraphicsCommandList) Release ¶
func (c *ID3D12GraphicsCommandList) Release() uint32
Release decrements the reference count.
func (*ID3D12GraphicsCommandList) Reset ¶
func (c *ID3D12GraphicsCommandList) Reset(allocator *ID3D12CommandAllocator, initialState *ID3D12PipelineState) error
Reset resets the command list.
func (*ID3D12GraphicsCommandList) ResolveSubresource ¶ added in v0.16.0
func (c *ID3D12GraphicsCommandList) ResolveSubresource(dstResource *ID3D12Resource, dstSubresource uint32, srcResource *ID3D12Resource, srcSubresource uint32, format DXGI_FORMAT)
ResolveSubresource resolves a multisampled resource into a non-multisampled resource.
func (*ID3D12GraphicsCommandList) ResourceBarrier ¶
func (c *ID3D12GraphicsCommandList) ResourceBarrier(numBarriers uint32, barriers *D3D12_RESOURCE_BARRIER)
ResourceBarrier notifies the driver of resource state transitions.
func (*ID3D12GraphicsCommandList) SetComputeRoot32BitConstant ¶ added in v0.8.1
func (c *ID3D12GraphicsCommandList) SetComputeRoot32BitConstant(rootParameterIndex, srcData, destOffsetIn32BitValues uint32)
SetComputeRoot32BitConstant sets a compute root 32-bit constant. rootParameterIndex specifies the root parameter index. srcData is the 32-bit constant value. destOffsetIn32BitValues specifies the offset (in 32-bit values) to set the constant.
func (*ID3D12GraphicsCommandList) SetComputeRootDescriptorTable ¶
func (c *ID3D12GraphicsCommandList) SetComputeRootDescriptorTable(rootParameterIndex uint32, baseDescriptor D3D12_GPU_DESCRIPTOR_HANDLE)
SetComputeRootDescriptorTable sets a compute descriptor table.
func (*ID3D12GraphicsCommandList) SetComputeRootSignature ¶
func (c *ID3D12GraphicsCommandList) SetComputeRootSignature(rootSignature *ID3D12RootSignature)
SetComputeRootSignature sets the compute root signature.
func (*ID3D12GraphicsCommandList) SetDescriptorHeaps ¶
func (c *ID3D12GraphicsCommandList) SetDescriptorHeaps(numDescriptorHeaps uint32, descriptorHeaps **ID3D12DescriptorHeap)
SetDescriptorHeaps sets descriptor heaps.
func (*ID3D12GraphicsCommandList) SetGraphicsRoot32BitConstant ¶ added in v0.8.1
func (c *ID3D12GraphicsCommandList) SetGraphicsRoot32BitConstant(rootParameterIndex, srcData, destOffsetIn32BitValues uint32)
SetGraphicsRoot32BitConstant sets a graphics root 32-bit constant. rootParameterIndex specifies the root parameter index. srcData is the 32-bit constant value. destOffsetIn32BitValues specifies the offset (in 32-bit values) to set the constant.
func (*ID3D12GraphicsCommandList) SetGraphicsRootDescriptorTable ¶
func (c *ID3D12GraphicsCommandList) SetGraphicsRootDescriptorTable(rootParameterIndex uint32, baseDescriptor D3D12_GPU_DESCRIPTOR_HANDLE)
SetGraphicsRootDescriptorTable sets a graphics descriptor table.
func (*ID3D12GraphicsCommandList) SetGraphicsRootSignature ¶
func (c *ID3D12GraphicsCommandList) SetGraphicsRootSignature(rootSignature *ID3D12RootSignature)
SetGraphicsRootSignature sets the graphics root signature.
func (*ID3D12GraphicsCommandList) SetPipelineState ¶
func (c *ID3D12GraphicsCommandList) SetPipelineState(pipelineState *ID3D12PipelineState)
SetPipelineState sets the pipeline state.
type ID3D12GraphicsCommandList1 ¶
type ID3D12GraphicsCommandList1 struct {
// contains filtered or unexported fields
}
ID3D12GraphicsCommandList1 extends ID3D12GraphicsCommandList.
type ID3D12GraphicsCommandList2 ¶
type ID3D12GraphicsCommandList2 struct {
// contains filtered or unexported fields
}
ID3D12GraphicsCommandList2 extends ID3D12GraphicsCommandList1.
type ID3D12GraphicsCommandList3 ¶
type ID3D12GraphicsCommandList3 struct {
// contains filtered or unexported fields
}
ID3D12GraphicsCommandList3 extends ID3D12GraphicsCommandList2.
type ID3D12GraphicsCommandList4 ¶
type ID3D12GraphicsCommandList4 struct {
// contains filtered or unexported fields
}
ID3D12GraphicsCommandList4 extends ID3D12GraphicsCommandList3.
type ID3D12Heap ¶
type ID3D12Heap struct {
// contains filtered or unexported fields
}
ID3D12Heap represents a heap.
func (*ID3D12Heap) Release ¶
func (h *ID3D12Heap) Release() uint32
Release decrements the reference count.
type ID3D12Heap1 ¶
type ID3D12Heap1 struct {
// contains filtered or unexported fields
}
ID3D12Heap1 extends ID3D12Heap.
type ID3D12InfoQueue ¶
type ID3D12InfoQueue struct {
// contains filtered or unexported fields
}
ID3D12InfoQueue is the info queue interface for debug messages.
func (*ID3D12InfoQueue) ClearStoredMessages ¶ added in v0.16.0
func (q *ID3D12InfoQueue) ClearStoredMessages()
ClearStoredMessages clears all stored messages from the queue.
func (*ID3D12InfoQueue) GetMessage ¶ added in v0.16.0
func (q *ID3D12InfoQueue) GetMessage(index uint64) *D3D12Message
GetMessage retrieves a message by index. The caller must free the returned buffer with CoTaskMemFree (or just let Go GC it since we copy the data). Returns nil if the index is out of range or the call fails.
D3D12's GetMessage follows the two-call COM idiom: first call with pMessage=nil returns S_FALSE (HRESULT=1) and writes the required buffer size into pMessageByteLength; second call with an allocated buffer of that size returns S_OK (HRESULT=0) and writes the message. SUCCEEDED(hr) in COM treats any hr with sign bit clear as success, so we must check int32(ret) < 0 rather than ret != 0 — otherwise the S_FALSE from the size-query phase is mistakenly treated as failure and the caller sees a populated queue (GetNumStoredMessages > 0) but gets nil from every retrieval.
func (*ID3D12InfoQueue) GetNumStoredMessages ¶ added in v0.16.0
func (q *ID3D12InfoQueue) GetNumStoredMessages() uint64
GetNumStoredMessages returns the number of messages stored in the queue.
func (*ID3D12InfoQueue) Release ¶ added in v0.16.0
func (q *ID3D12InfoQueue) Release() uint32
Release decrements the reference count.
type ID3D12Object ¶
type ID3D12Object struct {
// contains filtered or unexported fields
}
ID3D12Object is the base interface for D3D12 objects.
type ID3D12Pageable ¶
type ID3D12Pageable struct {
// contains filtered or unexported fields
}
ID3D12Pageable is the base interface for pageable D3D12 objects.
type ID3D12PipelineState ¶
type ID3D12PipelineState struct {
// contains filtered or unexported fields
}
ID3D12PipelineState represents a pipeline state.
func (*ID3D12PipelineState) Release ¶
func (p *ID3D12PipelineState) Release() uint32
Release decrements the reference count.
type ID3D12QueryHeap ¶
type ID3D12QueryHeap struct {
// contains filtered or unexported fields
}
ID3D12QueryHeap represents a query heap.
func (*ID3D12QueryHeap) Release ¶
func (h *ID3D12QueryHeap) Release() uint32
Release decrements the reference count.
type ID3D12Resource ¶
type ID3D12Resource struct {
// contains filtered or unexported fields
}
ID3D12Resource represents a resource.
func (*ID3D12Resource) GetDesc ¶
func (r *ID3D12Resource) GetDesc() D3D12_RESOURCE_DESC
GetDesc returns the resource description. Note: Same calling convention issue as GetCPUDescriptorHandleForHeapStart.
func (*ID3D12Resource) GetGPUVirtualAddress ¶
func (r *ID3D12Resource) GetGPUVirtualAddress() uint64
GetGPUVirtualAddress returns the GPU virtual address of the resource.
func (*ID3D12Resource) Map ¶
func (r *ID3D12Resource) Map(subresource uint32, readRange *D3D12_RANGE) (unsafe.Pointer, error)
Map maps a subresource to CPU memory.
func (*ID3D12Resource) Release ¶
func (r *ID3D12Resource) Release() uint32
Release decrements the reference count.
func (*ID3D12Resource) Unmap ¶
func (r *ID3D12Resource) Unmap(subresource uint32, writtenRange *D3D12_RANGE)
Unmap unmaps a subresource.
type ID3D12Resource1 ¶
type ID3D12Resource1 struct {
// contains filtered or unexported fields
}
ID3D12Resource1 extends ID3D12Resource.
type ID3D12RootSignature ¶
type ID3D12RootSignature struct {
// contains filtered or unexported fields
}
ID3D12RootSignature represents a root signature.
func (*ID3D12RootSignature) Release ¶
func (s *ID3D12RootSignature) Release() uint32
Release decrements the reference count.
type ID3DBlob ¶
type ID3DBlob struct {
// contains filtered or unexported fields
}
ID3DBlob represents a binary blob (typically shader bytecode).
func (*ID3DBlob) GetBufferPointer ¶
GetBufferPointer returns a pointer to the blob data.
func (*ID3DBlob) GetBufferSize ¶
GetBufferSize returns the size of the blob data.