Expand description
CompiledBytecode resources (type RTYPE, named shaders/bytecode/<guid>): a program’s compiled form as skate.’s
shader database holds it. A resource is a relocatable payload (its 16-byte metadata gives the payload size, then
the relocation size) that begins with a header and holds one DXBC container with a DXIL part (Shader Model 6), or
two (a raytracing pipeline’s, whose header names RPTR at offset 0x20 where the others name RC2S); more bytes
follow a container in most resources. The header’s fields are not interpreted here: the bytes before the first
container and after each container are kept as stored. A container is found by its magic and delimited by its own
size field; a magic that is not a container is an error, not skipped.
Structs§
- Span
- A container’s place in a payload: its offset and its size, as its own header states it.
Constants§
- RTYPE
- The resource type id of a CompiledBytecode resource.
- TAG_AT
- The offset of the four-byte tag (
RC2S,RPTR) a payload’s header carries.
Functions§
- containers
- Every container of
payload, in order. A container’s bytes are not searched for another; a magic outside a container that does not head one is an error naming its offset, and so is a payload with none. - tag
- The payload’s tag at
TAG_AT, if it has one.