[graphite] Add TextureFormat unit tests

Fixed a bug in the colortype -> format lookup that wasn't taking
renderability into account. This is only an issue until
https://skia-review.git.corp.google.com/c/skia/+/1165836 lands, which
removes these in favor of a static lookup map.

Added many format rules in Mtl, Dawn, and VulkanCaps that were
inconsistently declared between the different backends even though they
all had a backend format matching the TextureFormat. Additionally, it
adds rules to make the BGRA vs RGBA ordering more relaxed, which is the
eventual set of matches that the TextureFormat unit tests lay out.

The color -> format rules are minimally done to get the unit tests
passing; formats are marked compatible with color types but I didn't
change how color types were mapped to formats.

Bug: b/390473370
Change-Id: I1851bedad6083e577fb8c0e9e096844582d86206
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1167440
Reviewed-by: Thomas Smith <thomsmit@google.com>
Reviewed-by: Nicolette Prevost <nicolettep@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
14 files changed