[Mesa-dev] [PATCH 05/16] i965: Add functions up/downsampling on miptrees (v2)

Chad Versace chad.versace at linux.intel.com
Mon Aug 6 14:43:52 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/06/2012 11:10 AM, Eric Anholt wrote:
> Chad Versace <chad.versace at linux.intel.com> writes:
> 
>> These functions do an up or downsample between mt and
>> mt->singlesample_mt.
>> 
>> Conceptually, these functions belong in intel_mipmap_tree.c. However,
>> they needs to interact with blorp, which is C++. So I created a new
>> file, brw_blorp_orphans.cpp, for these and other functions that fall into
>> the same category.
>> 
>> v2: - Add an upsample function. - Also up/downsample the stencil
>> miptree. - Assert that the miptree is "flat".
> 
> Couldn't we just make a brw_blorp_blit(brw, src_mt, dst_mt, ...) function
> in the brw_blorp_blit file.cpp, which do_blorp_blit could use, and then we
> wouldn't need to put this code in a weird file?

Sure, that's sensible. Then intel_miptree_downsample can call brw_blop_blit,
and we can move the its definition to intel_mipmap_tree.c.

I see two places where it is appropriate to declare brw_blorp_bit():
    1. In a new header, brw_blorp_blit.h.
    2. In brw_blorp.h. This is currently a C++ header. So, to make it cross
C/C++ header usable by intel_mipmap_tree.c, the C++ parts will need to guarded
by an #ifdef.

Do you have a preference?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQIDqXAAoJEAIvNt057x8i8a4P/0RJ5VuMuWO+aLiC9bfnbMHP
a3PxRYz0junUOrB4d+MjDVFwYKB08Oh37MHwNbOFmNrj1KR5LhBDLlJN5M4r71Dv
hG3LbWmiqiJQMg3FES3Bm5Uwzv/MRwp2lA6hOIagsrfkX33AmNqHfkqPGikkzR7A
7vbZy7WFOCd6VDmn90bEXiKyuLOf/LhQOARhKw+VxffrZYBXQrXhwjycFTvH0i7o
dm7TaB1sSym8WoZeux7EnHZqAJp094zBa8TDpGcKbei9ZhmYq/KdcuMvnuPndFgQ
XPPRxEge2uxcTo6fpav/u0ttVaOV/EoVG0Lbotn5nto5MN1Hcq/lYdUVWnVHdG7H
anWanGyg3ZayovxW39fP5fIsQD9+O66pnBjxjtZ/cjqA5VP24mY1q/brUa4sgnOQ
fwHgIXP4Wf/Z0mQQ5KQqImYgEV31ygwtrdC+KcqeNfBJNN6cg90lpQjNnTZct0Of
QTkKsTROVyV2jMYA8RXvHm8nhDlGTboHyrYmK71vL4TNUDKSNkGVFYmRY9C3Ueg6
52v132SxnA1BT22cHV7hEtb7mlaiqD4rZHRPZnZh1RubTtVsSgwsD0bxHzzUjH4c
pd1fveW6hH1NyVAa/f09MSHUCN22+MnH7wAIX95Ojndm8oCGZgYRhC22ZJqQq5AJ
GpxaUhlGhb29ltfN+eqF
=h2TJ
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list