Search code examples
directx3dshaderdirectx-10directx-11

Usage of DirectX 10.0 or 11.0 Vertex or Pixel Shaders other than Draw() API call within graphics driver


Our project is to profile the various Vertex and Pixel, Geometry shaders used within DirectX 10 or 11 SDK application or with Game (BioShock, Far Cry etc..) applications.

Now we need an technical understanding of when the Shaders (VS,GS,PS) are being used or rather executed within pipeline, we know that during Draw() DirectX API call, the setting shader get's executed within the Pipeline.

  1. Is there any other API than Draw() call, which can internally execute or utilize the Shader being set to the Pipeline using SetShader()?

  2. Is the Device API's (such as, Map, unmap, getResourcem and Copy resource) manipulate the shaders indirectly?

Any pointers related to usage of shaders within DirectX runtime or graphics driver other than DirectX Draw() API calls will be helpful for us to identify and have robust implementation.


Solution

    1. Yes, check Compute Shaders and specifically Dispatch() method.
    2. No, shaders are just a state information, so once they've loaded into ID3D11*Shader objects, they are not changeable. If you want to decompile them, take a look at Shader Reflection API.