flutter_gpu_shaders 0.5.1
flutter_gpu_shaders: ^0.5.1 copied to clipboard
Build tools for Flutter GPU shader bundles/libraries.
0.5.1 #
- Added a
glesLanguageVersionoption tobuildShaderBundleJson(andshaderBundleImpellercArguments), forwarded toimpellercas--gles-language-version. Setting300emits#version 300 esOpenGL ES shaders, where explicit-LOD sampling and derivatives are core rather than extension-gated. findImpellerCnow also probes thelinux-arm64andwindows-arm64engine artifact directories; the previous x64-only list failed on Linux arm64 hosts.
0.5.0 #
- Fixed dependency tracking that made the build hook re-run on every build.
Manifest
fileentries are now resolved against the package root (matching howimpellercresolves them) instead of the manifest's directory, which had produced doubled, non-existent paths for manifests in a subdirectory. - Generated shader sources written under the package's
build/directory are no longer declared as build dependencies; depending on a regenerated output made the hook perpetually out of date. Declare the real sources that produce them instead. - Breaking:
collectShaderBundleDependenciesnow requires apackageRootargument (used to resolve manifestfilepaths). Most consumers usebuildShaderBundleJson, whose signature is unchanged.
0.4.5 #
- Added optional Dart DataAssets registration for shader bundles via
ShaderBundleAssetMode. The default remains legacy file output underbuild/shaderbundles/, whiledataAssetsIfAvailableregisters the generated.shaderbundlewith the Flutter asset bundle when supported and falls back otherwise. buildShaderBundleJsonnow returnsShaderBundleBuildResult, including the legacy asset key and DataAsset/Flutter asset keys when a DataAsset is emitted.
0.4.4 #
buildShaderBundleJsonnow consumesimpellercdepfiles when the resolved compiler advertises--depfilesupport. This lets newer Flutter SDKs track transitive shader#includedependencies while preserving the existing manifest dependency scan for olderimpellercbuilds that do not support the flag or do not emit a depfile in--shader-bundlemode.buildShaderBundleJsonaccepts anincludeDirectoriesparameter: extra directories appended toimpellerc's#includesearch path, after the manifest directory and the bundledshader_lib. This lets a build hook compile shaders that#includereusable GLSL shipped by another package, by resolving that package's shader directory and passing it through. Files resolved this way are not auto-declared as build dependencies; declare them via the build output if edits to them should retrigger the build.- New
shaderBundleImpellercArguments(...)helper returns the exactimpellercargument list, exposed for inspection from custom build hooks and tests.
0.4.3 #
buildShaderBundleJsonnow declares the manifest and every shader source file it references as build-hook dependencies. The build system reruns the hook (andimpellerc) whenever any of those inputs change, so editing a.fragno longer requires a manual clean. Transitive#includes aren't tracked yet becauseimpellerc's--depfileswitch is a no-op when--shader-bundleis in use; this is a known limitation pending an upstream fix.- New
collectShaderBundleDependencies(manifestUri, decodedManifest)helper returns the dependency set for inspection from custom build hooks and tests.
0.1.0 #
- Add
buildShaderBundleJsonbuild hook utility. - Document usage instructions in the readme.
0.1.1 #
- Fix working directory for impellerc invocation.
0.1.2 #
- Fix SDK path resolution for puro users.
0.1.3 #
- Relax native_assets_cli dependency pin.
0.1.4 #
- Pin native_assets_cli to <0.9.0. (https://github.com/bdero/flutter_gpu_shaders/issues/3)
0.2.0 #
- Update to native_assets_cli 0.9.0.
Breaking:
BuildOutputis nowBuildOutputBuilder
0.2.1 #
- Bump native_assets_cli to 0.10.0.
0.3.0 #
- Update to native_assets_cli to 0.13.0.
(https://github.com/bdero/flutter_gpu_shaders/issues/6)
Breaking:
BuildConfigis nowBuildInput
0.4.0 #
- Migrate from
native_assets_cli(discontinued) tohooks1.0. Build hook authors must nowimport 'package:hooks/hooks.dart';instead ofpackage:native_assets_cli/native_assets_cli.dart. - Bump SDK constraint to
^3.7.0(matcheshooks1.0 requirements).
0.4.2 #
findImpellerCnow also honors a runtimeIMPELLERCenvironment variable in addition to the compile-time define. flutter_tools populates this for build hook subprocesses (https://github.com/flutter/flutter/pull/186300), including the--local-enginecase where the locally builtimpellercshould be used in preference to the SDK cache. Compile-time define takes precedence; runtime env var is checked next; otherwise the existing SDK cache lookup runs.
0.4.1 #
- Documentation: update
README.mdandbuildShaderBundleJsondartdoc to reflect the 0.4.0 migration (drop the obsoleteflutter config --enable-native-assetsstep, swap the import, and renamebuildConfig:→buildInput:to match the parameter name introduced in 0.3.0). No code changes.