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

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

// 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 · 專案 tests/examples/spirv-headers

建置

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

原始檔 (1)

  • mcpp_generated/spirv_headers_anchor.c

產生的檔案

  • mcpp_generated/spirv_headers_anchor.c

版本

版本平台 鏡像sha256
1.4.357.0 最新 LinuxWindowsmacOS CN GLOBAL 4d703067a7e0…