A texture made for shader writes in a format the device does not store (the 8-bit sRGB formats on
every committed Vulkan profile), written through a view of a listed format the device does store
(its unorm sibling), was Gap::StorageElement, case Absent: the image never had the storage usage,
so the view had no storage element. Metal writes it.
The texture's image now takes the storage usage for those views, with
VK_IMAGE_CREATE_EXTENDED_USAGE_BIT (Vulkan 1.1: a usage "supported for at least one of the formats
a VkImageView created from the image can have"), where the device's image format query makes that
image. The decision is the image's, at its creation, from the existing queries alone:
- plan() plans the texture extended where its usage has shader write, it is not multisampled, its
own format does not store and a format it lists for its views does (view_formats now says so);
it keeps the extended plan only where the query made it with exactly the plain plan's usage plus
the storage usage and the same resolves, attachment reads and cube flag (Plan::keeps), else it
makes the plain plan, as before;
- in place over a buffer (check_over), the linear image is extended where the linear query makes
it and each listed format's linear tiling holds what storage keeps of its optimal tiling; where
the plain linear image holds but the extended one does not, the texture stays in place, plain,
and no copy is made for it. The counted copy form, where a texture over a buffer already took
it, takes the plan the optimal query took;
- an extended image is at home in the general layout (a storage view's), and its own format's
views take the usage that format holds (VkImageViewUsageCreateInfo,
VUID-VkImageViewCreateInfo-usage-02275), so the texture's own sRGB views carry no storage usage;
- a surface plane's image keeps the surface's own rule and is never extended.
What the storage usage costs these images, where the query can say: nothing. Plan::keeps takes the
extended image only where the query keeps every other usage, flag and sample count, so no usage is
ever dropped for it; the test prints each device's image usage. What the query cannot say
(compression or a slower layout for the general home on a given driver) is unaudited.
Where the device does not make the texture extended (optimal query plainly, or in place where the
linear query refuses the extended image and the plain one holds), the texture is made as before and
the dispatch is still Gap::StorageElement, now with the new case StorageElementCase::Unextended in
place of Absent: the view's format is one the device stores and the image lists it, so the gap is
the image's missing extension, not the format's storage. A consumer log then tells "the device
made no extended image" from "the format has no storage on this device". Absent stays for the
texture's own views and for views of formats the device does not store; a surface plane's view is
never Unextended (its image is made by the surface's rule).
The test every_device_writes_an_srgb_texture_through_its_unorm_view now names
StorageElementCase::Unextended in its refused arm. docs/REFUSALS.md (the sites' function renamed
plan -> planned) and the API signatures table (the new variant) regenerated; the runtime README's
view-format and storage-element entries describe the rule.