OSDN Git Service

i965/skl: Fix the qpitch value
authorNeil Roberts <neil@linux.intel.com>
Wed, 18 Feb 2015 18:41:58 +0000 (18:41 +0000)
committerNeil Roberts <neil@linux.intel.com>
Tue, 21 Apr 2015 05:03:21 +0000 (22:03 -0700)
commit7004632b28d8a31b16acc553a1fb31202767bd80
treed1d1581f2bfdb24fe2e3a2d1da1faeaeb84cb040
parent584f8e1ec56b45057b53e161233308f38e1c3b09
i965/skl: Fix the qpitch value

On Skylake the qpitch value is uploaded as part of the surface state
so we don't need to add the extra rows that are done for other
generations. However for 3D textures it needs to be aligned to the
tile height and for depth/stencil textures it needs to be a multiple
of 8. Unlike previous generations the qpitch is measured as a multiple
of the block size for compressed surfaces. When the horizontal mipmap
layout is used for 1D textures then the qpitch is measured in pixels
instead of rows.

v2: Align the depth/stencil textures to a multiple of 8
v3: Add an assert that ALL_SLICES_AT_EACH_LOD is not used. Ignore the
    vertical alignment when picking the qpitch for 1D_ARRAY textures.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_tex_layout.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h