Files
metal2vulkan/scripts/regen-spirv-grammar/items.txt
T
Anees Iqbal 0ce2f39b71 Translator: the resident core deleted; every device compiles the one form, and the tests run it
Every device now compiles the identity domains, the one form: a kernel's
buffer arguments are bound as storage buffers of set 0 where the device
binds them (DeviceProfile::binds_kernel_buffers) and are reached at their
device addresses elsewhere, as every other stage's are; vertex attributes
are fetched by fixed-function vertex input; textures and samplers are
elements of the identity arrays of set 1, named by their resource IDs.
What the one form does not lower is a typed refusal,
Unsupported{IdentityDomains, NotImplemented} with the IdentityCause the
previous commit names.

Deleted, with everything only they reached:
- the device policy (device/policy.rs) that chose the resident-table
  domains, and the resident root table, handle table and their facts;
- the heap raw reads (lower/sampler/heap_raw.rs, lower/texture/heap_raw.rs),
  sampler footprints, bind/texel_parts.rs and bind/status.rs;
- the lockstep orders' barrier tiers, which no order key adds now
  (OrderKey::of orders nothing).

Tests: 274 tests that only the resident-table policy compiled (development's
DevicePolicy::RESIDENT_TABLES, which only tests built) are deleted, among
them 15 whole files (argument tables, cross-class, device replay, dynamic
roots, two extended-range files, image shapes, mesh barriers, profile F,
separate samplers, sparse unmapped, tile, wide, sweep and the footprint
tests); each deletion's reason is listed with the READY. The others are
ported to what the one form compiles and names today: census names,
push fields, refusals with their causes, and run values. A new interpreter
harness (tests/identity_harness.rs) binds a dispatch's buffers at device
addresses and its textures as identity-array elements. Census naming is
unchanged. The validation tests that read compiled modules (coverage,
companions, the authored compile census, specialization) assert the one
form's present strings. The extended-range levels and volume tests, whose
mip filters development built under the resident tables, become two tests
of the one form's answer, which is development's default policy's: a 2D or
3D sample of an extended-range slot texture is refused, TextureState
(lower::texture::identity_class holds no class for it); a padded form's 3D
sample stays the lowering's NotImplemented(Format). Development's new
thread-local test binds through the one form's harness, and its
handle-web test (every_handle_web_an_instruction_observes_is_refused)
compiles on the default profile.

SEMANTICS_VERSION 2355 and ARTIFACT_FORMAT_VERSION 607 (cached
translations and artifacts change). docs/REFUSALS.md is regenerated and
runtime-sources.sha256 is pinned at this tree.

Verified at the stack's tip, which differs from this commit only by the
five commits after it; the jobs and their results are named in the READY.
2026-12-03 09:15:33 -08:00

138 lines
8.3 KiB
Plaintext

# The SPIR-V grammar items the translator names: generate.py emits these into
# crates/metal2vulkan/src/spv.rs and nothing else. A value the code names that is missing here
# fails to build; a value listed here that nothing uses is dead code, which rustc reports where it
# can see it (not for a type the crate's public impls reach, such as `Op` through `BuildError`).
# Values only test code names go in test-values, so the library build has none of them.
#
# type Word | const MAGIC_NUMBER the word type; the module header's first word
# enum <Kind> [test] an operand kind of the core grammar by its grammar name (a
# mask for a BitEnum kind), `Op` for the core instructions or
# `GlslStd450Op` for GLSL.std.450's; `test`: in test builds only
# from_u32 [test] the kind's word-to-value conversion (it needs every value)
# values <Name>... | * values every build has, by their Rust names (generate.py's
# variant_name and const_name); `*`: all not named yet
# test-values <Name>... | * values only test builds have
type Word test
const MAGIC_NUMBER
enum Op
from_u32 test
values Nop Undef Extension ExtInstImport ExtInst MemoryModel EntryPoint ExecutionMode Capability
values TypeVoid TypeBool TypeInt TypeFloat TypeVector TypeMatrix TypeImage TypeSampler
values TypeSampledImage TypeArray TypeRuntimeArray TypeStruct TypePointer TypeFunction ConstantTrue
values ConstantFalse Constant ConstantComposite ConstantNull SpecConstantTrue SpecConstantFalse
values SpecConstant SpecConstantComposite SpecConstantOperation Function FunctionParameter FunctionEnd
values FunctionCall Variable ImageTexelPointer Load Store AccessChain ArrayLength Decorate
values MemberDecorate VectorExtractDynamic VectorInsertDynamic VectorShuffle CompositeConstruct
values CompositeExtract CompositeInsert CopyObject SampledImage ImageSampleImplicitLod
values ImageSampleExplicitLod ImageSampleDrefImplicitLod ImageSampleDrefExplicitLod
values ImageSampleProjImplicitLod ImageSampleProjExplicitLod ImageSampleProjDrefImplicitLod
values ImageSampleProjDrefExplicitLod ImageFetch ImageGather ImageDrefGather ImageRead ImageWrite
values Image ImageQuerySizeLod ImageQuerySize ImageQueryLod ImageQueryLevels ImageQuerySamples
values ConvertFToU ConvertFToS ConvertSToF ConvertUToF UConvert SConvert FConvert QuantizeToF16
values ConvertUToPtr Bitcast SNegate FNegate IAdd FAdd ISub FSub IMul FMul UDiv SDiv FDiv UMod SRem
values SMod FRem VectorTimesScalar Dot IAddCarry ISubBorrow UMulExtended SMulExtended Any All IsNan
values IsInf LogicalEqual LogicalNotEqual LogicalOr LogicalAnd LogicalNot Select IEqual INotEqual
values UGreaterThan SGreaterThan UGreaterThanEqual SGreaterThanEqual ULessThan SLessThan
values ULessThanEqual SLessThanEqual FOrdEqual FUnordEqual FOrdNotEqual FUnordNotEqual FOrdLessThan
values FUnordLessThan FOrdGreaterThan FUnordGreaterThan FOrdLessThanEqual FUnordLessThanEqual
values FOrdGreaterThanEqual FUnordGreaterThanEqual ShiftRightLogical ShiftRightArithmetic
values ShiftLeftLogical BitwiseOr BitwiseXor BitwiseAnd Not BitFieldInsert BitFieldSExtract
values BitFieldUExtract BitReverse BitCount DPdx DPdy Fwidth DPdxFine DPdyFine FwidthFine
values ControlBarrier MemoryBarrier AtomicLoad AtomicStore AtomicExchange AtomicCompareExchange
values AtomicIAdd AtomicISub AtomicSMin AtomicUMin AtomicSMax AtomicUMax AtomicAnd AtomicOr
values AtomicXor Phi LoopMerge SelectionMerge Label Branch BranchConditional Switch Kill Return
values ReturnValue Unreachable ImageSparseSampleImplicitLod ImageSparseSampleExplicitLod
values ImageSparseSampleDrefImplicitLod ImageSparseSampleDrefExplicitLod ImageSparseFetch
values ImageSparseGather ImageSparseDrefGather ImageSparseTexelsResident ImageSparseRead
values GroupNonUniformElect GroupNonUniformAll GroupNonUniformAny GroupNonUniformBroadcastFirst
values GroupNonUniformBallot GroupNonUniformBallotBitExtract GroupNonUniformShuffle
values GroupNonUniformShuffleXor GroupNonUniformIAdd GroupNonUniformFAdd GroupNonUniformIMul
values GroupNonUniformFMul GroupNonUniformSMin GroupNonUniformUMin GroupNonUniformFMin
values GroupNonUniformSMax GroupNonUniformUMax GroupNonUniformFMax GroupNonUniformBitwiseAnd
values GroupNonUniformBitwiseOr GroupNonUniformBitwiseXor GroupNonUniformLogicalAnd
values GroupNonUniformLogicalOr GroupNonUniformLogicalXor GroupNonUniformQuadBroadcast
values GroupNonUniformQuadSwap GroupNonUniformQuadAllKHR GroupNonUniformQuadAnyKHR TerminateInvocation
values FmaKHR TypeRayQueryKHR RayQueryInitializeKHR
values RayQueryConfirmIntersectionKHR RayQueryProceedKHR RayQueryGetIntersectionTypeKHR
values EmitMeshTasksEXT SetMeshOutputsEXT TypeAccelerationStructureKHR BeginInvocationInterlockEXT
values EndInvocationInterlockEXT DemoteToHelperInvocation IsHelperInvocationEXT
values RayQueryGetIntersectionTKHR RayQueryGetIntersectionInstanceCustomIndexKHR
values RayQueryGetIntersectionInstanceIdKHR
values RayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR
values RayQueryGetIntersectionGeometryIndexKHR RayQueryGetIntersectionPrimitiveIndexKHR
values RayQueryGetIntersectionBarycentricsKHR RayQueryGetIntersectionFrontFaceKHR
values RayQueryGetIntersectionObjectToWorldKHR RayQueryGetIntersectionWorldToObjectKHR
values AtomicFAddEXT ExecutionModeId DecorationGroup
test-values *
enum Capability
from_u32
values *
enum ExecutionModel
from_u32 test
values Vertex TessellationControl TessellationEvaluation Fragment GLCompute TaskEXT MeshEXT
test-values *
enum AddressingModel
values Logical PhysicalStorageBuffer64
enum MemoryModel
values GLSL450 Vulkan
enum ExecutionMode
values SpacingEqual SpacingFractionalEven SpacingFractionalOdd VertexOrderCw VertexOrderCcw
values OriginUpperLeft EarlyFragmentTests DepthReplacing DepthGreater DepthLess LocalSize Triangles
values Quads OutputVertices OutputPoints SubgroupUniformControlFlowKHR SignedZeroInfNanPreserve
values StencilRefReplacingEXT RequireFullQuadsKHR OutputLinesEXT OutputPrimitivesEXT
values DerivativeGroupLinearKHR OutputTrianglesEXT PixelInterlockOrderedEXT
values MaximallyReconvergesKHR DenormPreserve RoundingModeRTE
test-values ContractionOff FPFastMathDefault LocalSizeId
enum StorageClass
values UniformConstant Input Uniform Output Workgroup Private Function PushConstant Image
values StorageBuffer PhysicalStorageBuffer TaskPayloadWorkgroupEXT
enum Dim
values D1 D2 D3 Cube Buffer SubpassData
enum ImageFormat
values *
enum Decoration
values SpecId Block ColMajor ArrayStride MatrixStride BuiltIn NoPerspective Flat Patch Centroid
values Sample Invariant Aliased Volatile Coherent NonWritable Location Component Index Binding
values DescriptorSet Offset NoContraction PerPrimitiveEXT NonUniform
values AliasedPointer
test-values FPFastMathMode
enum BuiltIn
values Position PointSize ClipDistance PrimitiveId Layer ViewportIndex TessLevelOuter
values TessLevelInner TessCoord FragCoord PointCoord FrontFacing SampleId SampleMask FragDepth
values HelperInvocation NumWorkgroups WorkgroupSize WorkgroupId LocalInvocationId
values GlobalInvocationId LocalInvocationIndex SubgroupSize SubgroupId SubgroupLocalInvocationId
values VertexIndex InstanceIndex BaseVertex BaseInstance ViewIndex FragStencilRefEXT BaryCoordKHR
values BaryCoordNoPerspKHR PrimitivePointIndicesEXT PrimitiveLineIndicesEXT
values PrimitiveTriangleIndicesEXT CullPrimitiveEXT CullDistance SamplePosition NumSubgroups
values DrawIndex InvocationId PatchVertices
test-values WorkDim
enum Scope
values Device Workgroup Subgroup Invocation
enum GroupOperation
values Reduce InclusiveScan ExclusiveScan ClusteredReduce
enum FPFastMathMode test
values NOT_NAN NOT_INF NSZ ALLOW_RECIP ALLOW_REASSOC ALLOW_CONTRACT
enum GlslStd450Op
values Round RoundEven Trunc FAbs SAbs FSign SSign Floor Ceil Fract Radians Degrees Sin Cos Tan
values Asin Acos Atan Sinh Cosh Tanh Asinh Acosh Atanh Atan2 Pow Exp Log Exp2 Log2 Sqrt InverseSqrt
values Determinant MatrixInverse ModfStruct FMin UMin SMin FMax UMax SMax FClamp UClamp SClamp FMix
values Step SmoothStep Fma FrexpStruct Ldexp PackSnorm4x8 PackUnorm4x8 PackSnorm2x16 PackUnorm2x16
values PackHalf2x16 UnpackSnorm2x16 UnpackUnorm2x16 UnpackHalf2x16 UnpackSnorm4x8 UnpackUnorm4x8
values Length Distance Cross Normalize FaceForward Reflect Refract FindILsb FindSMsb FindUMsb
values InterpolateAtCentroid InterpolateAtSample InterpolateAtOffset NMin NMax NClamp