Skip to content

D3D12CreateDevice call fails with hr 0x887A0004 on WSL2 #470

@BenoitAmbry

Description

@BenoitAmbry

Code works properly when not running under kcov.
Other calls to DXCore seem to work properly.

Repro steps:
clone https://github.com/microsoft/DirectX-Headers.git
edit test/test.cpp
modify last line to be:

    auto hr = D3D12CreateDevice(adapter, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&device));
    if (FAILED(hr)) {
        printf("Failed to create D3D12 device hr = %x\n", hr);
        return -1;
    }
    return 0;

run he following commands:

mkdir build
cd build
cmake ..
make
test/DirectX-Headers-Test
mkdir cov
kcov cov test/DirectX-Headers-Test

Normal run of test/DirectX-Headers-Test doesn't show any error, kcov run shows error:
Failed to create D3D12 device hr = 887a0004
The resulting coverage output will also show that the return 0; line is not hit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions