<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Oct 13, 2013 at 1:41 PM, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On 10/11/2013 10:16 AM, Courtney Goeltzenleuchter wrote:<br>

</div><div><div>> MESA_FORMAT_XRGB8888 is equivalent to MESA_FORMAT_ARGB8888 in terms<br>
> of storage on the device, so okay to use this optimized copy routine.<br>
> ---<br>
>  src/mesa/drivers/dri/i965/intel_tex_subimage.c | 3 ++-<br>
>  1 file changed, 2 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c<br>
> index 5cfdbd9..4aec05d 100644<br>
> --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c<br>
> +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c<br>
> @@ -564,7 +564,8 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,<br>
>         (texImage->TexFormat == MESA_FORMAT_A8 && format == GL_ALPHA)) {<br>
>        cpp = 1;<br>
>        mem_copy = memcpy;<br>
> -   } else if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {<br>
> +   } else if ((texImage->TexFormat == MESA_FORMAT_ARGB8888) ||<br>
> +           (texImage->TexFormat == MESA_FORMAT_XRGB8888)) {<br>
>        cpp = 4;<br>
>        if (format == GL_BGRA) {<br>
>           mem_copy = memcpy;<br>
><br>
<br>
</div></div>Are there appropriate test cases that hit this path?  I don't think<br>
piglit exercises a lot of different texture formats.  I just want to be<br>
sure that some test now hits this fast path that didn't hit it before.<br>
</blockquote></div><br>This path is exercised by the Smokin' Guns benchmark during it's initialization but not during the measured part of the run.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
I've also verified that the piglit test: glean -o -v -v -v -t +pixelFormats --quick</div><div class="gmail_extra">exercises this path.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">As for other benchmarks, I'd welcome suggestions. I couldn't find anything beyond the Mesa demo that Frank used to test his patch. <br clear="all">
<div><br></div><div style>On Smokin' Guns, with these patches combined (Franks, XRGB and all-levels), using valgrind I measured a reduction in instruction count of intelTexImage of 47.3% (from <span style="font-size:13.333333969116211px;color:rgb(0,0,0);font-family:arial,sans,sans-serif;white-space:pre-wrap">2344404725 to </span><span style="color:rgb(0,0,0);font-family:arial,sans,sans-serif;font-size:13.333333969116211px;white-space:pre-wrap">1235584087). Without all three patches, the driver was falling back to a Mesa copy routine that copied one byte at a time.</span></div>
<div style><span style="font-size:13.333333969116211px;color:rgb(0,0,0);font-family:arial,sans,sans-serif;white-space:pre-wrap"><br></span></div><div style><span style="font-size:13.333333969116211px;color:rgb(0,0,0);font-family:arial,sans,sans-serif;white-space:pre-wrap">Does that help?</span></div>
<div style><span style="font-size:13.333333969116211px;color:rgb(0,0,0);font-family:arial,sans,sans-serif;white-space:pre-wrap"><br></span></div><div style><span style="font-size:13.333333969116211px;color:rgb(0,0,0);font-family:arial,sans,sans-serif;white-space:pre-wrap">Courtney</span></div>
<div style><span style="font-size:13.333333969116211px;color:rgb(0,0,0);font-family:arial,sans,sans-serif;white-space:pre-wrap"><br></span>-- </div><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>