Results 1 to 3 of 3

Thread: Best practices to debug a geometry shader?

  1. #1
    Join Date
    Apr 2010
    Posts
    24

    Default Best practices to debug a geometry shader?

    Recently, I ran into a motion vector problem in my geometry shader.
    I tried to dump the resultant mi file with mi_api_debug but got no luck.
    Would it be possible to use mi_api_debug if I use obj callback for a placeholder?

    Besides, would you guys please kindly share your own experiences in debugging for geometry shaders?
    Any idea is welcome. Thank you all!

    Ryan

  2. #2

    Default

    Hi Ryan,
    the geometry can easily be dumped, here is a fragment:
    FILE * fp = fopen("/tmp/debug.mi", "w");
    miEchoOptions opt;
    memset(&opt, 0, sizeof(opt));
    mi_geoshader_echo_tag(fp, tag, &opt);
    fclose(fp);

    In the fragment above your result tag is passed, which can be an object, group etc.
    Quite useful is also the -echo command line option.

    Gunter

    Quote Originally Posted by ryan47 View Post
    Recently, I ran into a motion vector problem in my geometry shader.
    I tried to dump the resultant mi file with mi_api_debug but got no luck.
    Would it be possible to use mi_api_debug if I use obj callback for a placeholder?

    Besides, would you guys please kindly share your own experiences in debugging for geometry shaders?
    Any idea is welcome. Thank you all!

    Ryan

  3. #3
    Join Date
    Apr 2010
    Posts
    24

    Default

    WOW!! Thanks for the sharing, Gunter.
    mi_geoshader_echo_tag is awesome!!

    Ryan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •