<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jan 21, 2017 at 6:30 PM, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a>> writes:<br>
<br>
> Usually if an app is using MRT, we want to dump (and diff) *all* the<br>
> render targets to track down where things are going wrong.  Also dumps<br>
> depth and stencil buffers.<br>
><br>
> Only implemented for GLDumper, since I don't know anything about D3D.<br>
><br>
> TODO maybe cmdline arg to control this?</span></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">I'm not sure, I kinda tend to<br>
> think if you are using dump-images + diff-images you probably want to<br>
> compare all the render targets.<br></span></blockquote><div><br></div><div>Yes, let's add a command line please.  I fear that reading back depth-stencil might cause instability / and slow down things tremendously, as it can really be an heavy operation for HW which stores Z buffer in a non-linear fashion.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> ---<br>
>  retrace/d3dretrace.hpp     |  9 ++++++--<br>
>  retrace/glretrace_main.cpp | 12 +++++++++--<br>
>  retrace/glstate.hpp        |  5 ++++-<br>
>  retrace/glstate_images.cpp | 51 ++++++++++++++++++++++++++++++<wbr>+++++++---------<br>
>  retrace/retrace.hpp        |  5 ++++-<br>
>  retrace/retrace_main.cpp   | 50 ++++++++++++++++++++++++++++++<wbr>++++++---------<br>
>  6 files changed, 106 insertions(+), 26 deletions(-)<br>
><br>
<br>
</span><span class="">> @@ -200,9 +206,24 @@ takeSnapshot(unsigned call_no) {<br>
>                  break;<br>
>              }<br>
>          } else {<br>
> -            os::String filename = os::String::format("%s%010u.<wbr>png",<br>
> -                                                     snapshotPrefix,<br>
> -                                                     useCallNos ? call_no : snapshot_no);<br>
> +            os::String filename;<br>
> +<br>
> +            if (mrt == -2) {<br>
> +                /* stencil */<br>
> +                filename = os::String::format("%s%010u-s.<wbr>png",<br>
> +                                              snapshotPrefix,<br>
> +                                              useCallNos ? call_no : snapshot_no);<br>
> +            } else if (mrt == -1) {<br>
> +                /* depth */<br>
> +                filename = os::String::format("%s%010u-z.<wbr>png",<br>
> +                                              snapshotPrefix,<br>
> +                                              useCallNos ? call_no : snapshot_no);<br>
> +            } else {<br>
> +                filename = os::String::format("%s%010u-<wbr>mrt%u.png",<br>
> +                                              snapshotPrefix,<br>
> +                                              useCallNos ? call_no : snapshot_no,<br>
> +                                              mrt);<br>
> +            }<br>
<br>
</span>The rename here is going to break piglit's testing of color rendering<br>
output.  Could we keep the old filename for the first color buffer, or<br>
could you fix piglit to look for both?<br></blockquote><div><br></div><div>Yes, please let's keep the old filename for first color buffers.  There are lots of test harnesses (besides piglit) that are built upon apitrace that would need to change if not.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The patch (other than that) seems really useful, though.<br>
<br>______________________________<wbr>_________________<br>
apitrace mailing list<br>
<a href="mailto:apitrace@lists.freedesktop.org">apitrace@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/apitrace" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/apitrace</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">Indeed.  Thanks.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Jose</div></div>