mcpp index

compat.spirv-headers

#include

Khronos SPIR-V headers (spirv/unified1)

#include <spirv/unified1/spirv.hpp>
mcpp add compat.spirv-headers@1.4.357.0

Usage

From this repository's own test project — built and run by CI, not written for the website.

// Behavioral test -- verify compat.spirv-headers delivers the Khronos include
// layout and definitions a SPIR-V READER needs.
//
// The criterion is deliberately not "the header compiles". A header-only
// package that resolves and exposes the wrong include root compiles nothing
// and fails at the consumer, so this test spells the include the way a
// consumer spells it and then decodes a module built by hand, which is the
// only thing that can tell a real header tree from an empty one.
#include <spirv/unified1/spirv.hpp>

import std;

int main() {
    // A minimal, well-formed SPIR-V module header: magic, version, generator,
    // bound, schema. Written as words rather than read from a file so the test
    // depends on nothing but the package under test.
    const std::uint32_t module_words[] = {
        spv::MagicNumber,
        spv::Version,
        0u,   // generator
        1u,   // bound
        0u,   // schema
// …

tests/examples/spirv-headers/tests/decode.cpp · project tests/examples/spirv-headers

Build

targets
spirv-headers (lib)
language
c++23
C standard
c11
import std
no
include dirs
*/include

Sources (1)

  • mcpp_generated/spirv_headers_anchor.c

Generated files

  • mcpp_generated/spirv_headers_anchor.c

Versions

VersionPlatforms Mirrorssha256
1.4.357.0 latest LinuxWindowsmacOS CN GLOBAL 4d703067a7e0…