commit | ef2bc0aa0436956c872aa1d03a4af913b0cad530 | [log] [tgz] |
---|---|---|
author | David Neto <dneto@google.com> | Mon Nov 12 13:52:31 2018 +0000 |
committer | David Neto <dneto@google.com> | Tue Nov 13 17:12:49 2018 -0500 |
tree | 1e8c3a23de70429b84a8ccd4b47912b3de1bca72 | |
parent | 70d430c0fb3dd7832265815cde48866fada1eb3b [diff] |
Add stub engine for Dawn native Basic methods always succeed, even though most of them do nothing. It does create a Dawn device, proving that we can link to the Dawn native library. Fix the method for finding Dawn. The dawn_native library has a link dependency to the dawn (core) library. So we have to find and configure that too.
Amber is a multi-API shader test framework.
Amber lets you capture and communicate shader bugs with the fluidity and ease of a scripting flow:
Amber is influenced by [Talvos][Talvos] and [VkRunner][VkRunner]. The VkScript syntax matches the format used by VkRunner.
This is not an officially supported Google product.
git clone git@github.com:google/amber cd amber ./tools/git-sync-deps mkdir -p out/Debug cd out/Debug cmake -GNinja ../.. ninja
Amber is designed to run against different graphics APIs. Amber will build if no graphics API is found, but will only allow verifying the syntax of the amber script files.
Currently the Vulkan and Dawn graphics APIs are supported.
A Vulkan implementation is found by CMake in the following priority order:
First: If an enclosing CMake project includes the [Vulkan-Headers][Vulkan-Headers] CMake project, then headers will be picked up from there.
In this case the CMake variable Vulkan_LIBRARIES
can name the Vulkan library, or a default of vulkan
will be used.
Second: If you have CMake 3.7 or later, then the Vulkan implementation will be found from a Vulkan SDK as published by LunarG.
Environment variables:
VULKAN_SDK
should point to the platform-specific SDK directory that contains the include
and lib
directories. Example: VULKAN_SDK=$HOME/vulkan-macos-1.1.85.0/macOS
VK_ICD_FILENAMES
should point to the ICD JSON file. Example: VK_ICD_FILENAMES=$VULKAN_SDK/etc/vulkan/icd/MoltenVK_icd.json
We assume you have built [Dawn][Dawn] from source, and have access to both the source and build trees. To build a Dawn backend for Amber, set the following CMake variables when configuring Amber:
Dawn_INCLUDE_DIR
: The directory containing dawn/dawn_export.h
(in the source tree).Dawn_GEN_INCLUDE_DIR
: The directory containing generated header dawn/dawncpp.h
(in the build output tree).Dawn_LIBRARY_DIR
: The directory containing the dawn_native
library (in the build output tree).The build will generate an out/Debug/amber
executable which can be used to run amber scripts. The script can be used as out/Debug/amber <path to amber file>
. Where, currently, the amber file is in the VkScript format.
Please see the CONTRIBUTING and CODE_OF_CONDUCT files on how to contribute to Amber.