RUNTIME 2342, SEMANTICS 2122: Texture buffers read through argument buffers sit in texel-buffer heap classes
A pipeline whose argument buffers hold texture buffers was refused with ArgumentBufferTextures (NotImplemented, no location): the translator's heap layout (lower/texture/slot.rs declare_heap) had no set-1 class for a texture_buffer member, so SPIRV-Cross-shaped tier-2 argument buffers (descriptor sets as [[buffer(n)]] structs with texture_buffer, texture2d and sampler members) could not be made, on any device. - Set 1 gains texel-buffer heap classes: UNIFORM_TEXEL_BUFFER for read, formatless STORAGE_TEXEL_BUFFER for read_write and write. The class follows the facts' texture type. - DescriptorCaps gains update_after_bind_uniform_texel_buffer and update_after_bind_storage_texel_buffer; where a device lacks them a typed needs_any_of names the missing features. Non-uniform texel-buffer indexing and the without-format read/write needs are checked as for images; link counts STORAGE_TEXEL_BUFFER with the images against the update-after-bind limits. - New public bind::heap::HeapElement::TexelBuffer(vk::Format). - The runtime writes each live texture buffer's texel view at its resource ID, with a neutral texel view at element 0; a gone texture buffer's Texels stay alive until its tickets clear. A texture buffer whose bytes cannot be viewed in place (staged, tail-viewed, offset off minTexelBufferOffsetAlignment, past maxTexelBufferElements, swizzled, or a non-direct format) reads the neutral and is announced through the existing UnnamedTextureUnviewable. No new Degradation kind. - docs/REFUSALS.md and api_signatures.tsv regenerated. Test: runtime_lane::argument_texel_buffers::a_texture_buffer_in_an_argument_buffer_is_read_in_both_stages (an owned fixture in SPIRV-Cross's shape): vertex and fragment read a texture_buffer member of a set-0 argument buffer, the fragment also samples a set-1 texture2d through the sampler beside it; every pixel must equal texel[1] + texel[4]*tint + albedo. Verified: lavapipe with the validation layer, m3-max-31658 at 6626eeaff3: pass. Control m3-max-31636 (the fixture and test at the base, without the fix): fails with exactly the ArgumentBufferTextures NotImplemented refusal.
This commit is contained in:
1 parent
f90b069111
commit
ec0be064d0
25 files changed
+1807
-60
No files matched your search
+14
-3
@@ -1377,7 +1377,14 @@ for dependency in &pipeline.dependencies {
|
||||
there.
|
||||
- The layout numbers set 0 densely, in `ResourceSlot` order. Set 1 holds the heap arrays (the
|
||||
resources reached through argument buffers and resource IDs); `pipeline::heap_sampler_capacity`
|
||||
is the most elements a set-1 sampler array has on a profile. Push constants carry the values the
|
||||
is the most elements a set-1 sampler array has on a profile. A texture buffer reached so is an
|
||||
element of a texel-buffer class: a uniform texel buffer array where the function only reads it,
|
||||
a storage texel buffer array declared without a format where it writes it, each needing the
|
||||
texel buffer kind's non-uniform indexing and update-after-bind features (a storage one also
|
||||
`shaderStorageImage{Read,Write}WithoutFormat`). `bind::heap_element` answers
|
||||
`HeapElement::TexelBuffer` for a texture buffer such a class holds, the format of its texel
|
||||
buffer view; a planned heap's members are textures with images, so only a heap set the consumer
|
||||
keeps for every command (each live texture at its resource ID) holds texture buffers. Push constants carry the values the
|
||||
binder writes per command. A stage that writes the command buffer's `ExecutionStatus` (an absent
|
||||
argument's read, a `seq_cst` fence, an argument buffer's cubic sampler) reaches it by device
|
||||
address, a push hole, where the device addresses buffers (`bufferDeviceAddress` and
|
||||
@@ -3218,8 +3225,12 @@ bound.
|
||||
texture that a heap array's class fits, but whose format the array cannot view (one the device
|
||||
cannot sample, or store without a format, or one whose raw texels need its function's decode): the
|
||||
device's heap set holds the class's neutral at its ID, which a command that names the texture
|
||||
refuses instead. Cost: a function reading the texture through its ID, in a command that does not
|
||||
name it (bind it, or make it resident), reads the neutral texture where Metal's reads the texture.
|
||||
refuses instead. A texture buffer that a texel-buffer class fits but no texel view of its bytes in
|
||||
place reaches (one viewed through a staging buffer or its tail, at an offset off
|
||||
`minTexelBufferOffsetAlignment`, or of more texels than `maxTexelBufferElements`), or whose
|
||||
swizzle or format a texel view cannot present, is the class's neutral there too, named or not.
|
||||
Cost: a function reading the texture through its ID, in a command that does not name it (bind
|
||||
it, or make it resident), reads the neutral texture where Metal's reads the texture.
|
||||
- `metal2vulkan-degrade-unnamed-shadowed-texture` (precision). `UnnamedShadowedTexture`: A shadowed
|
||||
texture in the device's heap set. Cost: a function reading the texture through its ID, in a
|
||||
command that does not name it, reads the texels an encoder that named it last copied in (undefined
|
||||
|
||||
Reference in new issue
Block a user