meta: Support GenerateMipmaps on 1DArray textures

Graphics / Mesa 3D Graphics Library / Mesa - Kenneth Graunke [whitecape.org] - 8 March 2014 00:45 EST

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.

14ca611 meta: Support GenerateMipmaps on 1DArray textures.
src/mesa/drivers/common/meta_generate_mipmap.c | 42 +++++++++++++++++++-----
1 file changed, 33 insertions(+), 9 deletions(-)

Upstream: cgit.freedesktop.org


  • Share