These paths extend the earlier checks. Their availability depends on the command, shader interface, format and host device. They do not establish complete NVN support.
WaitEvent records the event's GPU address, wait mode and comparison value. An unmet wait yields its queue's replay
job. Other queues can continue and signal the event. Replay retains its nested CALL position and resumes after the
condition succeeds, without repeating earlier draws or copies. Later work on the same queue stays behind the wait.
The supported conditions are EQUAL and GEQUAL_WRAP. GEQUAL_WRAP compares the signed 32-bit difference, so the comparison follows wraparound ordering. Event WRITE and ADD signals enter the renderer's ordered release stream. Replay submits work before the wait so that an earlier GPU operation can release the event. An event that no producer releases can leave its queue pending.
Submissions that contain event or sync waits copy their command records before replay. The snapshot flattens nested CALL/JUMP records in execution order. Resource addresses still refer to guest data read at execution time. A fence before a wait can therefore signal and permit command-memory reuse without changing the suspended commands. Submissions without waits retain the direct replay path.
Both recorded WaitSync and queue-side sync waits retain the syncpoint ID and value visible when submitted. Reusing
the guest sync object for another fence does not change that target. Replay checks the actual syncpoint before it
allows dependent work to continue. Present jobs also retain global display order across queues.
nvn_queue_lifetime checks queue order and retained replay state. gpu_park checks cooperative queue scheduling.
vulkan_nvn_events.inc checks a real GPU copy on a second queue before the waiting queue consumes the changed bytes.
ProgramSetSubroutineLinkage validates and copies each stage's linkage map. Its immutable handle retains the shader
location and map after the caller changes its memory or replaces the program. SetProgramSubroutines copies the
selected uniform values into the command record. Replay resolves function IDs and updates the corresponding compiler
constant table in bank 1. It validates the whole selection before any table write and groups adjacent changed entries.
Linkage maps must match the program's declared subroutine stages. The parser accepts at most one map per stage, checks all payload spans and limits each map to 16 MiB. Table entries must fit the stage's constant bank, up to 64 KiB. An update supports at most 16,384 values. Invalid maps fail installation. Invalid uniform selections produce no partial table update.
The translator supports relative constant-buffer CAL and absolute JCAL/JMP/JMX targets inside the translated shader. Calls retain a 32-entry return stack per invocation. A deeper call terminates that invocation. Absolute-flow shader keys include the program address, so code at different locations cannot reuse the wrong address base. Calls use the dispatch-loop path, which can cost more GPU work and compiler time than structured flow.
nvn_names checks map validation, recorded values and metadata lifetime. shader_direct_regressions checks indirect
flow instructions. vulkan_nvn_subroutines.inc changes a fragment subroutine through recorded linkage updates and
checks exact RGBA32F output for relative and absolute calls across cached pipeline reuse.
Copies keep the ordinary image or DMA path when it can preserve the required result. A compute memory-gather path also handles nearest conversion and X/Y/Z mirrors for volume slices. The CPU prepares coordinate tables. The GPU reads, converts and writes texels, with no CPU pixel conversion or texel readback.
The conversion path supports these color formats:
Missing source components use zero RGB and alpha one. RGBX/BGRX alpha uses one. Normalized conversion retains the
original rational value where possible. Half and packed-float outputs round once to nearest-even. sRGB transfer uses
shader floating-point operations. Its tests allow 1e-6 linear error and one encoded UNORM code value.
Two-dimensional copies can use bilinear filtering through the compute path when both format descriptors support it. Coordinates use texel centers and clamp to logical image bounds, excluding padded GOB columns. Volume filtering with linear filtering is invalid NVN input. Integer/compressed cross-format conversion and arbitrary depth/stencil format conversion also fall outside the copy contract. These combinations are not renderer feature gaps. Three-component RGB16F/RGB32F texture formats have no COPY2D conversion support. Non-renderable COPY2D formats, including RGBA4 and packed RGB16 formats, retain exact byte-preserving nearest transforms.
Same-format depth/stencil transforms use the host image blit when available. Otherwise the GPU copies each aspect to scratch memory, gathers the requested nearest texels and copies each aspect back. This supports D32FS8 mirrors and scaling without host blit support. It preserves depth and stencil independently. It does not add linear depth/stencil filtering or arbitrary conversion between depth/stencil formats, which are invalid copy requests.
vulkan_nvn_copy_conversions.inc checks volume UNORM and float conversion, packed nearest/bilinear transforms,
sRGB transfer, rendered depth/stencil transforms and untouched row padding. nvn_copy_formats checks frontend format
selection and rejects unsupported conversion rather than copying incompatible bytes.
TEX and TEX.B LC support the decoded automatic and bias forms. Their extra packed word precedes coordinates even
for a non-array texture: the low half retains the layer, and the unsigned high half gives minimum LOD in units of
1/256. Fragment sampling uses the native MinLod operand and requires shaderResourceMinLod. Other stages have no
implicit derivatives and clamp their explicit level instead. Unsupported LC encodings remain rejected rather than
being interpreted as another operand layout.
TXD and TXD.B retain explicit gradients for 1D, 2D, 3D, cube and supported array textures. Signed four-bit texel offsets are supported for 1D, 2D and 3D, with array layers outside the spatial offset. A 1D texture's emulated Y coordinate stays 0.5 and its Y derivatives and texel offset stay zero. Cube gradient sampling does not add an invalid cube texel-offset operand.
When the device advertises and enables VK_KHR_maintenance8 and shaderImageGatherExtended, a varying offset
becomes one native Offset sample, retaining the instruction's gradients, level, bias and depth-reference operands.
Signed nibble extraction supplies its texel offset; coordinates, array layers and descriptor indices retain their
original operands. Constant-buffer offsets remain
runtime data on this path, so reading them does not create a CPU-specialized shader variant. Pipeline feature keys
separate this lowering from devices that require the portable path. Literal and proven constant offsets can still
use one Grad|ConstOffset sample.
Without maintenance8, proven fixed constant-buffer words can specialize one ConstOffset sample; changed words
invalidate that variant. Other varying offsets select exact native samples across their finite domain: at most
16, 256 or 4,096 cases for one, two or three spatial dimensions. Known-bit proofs remove unreachable cases,
including when only the array layer varies. Explicit-level and gradient sampling execute one selected leaf.
Automatic and bias sampling execute the compatible constant-offset samples in uniform control flow, then select
the result, preserving implicit derivatives. Both paths apply offsets to the selected mip's texels rather than
shifting normalized coordinates based on level zero.
Portable selections have at most 16 successors and Phi inputs. They form a radix tree instead of one 4,096-input merge. Generated routing oracles check every full-domain selector and reduced domains, including signed extrema, descriptor routing and the selected result. Separate fragment/compute module fixtures check the maintenance8 sample and offset/layer operands. The largest portable domains still contain thousands of sample cases; driver compilation cost remains a limitation on devices without maintenance8. Module structure alone does not establish GPU output or compilation time for either path.
Made from docs/history/gpu-rendering-audit.md at 69237645142c. GPL-3.0-or-later.