Translator: under the identity domains a texture-buffer storage slot is declared without a format
Under the identity domains no input names a storage slot's bound format. storage_format declared
a slot without a format only where shaderStorageImage{Read,Write}WithoutFormat grant its
accesses, or where the formats' own bits grant its read (reads_by_format_bits: the neutral
R32_SFLOAT and every read-write tier format's view carry STORAGE_READ_WITHOUT_FORMAT), and
refused anything else as Unsupported{IdentityDomains}, not implemented, with no symbol. Intel's
Windows driver 101.2145 on the UHD 630 lacks shaderStorageImageReadWithoutFormat and lists
neither WITHOUT_FORMAT bit in any format's buffer features (vulkaninfo there, jobs m3-max-82912
and m3-max-82917), so every function with an access::read_write texture buffer at a slot was
refused at the make: tb_word_formats for all 15 formats of
every_device_reads_and_writes_texture_buffers_of_formats_held_as_words (job m3-max-82853, pin Q
aed8b7eba3). The refusal is the own-view arm's declaration and took the words twin with it,
though that device holds every format with a word layout as words, which the twin reaches through
the R32ui words array and no formatless access.
A texture buffer's slot is now declared without a format wherever the profile reads and writes
storage so at all (texel_buffer_without_format: DeviceProfile::accesses_without_format, the
features, or Vulkan 1.3 or VK_KHR_format_feature_flags2, which enable the SPIR-V capabilities
StorageImageReadWithoutFormat and StorageImageWriteWithoutFormat). Vulkan asks the format's bits
of each view an access reaches (VUID-vkCmdDispatch-OpTypeImage-07029, -07030), and the runtime
already answers that per texture buffer at the draw or dispatch from the slot's interface
(declared_format false): an own view whose buffer features lack the access's bit is
Gap::StorageElement, a texture buffer held as words reads and writes true (texel_form). A nil
texture at the slot reads a null descriptor, which is no view: the floor's nullDescriptor
(runtime README, Floor, Features: `nullDescriptor`, VkPhysicalDeviceRobustness2FeaturesEXT; the
floor also requires Vulkan 1.3, its first line). Decided by the profile's Vulkan answers alone.
Images keep reads_by_format_bits; its texture buffer arm goes, as the new rule takes every
profile it took.
The refusal narrows from every state over such a function to the bindings the runtime README
already records: on a device whose buffer features lack STORAGE_READ_WITHOUT_FORMAT for a format
held as its own view, a read of that format's texture buffer through access::read_write at a
slot is refused at the draw or dispatch. The README's paragraph now says that the slot's
declaration is made on every device and the refusal is the dispatch's, per texture buffer, that
a nil texture there reads the floor's null descriptor, and that the UHD 630 reads and writes its
word formats through access::read_write; the refusal list's no-symbol item is now a storage
texture's alone, not a texture buffer's.
SEMANTICS_VERSION 2334 (development held 2333): a refusal becomes a module. No RUNTIME_VERSION
bump: a run of an unchanged artifact does nothing else. runtime-sources.sha256 is unchanged:
neither lower/texture/slot.rs nor cache/mod.rs is a runtime input (validation's build.rs list),
and the guard test passed at this tree (below). docs/REFUSALS.md does not move: storage_format
stays an IdentityDomains site (refusal_surface.py --check passed below).
Verified at 1db43f3bd8, a commit of this same tree (tree 569677eeac) on a try branch:
- red: the test before this one (849c883ab3), job m3-max-82957: refused as
"unsupported: IdentityDomains; needs NotImplemented", the UHD 630's text;
- Intel Iris Xe (RPL-P, Mesa 26.2.6), job m3-max-82971: the runtime's texture buffer tests
(--cfg m2v_gpu, filter test(texture_buffer)), 11 run, 11 passed; its word formats every answer
the CPU's, and B5G6R5Unorm, BGR5A1Unorm and BGR10A2Unorm (own views) refused read_write by name;
- Intel UHD 630 (Windows driver 101.2145, validation layer 1.4.363.0), job m3-max-82977 (the
win-cross build m3-max-82970): the runtime's whole suite, 984 run: 983 passed, 1 failed, 4 skipped;
every_device_reads_and_writes_texture_buffers_of_formats_held_as_words passed (it asserts the
words twin ran once per dispatch where the format is held as words, all 15 formats there), as
did one_path's the_scan_reads_the_translators_product_sources_alone and
the_product_sources_take_one_path_for_every_device. The one failure,
half_simd_reductions' every_device_sums_and_multiplies_half_simdgroups_as_metal, failed the
same way at pin Q (job m3-max-82853) and is outside this change;
- the Linux gate, job m3-max-82968: cargo fmt --check, signatures --check,
refusal_surface.py --check, clippy -D warnings (plain, --cfg m2v_gpu, --cfg m2v_cpu_icd) and
rustdoc all clean; the translator's and AIR suites 3457 run: 3456 passed, 1 failed, 22 skipped; the
runtime guard (the_runtime_sources_are_the_committed_ones) passed. The one failure is
golden_hashes_match_the_table, a bless due under 2334 (job m3-max-83023): exactly two cells
changed, both refusals that became modules on the runtime-floor profile,
engine/a8r_buffers.ll a8r_buffer_read_write and engine/tb_word_formats.ll tb_word_formats,
Unsupported{IdentityDomains; NotImplemented} to modules; the .air.ll rows need macOS's metal-as
and were not compared. The table is re-blessed on development.
This commit is contained in:
1 parent
aa51aeb7f4
commit
1ae0e3c302
2 files changed
+59
-29
No files matched your search
@@ -2431,19 +2431,30 @@ made, with no lock, and never rewritten for layouts.
|
||||
through `access::read_write` where they lack the read bit, is `Gap::StorageElement`
|
||||
(`VUID-vkCmdDispatch-OpTypeImage-07029`, `-07030`), whatever its format; so is, with no slot,
|
||||
one that may reach it beyond its slots after `use_resource` declared a write of it where they
|
||||
lack the write bit. A write through an argument buffer or a resource ID with no such
|
||||
declaration is outside documented Metal and is not refused: where they lack the write bit it
|
||||
writes the texture buffer's storage element without a format, outside Vulkan's valid usage
|
||||
lack the write bit. The slot's declaration without a format is made on every device, whatever
|
||||
its formats' buffer features: the floor's Vulkan 1.3 enables the SPIR-V capabilities
|
||||
`StorageImageReadWithoutFormat` and `StorageImageWriteWithoutFormat` whatever
|
||||
`shaderStorageImageReadWithoutFormat` answers, so a state over such a function is made, and the
|
||||
refusal is the draw's or dispatch's, per texture buffer it binds. A nil texture at the slot
|
||||
reads a texel-buffer element no object owns, a null descriptor (the floor's `nullDescriptor`),
|
||||
which is no view and asks no format's bit. A write through an argument buffer or a resource ID with no
|
||||
such declaration is outside documented Metal and is not refused: where they lack the write bit
|
||||
it writes the texture buffer's storage element without a format, outside Vulkan's valid usage
|
||||
(`VUID-vkCmdDispatch-OpTypeImage-07029`), as such a read is (`-07030`), and Vulkan does not
|
||||
define what it does. The UHD Graphics 630's Windows
|
||||
driver (101.2145) answers neither bit for any format: there it holds every format with a word
|
||||
layout as words, and a texture buffer of a format without one (those Vulkan requires as a
|
||||
storage texel buffer) that a function writes or reads through `access::read_write` is refused,
|
||||
but at a slot a texture atomic updates, and one it reads through `access::read` runs. A device
|
||||
that holds a format with a word layout as its own view, which takes the write bit, and lacks
|
||||
the read bit refuses a read of it through `access::read_write` alike. No further form is built
|
||||
for these; that changes on a second device above the floor whose formats lack those buffer
|
||||
features, or on a guest's walk that meets the refusal on any device.
|
||||
layout as words, which a function writes and reads through `access::read_write` at a slot
|
||||
through the words (the device test `texture_buffer_words`'
|
||||
`every_device_reads_and_writes_texture_buffers_of_formats_held_as_words`), and a texture buffer
|
||||
of a format without one (those Vulkan requires as a storage texel buffer) that a function writes
|
||||
or reads through `access::read_write` is refused at that draw or dispatch, but at a slot a
|
||||
texture atomic updates, and one it reads through `access::read` runs. On any device whose
|
||||
buffer features lack `VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT` for a format held as
|
||||
its own view, a read of a texture buffer of that format through `access::read_write` at a slot
|
||||
is refused at the draw or dispatch alike, a format with a word layout held so (which takes the
|
||||
write bit) among them. No further form is built for these; that changes on a second device
|
||||
above the floor whose formats lack those buffer features, or on a guest's walk that meets the
|
||||
refusal on any device.
|
||||
- ANV on an Intel Iris Xe Graphics (RPL-P) holds `BGRA8Unorm`, `B5G6R5Unorm`, `BGR5A1Unorm` and
|
||||
`BGR10A2Unorm` as their own views: their Vulkan formats' buffer features take a uniform texel
|
||||
buffer, a storage texel buffer and `VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT`, the
|
||||
@@ -4422,9 +4433,9 @@ cache is answered compile-required on both.
|
||||
test `tests::reflection_answers` reaches it with the translator's tile pipeline of
|
||||
`engine/k10ts_tile_grid`, which the identity domains refuse with that text, and compares the
|
||||
refusal's text across every make;
|
||||
- with no symbol, a storage texture access without a format that the device's
|
||||
`shaderStorageImageReadWithoutFormat` or `shaderStorageImageWriteWithoutFormat` does not take
|
||||
and the formats' own bits do not grant: no test yet;
|
||||
- with no symbol, a storage texture's access without a format, not a texture buffer's, that the
|
||||
device's `shaderStorageImageReadWithoutFormat` or `shaderStorageImageWriteWithoutFormat` does
|
||||
not take and the formats' own bits do not grant: no test yet;
|
||||
- a bicubic sample of a 1D texture ("a bicubic filter of a 1D texture"): the translator test
|
||||
`a_bicubic_kernel_reads_each_slots_format_treatment_from_its_pushed_field` asserts the text;
|
||||
- an argument buffer's texture of a type the identity arrays hold no element of (a texture
|
||||
|
||||
@@ -699,11 +699,13 @@ pub(super) fn stage_stores(cx: &SelectCx<'_>) -> Result<(), Error> {
|
||||
/// The format a storage slot is declared with and its class: the slot's `StorageImageChoice` from
|
||||
/// the lowering inputs, or, without one, a formatless `Identity` declaration where the device's
|
||||
/// `shaderStorageImage{Read,Write}WithoutFormat` grant its accesses without a format, or, under the
|
||||
/// identity domains, where the formats' own bits grant its read ([`reads_by_format_bits`]);
|
||||
/// otherwise the format is an input the caller must supply (`NeedsInput`). A choice whose view
|
||||
/// SPIR-V names no format for is declared without one wherever the profile accesses storage so at
|
||||
/// all, by the features or by the formats' own bits (`DeviceProfile::accesses_without_format`; the
|
||||
/// choice checked the view's bits).
|
||||
/// identity domains, a texture buffer's wherever the profile accesses storage so at all
|
||||
/// ([`texel_buffer_without_format`]) and another texture's where the formats' own bits grant its
|
||||
/// read ([`reads_by_format_bits`]); otherwise the format is an input the caller must supply
|
||||
/// (`NeedsInput`), and under the identity domains, which take no such input, a refusal. A choice
|
||||
/// whose view SPIR-V names no format for is declared without one wherever the profile accesses
|
||||
/// storage so at all, by the features or by the formats' own bits
|
||||
/// (`DeviceProfile::accesses_without_format`; the choice checked the view's bits).
|
||||
///
|
||||
/// A slot that is only queried accesses no texel, so it is declared `Unknown` with class
|
||||
/// `Identity` whatever the choice (queries need no format feature, and no format then pairs with
|
||||
@@ -752,11 +754,12 @@ fn storage_format(
|
||||
StorageImageClass::Identity,
|
||||
));
|
||||
}
|
||||
// Under the identity domains no input names the bound format: a read the formats' own
|
||||
// bits grant is declared without one, as a heap storage class's is; any other formatless
|
||||
// access the device does not take is not lowered yet.
|
||||
// Under the identity domains no input names the bound format: a texture buffer's access
|
||||
// the profile takes without a format at all ([`texel_buffer_without_format`]), and a read
|
||||
// the formats' own bits grant, as a heap storage class's is, are declared without one;
|
||||
// any other formatless access the device does not take is not lowered yet.
|
||||
if crate::lower::access::identity(cx.profile) {
|
||||
if reads_by_format_bits(cx, s, texel) {
|
||||
if texel_buffer_without_format(cx, s) || reads_by_format_bits(cx, s, texel) {
|
||||
return Ok((
|
||||
crate::spv::ImageFormat::Unknown,
|
||||
StorageImageClass::Identity,
|
||||
@@ -835,13 +838,33 @@ fn storage_format(
|
||||
Ok((format, choice.class))
|
||||
}
|
||||
|
||||
/// Whether texture-buffer storage slot `s`, which no input names the bound format of under the
|
||||
/// identity domains, is declared without a format: wherever the profile reads and writes storage
|
||||
/// so at all, as the slot does (`DeviceProfile::accesses_without_format`: the features, or Vulkan
|
||||
/// 1.3 or `VK_KHR_format_feature_flags2`, which enable the SPIR-V capabilities). Vulkan asks the
|
||||
/// format's bits of each view the access reaches (`VUID-vkCmdDispatch-OpTypeImage-07029`,
|
||||
/// `-07030`), and the binder answers per texture buffer at the draw or dispatch that binds it
|
||||
/// (the slot's interface states it formatless, `TextureSlot::declared_format`): one held as its own
|
||||
/// view whose format's buffer features lack the access's bit is refused there, and one held as
|
||||
/// words (`metal::format::texel_buffer_form`) is reached through the words' `R32ui` array, never
|
||||
/// through this declaration. A device whose formats' buffer features carry neither bit (Intel's
|
||||
/// Windows driver 101.2145 on the UHD Graphics 630) so runs such a slot over every texture buffer
|
||||
/// it holds as words.
|
||||
fn texel_buffer_without_format(cx: &SelectCx<'_>, s: &SlotPlan) -> bool {
|
||||
s.shape.is_some_and(|shape| shape.dim == ImageDim::Buffer)
|
||||
&& cx
|
||||
.profile
|
||||
.accesses_without_format(s.uses.read, s.uses.write)
|
||||
}
|
||||
|
||||
/// Whether storage slot `s` of texel class `texel`, which no input names the bound format of, is
|
||||
/// read without a format by the formats' own bits alone, as a heap storage class is
|
||||
/// (`DeviceProfile::storage_reads_by_format_bits`: ANV before Gfx12.5): the slot reads, the device
|
||||
/// writes without a format where the slot writes, and the class's neutral format, which an unbound
|
||||
/// slot reads, and the view of every read-write tier format the slot can hold, whose reads Metal
|
||||
/// defines, have the format's read bit (`bind::heap::tier_read_gaps`). A storage cube is the
|
||||
/// binder's 2D-array view.
|
||||
/// binder's 2D-array view. A texture buffer's slot is [`texel_buffer_without_format`]'s, which
|
||||
/// takes every profile this would.
|
||||
fn reads_by_format_bits(cx: &SelectCx<'_>, s: &SlotPlan, texel: TexelClass) -> bool {
|
||||
let profile = cx.profile;
|
||||
let Some(shape) = s.shape else {
|
||||
@@ -858,7 +881,7 @@ fn reads_by_format_bits(cx: &SelectCx<'_>, s: &SlotPlan, texel: TexelClass) -> b
|
||||
ImageDim::D2 => (SymDim::D2, shape.array),
|
||||
ImageDim::D3 => (SymDim::D3, false),
|
||||
ImageDim::Cube => (SymDim::D2, true),
|
||||
ImageDim::Buffer => (SymDim::Buffer, false),
|
||||
ImageDim::Buffer => return false,
|
||||
};
|
||||
let class = ImageHandleClass {
|
||||
dim,
|
||||
@@ -869,12 +892,8 @@ fn reads_by_format_bits(cx: &SelectCx<'_>, s: &SlotPlan, texel: TexelClass) -> b
|
||||
access: ImageAccess::Storage,
|
||||
format: StorageFormatClass::Unknown,
|
||||
};
|
||||
let usage = match shape.dim {
|
||||
ImageDim::Buffer => FormatUsage::StorageTexelBufferReadWithoutFormat,
|
||||
_ => FormatUsage::StorageImageReadWithoutFormat,
|
||||
};
|
||||
let neutral = crate::bind::neutral::storage_neutral(texel.sampled_type());
|
||||
profile.supports_format(neutral, usage)
|
||||
profile.supports_format(neutral, FormatUsage::StorageImageReadWithoutFormat)
|
||||
&& crate::bind::heap::tier_read_gaps(profile, &class).is_empty()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user