Skip to content

D3D12: d3d_D3D12GetInterface with CLSID_D3D12DeviceFactoryGodot returns E_NOINTERFACE #105234

@ghuser404

Description

@ghuser404

Tested versions

Custom 4.5.dev2

System information

Godot v4.5.dev (f265ae177) - Windows 10 (build 19045) - Multi-window, 2 monitors - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 32.0.15.7283) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 threads)

Issue description

There is this code for dynamically loading newer D3D12 functionality

if (SUCCEEDED(sdk_config1->CreateDeviceFactory(agility_sdk_version, agility_sdk_path.ascii().get_data(), IID_PPV_ARGS(device_factory.GetAddressOf())))) {
	d3d_D3D12GetInterface(CLSID_D3D12DeviceFactoryGodot, IID_PPV_ARGS(device_factory.GetAddressOf()));
} else if (SUCCEEDED(sdk_config1->CreateDeviceFactory(agility_sdk_version, ".\\", IID_PPV_ARGS(device_factory.GetAddressOf())))) {
	d3d_D3D12GetInterface(CLSID_D3D12DeviceFactoryGodot, IID_PPV_ARGS(device_factory.GetAddressOf()));
}

Looking at the debug logs, this line SUCCEEDED(sdk_config1->CreateDeviceFactory(agility_sdk_version, ".\\", IID_PPV_ARGS(device_factory.GetAddressOf()))) loads D3D12Core.dll for the specified location, but the next line d3d_D3D12GetInterface(CLSID_D3D12DeviceFactoryGodot, IID_PPV_ARGS(device_factory.GetAddressOf())) also loads D3D12Core.dll, but from C:\Windows\System32, and returns E_NOINTERFACE.

Steps to reproduce

  1. Set d3d12 renderer for you app
  2. Debug the _init_device_factory function
  3. Observe the logs when calling d3d_D3D12GetInterface

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions