Skip to content
Snippets Groups Projects
Forked from hexang-mirrors / Fuchsia OS
Loading
user avatar
Allan MacKinnon authored
Tracked by: SPN-8

Test: fx shell run fuchsia-pkg://fuchsia.com/hotsort_vk_bench#meta/hotsort_vk_bench.cmx"

- CL following 277184.

This CL replaces shell scripts with GN.

The GN build invokes the 'hotsort_gen' code generator and builds
architecture-specific shader "targets" (bundles of shaders and
algorithm configuration info) using a custom GN template.

The target outputs are placed in their respective $target_gen_dirs for
later inclusion of either a source set or its equivalent binary image.

The hotsort_target.gni template performs the following steps:

  1. Produce list of compute shaders that *will* be generated.
  2. Invoke hotsort_gen to generate compute shaders.
  3. Compile the shaders to SPIR-V modules with glslangValidator
  4. Invoke spirv-opt to optimize and shrink the SPIR-V modules.
  5. Invoke spirv-remap to improve compressibility of modules.
  6. Convert SPIR-V modules to array of C literals.
  7. Dump a binary image of the HotSort target bundle of modules.
  8. The GN template returns a source set of the target.

Steps to verify target outputs are being created:

  1. fx build graphics
  2. ls -R out/default/gen/src/graphics/lib/compute/hotsort/platforms/vk/tests/hotsort_vk_bench/

Change-Id: Ic98c374c70e4fda2c1d8d3284a8cbc46443eaffc
4db891fb
Name Last commit Last update