Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This method returns the GPU virtual address of a buffer resource.
D3D12_GPU_VIRTUAL_ADDRESS GetGPUVirtualAddress();
Type: D3D12_GPU_VIRTUAL_ADDRESS
This method returns the GPU virtual address. D3D12_GPU_VIRTUAL_ADDRESS is a typedef'd synonym of UINT64.
This method is only useful for buffer resources, it will return zero for all texture resources.
For more information on the use of GPU virtual addresses, refer to Indirect Drawing.
The D3D1211on12 sample uses ID3D12Resource::GetGPUVirtualAddress as follows:
// Initialize the vertex buffer view.
m_vertexBufferView.BufferLocation = m_vertexBuffer->GetGPUVirtualAddress();
m_vertexBufferView.StrideInBytes = sizeof(Vertex);
m_vertexBufferView.SizeInBytes = vertexBufferSize;
Refer to the Example Code in the D3D12 Reference.
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d12.h |
Library | D3d12.lib |
DLL | D3d12.dll |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today