<div dir="ltr">My apologies, I was distracted by other maters - updated commit follows.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 2:21 PM, 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 class="HOEnZb"><div class="h5">On 11/08/2013 08:13 AM, Courtney Goeltzenleuchter wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Support all levels of a supported texture format.<br>
<br>
Using 1024x1024, RGBA 8888 source, mipmap<br>
<<THIS PATCH>><br>
internal-format Before (MB/sec) XRGB (MB/sec) mipmap (MB/sec)<br>
GL_RGBA 628.15 627.15 615.90<br>
GL_RGB 265.95 456.35 611.53<br>
512x512<br>
GL_RGBA 600.23 597.00 619.95<br>
GL_RGB 255.50 440.62 611.28<br>
256x256<br>
GL_RGBA 489.08 487.80 587.42<br>
GL_RGB 229.03 376.63 585.00<br>
<br>
Test shows similar pattern for 512x512 and 256x256.<br>
<br>
Benchmark has been sent to mesa-dev list: teximage_enh<br>
<br>
Courtney Goeltzenleuchter (2):<br>
i965: add XRGB to tiled_memcpy<br>
i965: Enhance tiled_memcpy to support all levels<br>
<br>
src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c | 11 ++++++++---<br>
1 file changed, 8 insertions(+), 3 deletions(-)<br>
<br>
--<br>
1.8.1.2<br>
<br>
Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com><br>
---<br>
src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c | 8 ++++++--<br>
1 file changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c b/src/mesa/drivers/dri/i965/<u></u>intel_tex_subimage.c<br>
index b1826fa..50f802f 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>
@@ -543,7 +543,7 @@ intel_texsubimage_tiled_<u></u>memcpy(struct gl_context * 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 support<br>
* more types.<br>
*<br>
@@ -555,7 +555,6 @@ intel_texsubimage_tiled_<u></u>memcpy(struct gl_context * ctx,<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>
@@ -631,6 +630,11 @@ intel_texsubimage_tiled_<u></u>memcpy(struct gl_context * ctx,<br>
packing->Alignment, packing->RowLength, packing->SkipPixels,<br>
packing->SkipRows, for_glTexImage);<br>
<br>
+ /* Adjust x and y offset based on miplevel<br>
+ */<br>
</blockquote>
<br></div></div>
One small nitpick. The above comment is short enough to fit on a single line.<br>
There's no need to place '*/' on a line by itself.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ xoffset += image->mt->level[texImage-><u></u>Level].level_x;<br>
+ yoffset += image->mt->level[texImage-><u></u>Level].level_y;<br>
+<br>
linear_to_tiled(<br>
xoffset * cpp, (xoffset + width) * cpp,<br>
yoffset, yoffset + height,<br>
<br>
</blockquote>
<br></div>
The code looks good, though I haven't tested it yet. But, I see the same<br>
issues with the commit message that I had with patch 1.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <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>