[Mesa-dev] [PATCH 2/2] i965: Enhance tiled_memcpy to support all levels
Courtney Goeltzenleuchter
courtney at lunarg.com
Thu Nov 7 13:31:22 PST 2013
Hi Matt,
I posted results in my cover letter email: [PATCH 0/2v2] i965: Extend fast
texture upload
Please let me know if you want more details.
Courtney
On Thu, Nov 7, 2013 at 2:28 PM, Matt Turner <mattst88 at gmail.com> wrote:
> I saw the perf demo patches and expected to see results from them in
> this patch. Any results to share?
>
> On Thu, Nov 7, 2013 at 1:22 PM, Courtney Goeltzenleuchter
> <courtney at lunarg.com> wrote:
> > Support all levels of a supported texture format.
> >
> > Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
> > ---
> > src/mesa/drivers/dri/i965/intel_tex_subimage.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> > index b1826fa..b32af3d 100644
> > --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> > +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c
> > @@ -543,7 +543,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context *
> ctx,
> > uint32_t cpp;
> > mem_copy_fn mem_copy = NULL;
> >
> > - /* This fastpath is restricted to specific texture types: level 0 of
> > + /* This fastpath is restricted to specific texture types:
> > * a 2D BGRA, RGBA, L8 or A8 texture. It could be generalized to
> support
> > * more types.
> > *
> > @@ -555,7 +555,6 @@ intel_texsubimage_tiled_memcpy(struct gl_context *
> ctx,
> > if (!brw->has_llc ||
> > type != GL_UNSIGNED_BYTE ||
> > texImage->TexObject->Target != GL_TEXTURE_2D ||
> > - texImage->Level != 0 ||
> > pixels == NULL ||
> > _mesa_is_bufferobj(packing->BufferObj) ||
> > packing->Alignment > 4 ||
> > @@ -572,7 +571,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context *
> ctx,
> > cpp = 1;
> > mem_copy = memcpy;
> > } else if ((texImage->TexFormat == MESA_FORMAT_ARGB8888)
> > - || (texImage->TexFormat == MESA_FORMAT_XRGB8888)) {
> > + || (texImage->TexFormat == MESA_FORMAT_XRGB8888)) {
>
> Extraneous change?
>
> > cpp = 4;
> > if (format == GL_BGRA) {
> > mem_copy = memcpy;
> > @@ -631,6 +630,11 @@ intel_texsubimage_tiled_memcpy(struct gl_context *
> ctx,
> > packing->Alignment, packing->RowLength, packing->SkipPixels,
> > packing->SkipRows, for_glTexImage);
> >
> > + /* Adjust x and y offset based on miplevel
> > + */
> > + xoffset += image->mt->level[texImage->Level].level_x;
> > + yoffset += image->mt->level[texImage->Level].level_y;
> > +
> > linear_to_tiled(
> > xoffset * cpp, (xoffset + width) * cpp,
> > yoffset, yoffset + height,
> > --
> > 1.8.1.2
>
--
Courtney Goeltzenleuchter
LunarG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131107/57414810/attachment.html>
More information about the mesa-dev
mailing list