Jump to content
  • Advertisement
Sign in to follow this  
greg2@goldfinches.org

Visualize purposes of graphics pipeline phases

This topic is 2498 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

http://software.inte...ools-intel-gpa/

I think that shall do what you want to.


I messed with this application for a couple hours. It is nice, but the only features I found for 'toggling' parts of the pipeline are to replace the vertex or pixel shader with an effectively null operation (which I don't know how to do, since they have to return something). It's definitely designed for optimization. I'm glad to find out about this app, though. Thanks!

Share this post


Link to post
Share on other sites
That is a difficult problem to solve, especially in a generic fashion. I have thought about building a tool like this, but haven't found a good or easy way to do so yet... What you are looking for is a visualization of the data after each stage of the pipeline (which you have accurately described :) ). The problem is, that normally you only have a visualization of the output of one stage - the output merger. For each stage before that, you need to somehow extract the streamed data from the pipeline and then render that somehow onto a render target.

So in this case, what would you want to see from each stage of the pipeline? The output of a pixel shader is a group of fragments which may or may not end up affecting an output render target. The output of the rasterizer stage is largely similar, but can be sent to one of several viewport arrays - how should this be visualized? You can continue back through the pipeline at each stage and try to consider what would be visualized at each stage... By the time you make it back to the input assembler you will then realize that there are lots of different draw calls that can instantiate the pipeline execution - this is lots of different variations that need to be considered.

This is difficult enough when trying to do it for a particular rendering configuration - but then you need to consider doing it in a generalized way... this is a big challenge. If you find a tool that does it, I would be very interested in hearing about it!

Share this post


Link to post
Share on other sites
This is difficult enough when trying to do it for a particular rendering configuration - but then you need to consider doing it in a generalized way... this is a big challenge. If you find a tool that does it, I would be very interested in hearing about it!
Me too!

As a side note, my programs won't allow you to attach PIX (I suppose you could workaround that with some HEX wizardry), and won't correctly interface with PerfHUD unless built appropriately.

Share this post


Link to post
Share on other sites

That is a difficult problem to solve, especially in a generic fashion. I have thought about building a tool like this, but haven't found a good or easy way to do so yet... What you are looking for is a visualization of the data after each stage of the pipeline (which you have accurately described :) ). The problem is, that normally you only have a visualization of the output of one stage - the output merger. For each stage before that, you need to somehow extract the streamed data from the pipeline and then render that somehow onto a render target.

So in this case, what would you want to see from each stage of the pipeline?

...


For a more advanced DirectX programmer, I'm sure a generic way to see what is actually working at each stage would be great, but I am only interested in any visualization to understand why the graphics pipeline isn't just Tesselate -> Add Meshes -> Add Lighting -> Project to 2D.

The ideal would be be able to see different degrees/kinds of implementation of each stage to see what I need to do to achieve the qualities of a scene I have in my mind. Part of the problem is that I can look at a scene and see that it is not quite what I am looking for, but can't tell what needs to be done to improve it.

However, I am getting to the point that I will be comfortable playing with code to see how each stage impacts the final scene, although it will take a long time to do what I am describing above.

Share this post


Link to post
Share on other sites
Hidden
Sorry to repeat myself, but...

Step through an existing application with PIX/gDebugger/Perfhud...

I'm not exactly sure which does what anymore, but you can see vertices pre and post vertex shader, you can replace shaders at runtime to see the data they're being fed, watch g-buffers etc... All these tools are free, and they're excellent for debugging OpenGL/DirectX. And debugging is exactly that: examening the internal state of a program.

Share this post


Link to post
I believe that you can do exactly what you want with the programs GPU PerfStudio (For AMD cards) and PerfHUD (for nVidia cards). I have only used PerfStudio (due to not having a green graphics card, so I can only speak for that one.

You can use it to:
  • Visualize all draw calls sent to the graphic card, their exact duration, and their contents.
  • For each draw call, visualize the contents of all enabled buffers (even vertex- & index buffers) and every render target - after each stage. (For example, after the pixel shader has been applied).
  • Debug shaders, view their assembly code and instruction count (and HLSL if you have it).
  • You can even step trough the shader code and view all variables, just like in Visual Studio!
  • Many more things that I haven't used yet.
    I have personally used this program for stepping through the different render stages of some games (for educational purposes) and performance debugging of my own program. It is just a tiny bit unstable sometimes, but other than that, it is a fantastic tool.

    You might also want to look at this presentation: http://developer.dow...eyondprintf.pdf
    GPU Perfstudio can be downloaded here for free: http://developer.amd...es/default.aspx

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!