directx 12 CreateGraphicsPipelineState(&pipelineStateDesc, IID_PPV_ARGS(&pipeline) is always returning E_FAIL

luke shore 1 Reputation point
2021-01-03T10:11:51.413+00:00

CreateGraphicsPipelineState(&pipelineStateDesc, IID_PPV_ARGS(&pipeline) is always returning E_FAIL the documentation says "Attempted to create a device with the debug layer enabled and the layer is not installed." but I have the Graphics tools installed and SDK version 10.0.19041.1 I don't understand why I am getting the error. if anyone can shed some light on this problem it would be a big help.

Source Code: https://github.com/pheonixfirewingz/LunaLuxDirectX12Lib

the function can be found in the pipeline.cpp

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,585 questions
{count} votes

1 answer

Sort by: Most helpful
  1. luke shore 1 Reputation point
    2021-01-04T19:45:34.693+00:00

    could you check whether d3d12SDKLayers.dll is existing in your system? @Rita Han - MSFT I looked in file explorer and found it in many place's
    53392-capture.png

    You can run this official sample ( ASSERT_SUCCEEDED( g_Device->CreateGraphicsPipelineState(&m_PSODesc, MY_IID_PPV_ARGS(&m_PSO)) ); ) did you mean download it? because ASSERT_SUCCEEDED() macro is not avalible in the d3d12.h header file.
    53373-capture.png

    if you asked me to download them it does not load any of the samples
    53320-capture.png

    to see if it has the same issue for you. And for reproducing your issue could you show more detailed information as below?
    all code is downloadable and builds through CMake the repo is here :LunaLuxDirectX12Lib

    1. Show steps for how we can reproduce this issue like how to build and run your project?
      all I did was build my CMake project I don't know how I am causing the fault to reproduce it. directx12 is my first low-level experience with graphics API and the documentation does not cover the function fault in detail.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.