<div dir="ltr">Hi Courtney,<div>I've been doing similar work but using Xenotic as the benchmark. Here is how I've been estimating upload times: First I made a rough determination of a texture count, like 300, as a metric. In intelTexImage I use clock_gettime to determine the elapsed time between the loading of texture 0 and texture 300. Then I use _mesa_debug to output the results to a log file by setting these env variables:</div>
<div><br></div><div>export MESA_DEBUG=1;</div><div>export MESA_LOG_FILE=`pwd`/mesa.log<br></div><div><br></div><div>Cheers,</div><div>Mark</div><div><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 14, 2013 at 9:00 AM, Courtney Goeltzenleuchter <span dir="ltr"><<a href="mailto:courtney@lunarg.com" target="_blank">courtney@lunarg.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Does anyone know of a test that measures frame 0 time? Or texture upload speed?<div><br></div><div>For Smokin' Guns, I tried measuring the overall time, but an improved frame 0 time has difficulty standing out of a 2607 frame test.</div>

<div><br></div><div>I may have to create something. Suggestions for an appropriate framework?</div><div><br></div><div>Thanks,</div><div> Courtney</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">
On Mon, Oct 14, 2013 at 8:32 AM, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 10/13/2013 08:33 PM, Ian Romanick wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 10/13/2013 01:50 PM, Frank Henigman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, Oct 11, 2013 at 10:00 PM, Chad Versace<br>
<<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 10/11/2013 10:17 AM, Courtney Goeltzenleuchter wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Support all levels of a supported texture format.<br>
---<br>
   src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c | 13 +++++++++++--<br>
   1 file changed, 11 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c<br>
b/src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c<br>
index 4aec05d..5e46760 100644<br>
--- a/src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c<br>
+++ b/src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c<br>
@@ -541,14 +541,13 @@ intel_texsubimage_tiled_<u></u>memcpy(struct gl_context *<br>
ctx,<br>
      uint32_t cpp;<br>
      mem_copy_fn mem_copy = NULL;<br>
<br>
-   /* This fastpath is restricted to specific texture types: level 0 of<br>
+   /* This fastpath is restricted to specific texture types:<br>
       * a 2D BGRA, RGBA, L8 or A8 texture. It could be generalized to<br>
support<br>
       * more types.<br>
       */<br>
      if (!brw->has_llc ||<br>
          type != GL_UNSIGNED_BYTE ||<br>
          texImage->TexObject->Target != GL_TEXTURE_2D ||<br>
-       texImage->Level != 0 ||<br>
          pixels == NULL ||<br>
          _mesa_is_bufferobj(packing-><u></u>BufferObj) ||<br>
          packing->Alignment > 4 ||<br>
@@ -616,6 +615,16 @@ intel_texsubimage_tiled_<u></u>memcpy(struct gl_context *<br>
ctx,<br>
      DBG("%s: level=%d offset=(%d,%d) (w,h)=(%d,%d)\n",<br>
          __FUNCTION__, texImage->Level, xoffset, yoffset, width, height);<br>
<br>
+   /* Adjust x and y offset based on miplevel<br>
+    */<br>
+   if (texImage->Level) {<br>
+      GLuint xlevel, ylevel;<br>
+      intel_miptree_get_image_<u></u>offset(image->mt, texImage->Level, 0,<br>
+                                  &xlevel, &ylevel);<br>
+      xoffset += xlevel;<br>
+      yoffset += ylevel;<br>
+   }<br>
+<br>
      linear_to_tiled(<br>
         xoffset * cpp, (xoffset + width) * cpp,<br>
         yoffset, yoffset + height,<br>
<br>
</blockquote>
<br>
Usually when we commit performance patches like this, we state in the<br>
commit message what the observed relative performance gain.<br>
<br>
What gain did you see? Hardware? Benchmark? Kernel version? How many<br>
runs?<br>
</blockquote>
<br>
We could quote from my patch, as this is just opening more paths into that code.<br>
Or do you think this calls for different testing?<br>
</blockquote>
<br>
I think what Chad is asking is whether there's some information like<br>
"Improves load time of application XYZ 12.3+4.5%" or similar.<br>
<br>
In the past, we've had problems with patches that just make vague claims<br>
of "improves performance" when we later find critical bugs in those<br>
patches... can we just revert the code, or is it going to run the<br>
performance of... something?<br>
<br>
For reference, see commit 329cd6a9b and this thread from mesa-dev:<br>
<br>
<a href="http://lists.freedesktop.org/archives/mesa-dev/2013-June/040811.html" target="_blank">http://lists.freedesktop.org/<u></u>archives/mesa-dev/2013-June/<u></u>040811.html</a><br>
</blockquote>
<br></div></div>
Ian read my mind correctly. The commit message should say "Improves XYZ of<br>
application ABC by 10.3+-1.2%", as well as state the hardware at a minimum,<br>
and kernel version too if you're feeling gracious.<br>
<br>
In the future, if someone discover that this patch introduces a bug, the commit<br>
message's performance claim will prevent that someone from simply reverting the<br>
code.<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><div class="im">-- <br><div dir="ltr">Courtney Goeltzenleuchter<br><div>LunarG</div><div><img src="http://media.lunarg.com/wp-content/themes/LunarG/images/logo.png" width="96" height="65"><br>

</div></div>
</div></div>
<br>_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
<br></blockquote></div><br></div>