[Mesa-dev] i965: slow glTexSubImage2D because of Y tiling
Tomash Brechko
tomash.brechko at gmail.com
Fri Dec 27 05:56:03 PST 2013
Hello,
I have an application that on each frame fills a full-window pixel buffer
and then calls glTexSubImage2D() and maps the texture to a screen by
drawing full-window rectangle (my hardware is Intel(R) Core(TM) i7-2670QM
CPU @ 2.20GHz (brw->gen == 6), OpenGL 3.0, direct glDrawPixels() is much
slower and is not used).
However in
src/mesa/drivers/dri/i965/intel_tex_subimage.c:intel_texsubimage_tiled_memcpy()
fast path is implemented only for I915_TILING_X, and
src/mesa/drivers/dri/i965/intel_mipmap_tree.c:intel_miptree_choose_tiling()
returns (I915_TILING_Y | I915_TILING_X) in my case, which makes
intel_miptree_create() in the same file call intel_region_alloc() with
I915_TILING_Y.
By forcing intel_region_alloc() to use I915_TILING_X I get 50% FPS rise
(for glxgears 2400FPS -> 3600FPS in default window, 108FPS -> 175FPS for
1920x1080 fullscreen). I do this with
gdb -x i965-texture-tiling-x.gdb --args myapp
where i965-texture-tiling-x.gdb script contains:
----------
set breakpoint pending on
break intel_miptree_create
break intel_region_alloc
disable 2
comm 1
silent
enable 2
cont
end
comm 2
silent
set tiling = 1
disable 2
cont
end
run
---------
So I wonder if there are strong reasons to prefer Y tiling for textures, at
least on gen == 6? Is Y tiling preffered because of faster texel lookups
(assuming glTexSubImage2D() is not called on each frame)?
--
Tomash Brechko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131227/061d8451/attachment.html>
More information about the mesa-dev
mailing list