Skip to content

Add optional ID3D12DeviceFactory parameter to AGSDX12DeviceCreationParams to support "D3D12 Independent Devices" feature #56

@Marlax0

Description

@Marlax0

Dunno how much attention this project still gets, but this is a feature I would personally like to see added.

Read about D3D12 Independent Devices here. Some info may be outdated.
I believe Windows 11 always supported this in a non-Developer Mode environment, and support was added to Windows 10 about a year ago.

One use case of this feature is it allows an application to enable the Agility SDK when its executable cannot export the necessary symbols.
For example, a standard .NET application is started by a "runtime host" executable, separate from the application executable.
Without this feature, the Agility SDK is otherwise unavailable for all .NET applications. (There are dozens of us!)
There are other use cases, but this is one I am familiar with.

Basically, if ID3D12DeviceFactory was passed, use ID3D12DeviceFactory::CreateDevice() instead of D3D12CreateDevice().

Proposed API example:

ComPtr<ID3D12SDKConfiguration1> sdkConfig;
D3D12GetInterface(CLSID_D3D12SDKConfiguration, IID_PPV_ARGS(&sdkConfig));

ComPtr<ID3D12DeviceFactory> deviceFactory;
sdkConfig->CreateDeviceFactory(615, "../AgilitySDK/x64/", IID_PPV_ARGS(&deviceFactory));

AGSDX12DeviceCreationParams deviceCreationParams = {};
deviceCreationParams.pDeviceFactory = deviceFactory;
deviceCreationParams.pAdapter = someAdapter;
deviceCreationParams.iid = __uuidof(ID3D12Device14);
deviceCreationParams.FeatureLevel = D3D_FEATURE_LEVEL_11_0;

AGSDX12ExtensionParams extensionsParams = {};
extensionsParams.uavSlot = someSlot;

AGSDX12ReturnedParams agsParams = {};
AGSReturnCode rc = agsDriverExtensionsDX12_CreateDevice(someContext, &deviceCreationParams, &extensionsParams, &agsParams);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions