7 Replies Latest reply on Aug 10, 2011 10:58 AM by virtazim

    PerfStudio 2 for Compute Shader debugging in Dispatch pipeline (GPGPU scenario)

      Discuss possibility of using PerfStudio 2 Compute Shader debugging in Dispatch pipeline, without Graphics pipeline


      I'm using Compute Shaders 5 to develop GPGPU application which has no Graphics pipeline and CS is running in Dispatch pipeline only. I'm very interested in DX11 Compute Shader debugging capabilities provided by GPU PerfStudio 2.X and wondering if it is possible to use it for applications with Dispatch pipeline.

      I've tried PerfStudio 2.1 to debug BasicCompute11 sample from DX SDK (February 2010), but didn't succeed - client reported error "Unable to attach to current application. Please make sure it is using a supported graphics API", while server printed these messages:

      GPU PerfStudio Server - Version V2.1.719

      Message: Server        : Using Logfile: D:/GPUPerfStudio2.1/Server-Win32/pslog.txt

      Message: Server        : Succesfully enabled DX Peformance Counters in Driver

      Message: Server        : Available Wrappers:

      Message: Server        :    DX10Server.dll      V2.1.719        DX10

      Message: Server        :    DX11Server.dll      V2.1.719        DX11

      Message: Server        :    GLServer.dll        V2.1.719        OpenGL


      Message: Server        : Starting web server on port 80

      Message: Server        : About to launch: C:\Program Files\Microsoft DirectX SDK (February 2010)\Samples\C++\Direct3D11\Bin\x86\BasicCompute11.exe

      Message: Server        : Params:

      Message: Server        : Working Directory:

      Creating device...Message: Server        :   0:  - /Process.xml


      Creating Compute Shader...done

      Creating buffers and filling them with initial data...done

      Creating buffer views...done

      Running Compute Shader...done

      Verifying against CPU result...succeeded

      Cleaning up...

      Message: Server        :   1:  - /Process.xml

      Message: Server        :   2:  - /Process.xml

      Message: Server        :   3:  - /Process.xml

      Message: Server        :   4:  - /Process.xml

      Message: Server        :   5:  - /Process.xml

      Message: Server        :   6:  - /Process.xml

      Is it still possible to use PerfStudio 2.1 for CS debuigging in Dispatch pipeline, may be with some worarounds? Are you going to support this scenarion in future versions of PerfStudio?
        • PerfStudio 2 for Compute Shader debugging in Dispatch pipeline (GPGPU scenario)

          Currently, GPU PerfStudio expects to find a call to ID3D11Device::Present() in order to identify the end of a frame. Similarly, it expects that the application is conntinually rendering. Since BasicCompute11 does not loop, it does not work with GPU PerfStudio 2. You should be able to put a loop in your application and a call to Present() in order to make it work correctly.

          Please let us know if you continue to have trouble with it.

            • PerfStudio 2 for Compute Shader debugging in Dispatch pipeline (GPGPU scenario)

              I also want to debug a compute shader so I tested your suggestion (see code). This way PerfStudio is able to analyze the frame and it is also possible to view UAVs for the shader etc. and to debug it.

              But debugging doesn't work that well. I have a function call within the main function of the shader which is not executed. And only one thread was debugged although I said the shader that two should be started. And then there are also the genereal debugging disadvantages of PerfStudio (no possibility to add watches, etc.)


              Would be really nice to see improvements in shader debugging for all shader stages in the future.



              while (true) { d3dContext->Dispatch(1,1,1); IDXGISwapChain* chain = DXUTGetDXGISwapChain(); chain->Present(0,0); }