locked
How do I debug a shader using D3D11.1 shader tracing ?

    Question

  • D3D11.1 comes with shader tracing but there is no available sample (or at least I haven't found one) that describes how shader tracing must be coded.

    I looked at the new functions and saw that I could call D3DDisassemble which gives me a brand new blob, but I don't know if I should pass that to D3DDisassemble11Trace or if I should just pass the shader binary directly to D3DDisassemble11Trace. I also can't seem to find any function call that returns a ID3D11ShaderTrace and I mostly definitely cannot allocate it myself.

    Sunday, January 27, 2013 2:17 PM

Answers

  • You obtain a ID3D11ShaderTrace by using ID3D11ShaderTraceFactory passing in the Direct3D 11 shader object (such as an ID3D11PixelShader).

    You obtain a ID3D11ShaderTraceFactory by using QueryInterface on a Direct3D 11 device that was created with D3D11_CREATE_DEVICE_DEBUGGABLE.

    Tuesday, January 29, 2013 7:42 PM

All replies

  • Hello,

     

    I will involve more experts to investigate it.

     

    Best regards,

    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 29, 2013 8:33 AM
    Moderator
  • You obtain a ID3D11ShaderTrace by using ID3D11ShaderTraceFactory passing in the Direct3D 11 shader object (such as an ID3D11PixelShader).

    You obtain a ID3D11ShaderTraceFactory by using QueryInterface on a Direct3D 11 device that was created with D3D11_CREATE_DEVICE_DEBUGGABLE.

    Tuesday, January 29, 2013 7:42 PM
  • Hm, I assumed this Shader Tracing feature would be available on D3D11.0 cards through a driver update , but it seems I can't create a device with D3D11_CREATE_DEVICE_DEBUGGABLEif my GPU doesn't support 11.1, too bad :|.
    Friday, February 1, 2013 4:06 PM
  • Use D3D_DRIVER_TYPE_WARP with DirectX 11.1 and D3D_FEATURE_LEVEL_11_0 and then you should be able to use D3D11_CREATE_DEVICE_DEBUGGABLE. Warp is usually one SDK release behind, so DX 11.2 should fully support DX 11.1 stuff.

    However, I can't seem to create a ID3D11ShaderTrace object in warp, an don't have any DX 11.1 hardware atm so not sure what needs to be done. Wish they had a sample using this new tech.


    Thursday, March 13, 2014 2:12 PM