Skip to content
Snippets Groups Projects
Commit 4db891fb authored by Allan MacKinnon's avatar Allan MacKinnon Committed by CQ bot account: commit-bot@chromium.org
Browse files

[graphics][compute] Build HotSort targets with GN and add a test.

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
parent 49312719
No related branches found
No related tags found
Loading
Showing
with 1001 additions and 216 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment