AGENT SKILL

Filament 项目清理与构建

filament-build-clean

清理并构建 Filament 构建目标,用于开发、调试和生产环境。当需要清理工作区或编译桌面目标时使用此技能。

License 许可
Apache-2.0
所属仓库
google/filament
最近更新
2026-11-14
Stars
★ 2.1w
Forks
2.3k

01 前言 Front Matter

name
filament-build-clean
description
Clean and build Filament targets for development, debugging, and production. Use this skill whenever you need to clean the workspace or compile desktop targets.

03 SKILL.md 正文

Filament Build & Clean Protocols

This skill defines standard procedures and command configurations for cleaning build artifacts and compiling Filament targets on desktop platforms.

1. Full Clean of All Builds

To completely reset the build environment and remove all compiled artifacts, caches, and generated files across all platforms:

./build.sh -C

2. Compiling Desktop Debug Build

For active development, local debugging, and interactive testing, compile the desktop target with debug symbols and no optimizations:

./build.sh -ip desktop debug

3. Compiling Desktop Release Build

For performance analysis, optimizations, profiling, and running local benchmarks on desktop systems, compile the release build:

./build.sh -ip desktop release

4. Incremental Builds with Ninja

For fast iteration you may invoke ninja directly against an existing build directory:

ninja -C out/cmake-debug <target>

Beware of the second build directory. Materials are not compiled by out/cmake-debug/tools/matc/matc. Every material rule in build.ninja invokes the split-build copy of the host tools at out/prebuilt-tools-release/tools/matc/matc. See build_tools_for_split_build in build.sh; note that SPLIT_BUILD_TYPE defaults to release, so this path is prebuilt-tools-release even for a debug build.

As a result, after changing anything that feeds shader generation — libs/filamat/, libs/filabridge/, shaders/, or third_party/spirv-cross/ — a plain ninja -C out/cmake-debug will rebuild and relink binaries while silently reusing stale .filamat files. This produces confusing runtime shader compilation errors in which freshly generated code is mixed with previously generated code.

Rebuild the host tools first:

ninja -C out/prebuilt-tools-release matc resgen
ninja -C out/cmake-debug <target>

./build.sh -ip desktop debug performs both steps automatically, so prefer it when in doubt.

04 同仓库更多 Skills

google
google/filament

Filament 数学运算与坐标变换

filament-math

确保 Filament 代码中数学原语和命名约定的正确性。在执行坐标变换、向量运算或投影设置时使用此技能。

软件开发工程师C++ 开发
★ 2.1w
google
google/filament

Filament 对象生命周期管理

filament-lifetime

确保 Filament 对象创建与销毁生命周期的正确性。在初始化渲染管线或分配/释放 GPU 缓冲区和实体(entity)时使用此技能。

软件开发工程师C++ 开发
★ 2.1w
google
google/filament

Git 提交 cherry-pick 与回填

cherry-pick

将某个提交 cherry-pick 到另一个分支并创建 PR。当用户要求将某个提交或 PR cherry-pick 或回填(backport)到发布分支时使用。

软件开发工程师代码仓库协作管理
★ 2.1w
google
google/filament

C++ 代码验证流程

verification-protocols

修改 C++ 源文件或头文件后需执行的标准验证流程。使用此技能格式化 include 语句、构建引擎并运行核心测试。

软件开发工程师C++ 开发
★ 2.1w
google
google/filament

C++ 预处理保护规范检查

preprocessor-guard-hygiene

在 C++ 中强制实施预处理保护(preprocessor guard)规则以及依赖宏的包含卫生规范。在修改条件导入或预处理指令时使用此技能。

软件开发工程师C++ 开发
★ 2.1w
google
google/filament

C++ 头文件自包含检查

header-self-containment

强制实施严格的头文件自包含规范,确保每个头文件都能独立编译。在创建或修改 C++ 头文件时使用此技能。

软件开发工程师C++ 开发
★ 2.1w