runtime_package.h¶
Ludus Wiki · API overview · Browse API
File
Versioned runtime generation (
.lurgrt) layout for RG3 atomic activation. The offline tool writes every field in little-endian order; decoders read it field by field and never copy host struct bytes. The file carries the same numeric plan records as a compiled RG2 header, plus cooked stage artifacts and the CPU interface identity. It contains no source text that needs parsing.Layout: a header of HEADER_FIELD_COUNT uint32 values (magic, version, resource/pass/camera counts, uniform value/binding/block/field counts and the stage count) followed by the interface and generation identities; ResourceCount resource, CameraCount camera, PassCount pass, UniformBindingCount binding, UniformBlockCount block and UniformFieldCount field records; then StageCount stage records. A stage record holds STAGE_FIELD_COUNT uint32 values (role, target, input count, entry bytes, artifact bytes, block name count), its input pairs, its GLSL ES uniform block names (slot, byte count, zero-padded name), the entry name and the artifact bytes, with every byte string zero-padded to a four-byte boundary. Version 3 appends PassCount names, each a uint32 byte count and that many UTF-8 bytes zero-padded to four bytes. Names are nonempty, contain no zero, and have at most MAX_PASS_NAME_BYTES bytes. No trailing bytes are permitted. Version 2 has no name table. Version 4 adds ViewNumerator and ViewDenominator after each resource's six legacy fields; versions 2/3 are fixed. Version 8 inserts a storage count and that many four-word StorageBuffer records after stage records and before pass names. Version 6 has native-query ray stages. Version 5 appends one SceneData mask to each pass; older versions imply all scene data. Version 10 appends visibility color/depth resource indices to every pass. Version 7 admits additional raster shader-pair IDs and stage roles; record widths are unchanged. Version 9 appends RayProgram, Buffer0 and Buffer1 to each pass and admits Buffer resources. Older records imply callback zero with no persistent buffers. Version 11 appends BytesPerPixel to each resource for RenderSize-derived storage. Version 12 admits six forward support roles. Only those stage records insert a texture-name count after block names, then (texture slot, sampler slot, byte count, padded name) records. Non-GLSL targets carry zero texture names; older roles keep their existing stage record layout. Sampler slot ABSENT means no paired sampler. Version 13 appends AccumulationSamples to every pass. Older ray packages retain their implicit averaging; new packages require an authored Accumulate node. Version 14 appends float32 ToneMappingExposure to every pass. Older scene-ray packages retain Reinhard/sRGB conversion at unit exposure; new packages require an authored ToneMap. Version 15 appends SourceColor and admits the renderer-owned BilinearUpscale technique. Version 16 appends DenoisingQuality for OIDN RT HDR filtering before display conversion. Version 17 admits MetalFX Spatial roles without changing the version 16 record layout. Version 18 appends Traversal to every pass; earlier ray records require native queries. Version 19 admits authored custom compute traversal; the version 18 record layout is unchanged. Version 20 admits native ray-stage artifacts and explicit hardware invocation. Version 21 inserts RAY_WORKGROUP_DIMENSIONS uint32 values after the six fixed fields of each RayCompute/SceneRayCompute/PersistentRayCompute stage record. X/Y must be positive and Z must be one; targets of the same role must agree. Earlier compute stages imply 64x1x1. Version 22 admits RayTraversal::ComputeBvh in each pass's traversal word. Version 24 adds four clustered deferred support roles without changing record widths. Version 23 admits ClusteredForwardFragment in place of ForwardFragment; other forward stages then use the clustered material ABI. ForwardDepth carries its matching opaque depth-only fragment. It preserves the version 22 record widths. Version 25 appends one scene resource word after the storage records. Bit SCENE_RESOURCE_LTC_TABLE means the linked scene ray kernel reads the renderer's LTC table at LUDUS_GRAPH_LTC_TABLE_BINDING; SCENE_RESOURCE_FAILURE_SUMMARY that every ray kernel counts its failed pixels at LUDUS_GRAPH_FAILURE_BINDING; other bits must be zero. Earlier packages bind neither. Version 29 appends ToneMappingCurve to every pass and admits ToneMap exposure on clustered deferred ColorAndDepth raster passes, fused into their lighting resolve. Earlier nonzero exposures imply Reinhard. Version 33 inserts MAX_RAY_PROGRAMS uint32 capture warm-up counts after the scene resource word and before the pass-name table. Earlier packages imply zero counts and contain no warm-up table.