Specialize runtime storage image formats
Accept runtime storage surface formats and host feature facts by Metal texture index, specialize image types before interface creation, and reflect the exact explicit or formatless contract. Track runtime origins through arrays and image aliases so every read, write, imageblock write, emulated fetch, and atomic operation checks the required capability or refuses honestly.\n\nWire authored validation resources into the same product options, bump the reflection and candidate executor contracts, document consumer use, and cover type splitting, dependent loads, exact formatless capabilities, atomics, incompatibility, missing bindings, imageblock writes, and pixel-gather storage reads.\n\nVerified with workspace clippy -D warnings, warnings-denied all-features Rustdoc, serial product and validation suites, both packaged AIR reproductions plus spirv-val Vulkan 1.3, and release measurements under 0.5 seconds / 23 MiB RSS.
This commit is contained in:
1 parent
e76b90d6fd
commit
547a59d99b
24 files changed
+1321
-27
No files matched your search
@@ -230,6 +230,11 @@ pub(crate) fn materialize_texture_array_loads(ctx: &mut Ctx, entry_idx: usize) {
|
||||
}
|
||||
if image_type_is_storage(ctx, elem_image_ty) {
|
||||
ctx.image_storage.insert(handle);
|
||||
if let Some((metal_index, state)) =
|
||||
ctx.runtime_storage_image_values.get(&arrayvar).copied()
|
||||
{
|
||||
ctx.register_runtime_storage_image_value(handle, metal_index, Some(state));
|
||||
}
|
||||
}
|
||||
// The original load's pointer operand becomes dead; record its id for the sweep.
|
||||
if let Some(load) = defs.get(&handle) {
|
||||
@@ -290,6 +295,11 @@ pub(crate) fn materialize_texture_array_loads(ctx: &mut Ctx, entry_idx: usize) {
|
||||
}
|
||||
if image_type_is_storage(ctx, image_ty) {
|
||||
ctx.image_storage.insert(image);
|
||||
if let Some((metal_index, state)) =
|
||||
ctx.runtime_storage_image_values.get(&arrayvar).copied()
|
||||
{
|
||||
ctx.register_runtime_storage_image_value(image, metal_index, Some(state));
|
||||
}
|
||||
}
|
||||
placeholder_uses.insert((block_idx, inst_idx), (chain, load, image));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user