meta: Support GenerateMipmaps on 1DArray textures.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 6 Mar 2014 09:56:53 +0000 (01:56 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 8 Mar 2014 06:45:25 +0000 (22:45 -0800)
commit14ca611258d8737cb79f9f5f2e0aaf58d80a1b1c
treeef219c80843cc95113f40f48a0090fa3e8be5f54
parent158a7440c37c27783e2968408c74c03858520ec2
meta: Support GenerateMipmaps on 1DArray textures.

I don't know how many people care about this case, but it's easy enough
to do, so we may as well.  The tricky part is that for some reason Mesa
stores the number of array slices in Height, not Depth.

I thought the easiest way to handle that here was to make Height = 1
(the actual height), and srcDepth = srcImage->Height.  This requires
some munging when calling _mesa_prepare_mipmap_level, so I created a
wrapper that sorts it out for us.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/common/meta_generate_mipmap.c