Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging HLSL for Windows 8 application

i'm currently in the process of creating a Windows 8 applicaiton using SharpDX (the managed c# directx wrapper). However I have ran into problems with one of my shaders and I want to know if its possible to debug such applications. PIX doesn't seem to work of directX apps as the executable does not like opening directly, and the new visual studio graphics debugging toolkit in VS2012 always states "unable to start the experiment" when I try to capture any information about my session.

Thanks!

like image 685
Shervanator Avatar asked Nov 03 '22 14:11

Shervanator


1 Answers

I'm coming to this post a bit late, but I would just like to add for future visitors to this thread that I have successfully used the Visual Studio 2012 Graphics Diagnostics ('the DirectX Debugger') in both SlimDX and SharpDX projects. There are a few things that can disrupt the process, notably in SlimDX projects I couldn't debug apps with mixed DX10/11, DX10 doesn't seem to work with VS2012, at least for managed code. So if you have any text rendering for example, you will have to remove it for the debugging session. I'd say using the following to isolate your DX10 code should work

#define DXDIAGSESSION
  // ... 
#if DXDIAGSESSION
  // your DX10 code goes here.
#endif

And for the SharpDX project (C# / WinRT / XAML / SharpDX) I couldn't use the Managed Only Debugger. I had to set the Debugger to Mixed (Managed and Native) to make it work.

like image 62
Gavin Williams Avatar answered Nov 15 '22 06:11

Gavin Williams