cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

scottiebizzle
Journeyman III

No shader tracing support in R7/R9 drivers despite DirectX 11.1/11.2 support?

Hi,

I'm developing a DirectX11-based shader authoring tools ( http://www.shaderplay.com/screenshot_1.jpg ) and am working on putting in support for shader tracing/debugging similar to PIX for the 360/PC where the user can step through shader code.

The shader tracing functionality in available in DirectX 11.1 only and given that I was working with DX 11 hardware, I was actually able to get this working with the DirectX 11.2 API and the DirectX WARP software device type ( D3D_DRIVER_TYPE_WARP ), as well as the D3D_FEATURE_LEVEL_11_1 feature level, and the required D3D11_CREATE_DEVICE_DEBUGGABLE creation flag. This actually worked but as you can imagine it's slow as hell.

I noticed AMDs Radeon R7/R9 had full Direct X 11.2 support so I just picked up a XFX R7 260x and XFX R9 270x for testing. The device creation fails to create a D3D_FEATURE_LEVEL_11_1 with the D3D11_CREATE_DEVICE_DEBUGGABLE flag. Shouldn't the DX11.2 hardware support shader tracing? I'm on the latest driver ( 12/17/2013 ), but not the beta ones. Is this something you plan on supporting in upcoming drivers?

The following works and has shader tracing capability but is using a software WARP device.

D3D_FEATURE_LEVEL FeatureLevels[] = { D3D_FEATURE_LEVEL_11_1 };

HRESULT Result = D3D11CreateDevice( NULL, D3D_DRIVER_TYPE_WARP, NULL, D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_DEBUGGABLE, FeatureLevels, 1, D3D11_SDK_VERSION, &m_D3DDevice, &m_FeatureLevel, &m_D3DDeviceContext );

The following fails with result of "0x887a0004 : The specified device interface or feature level is not supported on this system." ( using R9 270x or R7 260x )

D3D_FEATURE_LEVEL FeatureLevels[] = { D3D_FEATURE_LEVEL_11_1 };

HRESULT Result = D3D11CreateDevice( NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_DEBUGGABLE, FeatureLevels, 1, D3D11_SDK_VERSION, &m_D3DDevice, &m_FeatureLevel, &m_D3DDeviceContext );

The following succeds without D3D11_CREATE_DEVICE_DEBUGGABLE and creates a 11.1 device but without shader tracing.

D3D_FEATURE_LEVEL FeatureLevels[] = { D3D_FEATURE_LEVEL_11_1 };

HRESULT Result = D3D11CreateDevice( NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, D3D11_CREATE_DEVICE_SINGLETHREADED, FeatureLevels, 1, D3D11_SDK_VERSION, &m_D3DDevice, &m_FeatureLevel, &m_D3DDeviceContext );

Any help would be greatly appreciated, I would really love to get this feature working, especially with NVidia not even supporting 11.1 or 11.2...

Cheers,

Scott

0 Likes
3 Replies
cippyboy
Journeyman III

Actually Nvidia supports most of the 11.1 features and probably all of 11.2 ( Tiled resources on a GTX 650 worked, I tested it), and I can confirm that I can't create a device with the D3D11_CREATE_DEVICE_DEBUGGABLE flag and I', on 14.4 drivers. About a year ago I was able to do that but found absolutely no code on how to do the shader tracing aside from vague documentation, care to share any public samples ?

0 Likes
scottiebizzle
Journeyman III

Ya unfortunately I don't have any special inside information, couldn't get any reply on the DirectX boards and like you was not able to find any information online. I just tried everything with tracing and related functions to try to make sense of it.

When I get back in town I'll break down how I got it working with warp device and where to make the proper calls. I was able to set the trace, render and disassemble executed code and get valid register values and think I have enough information to map from the assembly to my HLSL shader code but just need hardware support because debugging this in warp is almost as bad as using ref device. I had to put it aside to get some real progress done until I know more about it's support.

Still looking to get information from AMD and NVidia on why this extremely powerful DX 11.1 feature in particular is not supported in hardware yet.

Cheers

0 Likes
scottiebizzle
Journeyman III

Bump!

Anyone at AMD know why DirectX 11.1 shader tracing feature isn't yet supported on R7/R9 series hardware?

Thanks!

0 Likes