lima: introduce a struct describing texture descriptor
authorVasily Khoruzhick <anarsoul@gmail.com>
Wed, 7 Aug 2019 02:58:42 +0000 (19:58 -0700)
committerVasily Khoruzhick <anarsoul@gmail.com>
Fri, 9 Aug 2019 02:17:20 +0000 (19:17 -0700)
commit39a90749afaff91739d81634092385abdbf45413
tree52ba4d9bfaab5b0f4867890e34498c18ccdada10
parentedf008c04e4dfa7c8fdb03be09da731f05b77072
lima: introduce a struct describing texture descriptor

Use a struct with bitfields to construct texture descriptor
instead of poking bits in array of uint32_t. It improves code
readability and makes it easier to experiment with unknown fields.

Also fix mipmapping while we're at it - Utgard can have up to 13
levels, but 64 bytes is enough only for 10. Calculate descriptor
size dynamically to account extra levels if we need them.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/lima_draw.c
src/gallium/drivers/lima/lima_texture.c
src/gallium/drivers/lima/lima_texture.h