[Mesa-dev] [PATCH 11/41] intel: Kill intel_mipmap_level::nr_images [v2]

Eric Anholt eric at anholt.net
Fri Nov 18 16:02:11 PST 2011

On Fri, 18 Nov 2011 13:52:32 -0800, a at anholt.net wrote:
> From: Chad Versace <chad.versace at linux.intel.com>
> For all texture targets except GL_TEXTURE_CUBE_MAP, the 'nr_images' and
> 'depth' fields of intel_mipmap_level were identical.  In the exceptional
> case, nr_images == 6 and depth == 1.
> It is simple to determine if a texture is a cube or not, so the presence
> of two fields here was not helpful. Worse, it was confusing. When we
> eventually implement GL_ARB_texture_cube_map_array, this mess would have
> become even more confusing.
> This patch removes 'nr_images' and assigns to 'depth' a consistent
> meaning: depth is the number of 2D slices at each miplevel.  The exact
> semantics of depth varies according to the texture target:
>    - For GL_TEXTURE_CUBE_MAP, depth is 6.
>    - For GL_TEXTURE_2D_ARRAY, depth is the number of array slices. It is
>      identical for all miplevels in the texture.
>    - For GL_TEXTURE_3D, it is the texture's depth at each miplevel. Its
>      value, like width and height, varies with miplevel.
>    - For other texture types, depth is 1.
> As a consequence, parameters were removed from the following function
> signatures:
>     intel_miptree_set_level_info
>         Remove 'nr_images'.
>     i945_miptree_layout
>     brw_miptree_layout_texture
>     brw_miptree_layout_texture_array
>         Remove 'slices'.
> v2:
>    - Replace "It's" with "Its".
>    - Remove all hunks in intel_fbo.c. The hunks were spurious and sneaked
>      in during a rebase.
>    - Remove unneeded hunk in intel_tex_map_image_for_swrast(). It was
>      a little refactor of the for-loop's upper bound.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111118/3ced0282/attachment.pgp>

More information about the mesa-dev mailing list