memoryformat: Add gdk_memory_format_get_depth()
authorBenjamin Otte <otte@redhat.com>
Thu, 15 Jun 2023 18:02:46 +0000 (20:02 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 18 Jun 2023 12:26:18 +0000 (14:26 +0200)
commit9015ed1c43f2ac19584e4e641ebe3c1bcde0281e
treee6124facedc6b7ff1138e0fe7833551aa8090786
parent1a6d60b7d7dc41a663e77dabe32a67f6ebb39e5f
memoryformat: Add gdk_memory_format_get_depth()

Replace gdk_memory_format_prefers_high_depth with the more generic
gdk_memory_format_get_depth() that returns the depth of the individual
channels.

Also make the GL renderer use that to pick the generic F16 format
instead of immediately going for F32 when uploading textures.
gdk/gdkmemoryformat.c
gdk/gdkmemoryformatprivate.h
gsk/gl/gskglcommandqueue.c
gsk/gskrendernodeimpl.c