• Advertisement
Sign in to follow this  

[VS2012] Debugging pixel shader

This topic is 1696 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

Hi,

 

I'm trying to debug a pixel shader in VS2012 but I can't access the pixel history because "This draw call is using system-value semantics and interferes with pixel history computation"

 

The vertex shader generates a fullscreen triangle using SV_VertexID...

 

Is it impossible to debug pixel shaders associated with vertex shaders that use SV_VertexID?

 

Thanks

Share this post


Link to post
Share on other sites
Advertisement

Hi Tiago,

 

I found out that it is indeed not possible to do the pixel history when a pipeline configuration uses SV_InstanceID, SV_PrimitiveID, or SV_VertexID.  This is due to the fact that these are generated on the GPU rather than by the driver, complicating the ability to recreate the pixel history.  Apparently PIX had the same issue, although nobody was sure if it has been documented prior to this.

 

That's probably not the answer you wanted to hear, but at least you know what to expect in these three cases now.  I hope that helps...

Share this post


Link to post
Share on other sites

Thanks for the answer.

 

I'll just use CPU generated fullscreen triangles in debug builds.

 

In PIX there was an warning (or error) message but it was possible to debug pixel shaders.

Share this post


Link to post
Share on other sites

You can still debug pixel shaders, but you have to select them from the pipeline view.  The difference is that you can't select a specific primitive to debug - the debugger will just pick the first invocation.  That doesn't give you the granularity in debugging, but it will give you a chance to see your shader executing at least on one invocation so you can see how it is behaving.

Share this post


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

  • Advertisement