[Mesa-dev] About the differences in struct intel_region and intel_mipmap_level

Kenneth Graunke kenneth at whitecape.org
Sat Jul 12 14:09:37 PDT 2014


On Saturday, July 12, 2014 09:06:44 AM Zhaotian Wang wrote:
> Hi guys,
> Recently I am working on a project, who uses mesa source code as its
> library. It went quite well with mesa 10.1.* and older version of mesa
> source code. However, it does not build successfully with the current mesa
> git master branch source code.
> It turns out that the project uses some struct that no long exists in the
> current mesa.
> 
> 1. In the older version of mesa source code. the struct intel_mipmap_tree
> has a member of struct intel_region, which records of the width and height
> and cpp and especially tiling mode of the region, however the struct
> intel_region does not exist in the new mesa source code. So where should I
> find those information of the mipmap_tree?

We just combined intel_mipmap_tree and intel_region.  So you can use:

mt->cpp
mt->tiling
mt->logical_width0, mt->logical_height0 are the width/height of the base level 
(LOD 0), without padding
mt->physical_width0, mt->physical_height0 include such padding.

> 2. In the older version of mesa source code, the struct intel_mipmap_level
> stores the width and height of the current level of the map. However, I
> cannot find the width and height of the intel_mipmap_level in the current
> mesa source code. So, I'd like to ask, where should I find those
> information?

Instead of mt->level[LOD].width, you can do:

minify(mt->logical_width0, LOD - mt->first_level)

> Sorry about asking such newbie questions, maybe I should spend some time
> looking deeply into the code to find the answers, but I think it is
> probably ok to ask you guys first.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140712/c238e94d/attachment.sig>


More information about the mesa-dev mailing list