Giter Site home page Giter Site logo

dneto0 / amber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from google/amber

0.0 2.0 0.0 3.52 MB

Amber is a multi-API shader test framework

License: Apache License 2.0

CMake 2.10% C++ 94.59% Objective-C 0.53% Python 2.37% Vim Script 0.38% Shell 0.04%

amber's Introduction

Amber

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:

  • No graphics API programming is required.
    • WIP: Supports Vulkan and [Dawn][Dawn] graphics APIs.
  • A single text string (or file) maps to a single graphics API pipeline test case. The text includes:
    • Input data, including buffers and images.
    • Shaders.
    • Expectations for the result of running the pipeline.
  • Shaders can be expressed in binary form (as hex), in SPIR-V assembly, or in a higher level shader language.
  • After executing the pipeline, result buffers and images can be saved to output files.

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.

Requirements

  • Recommended: Configure at least one target graphics API. See below.
  • Git
  • CMake
  • Ninja (or other build tool)
  • Recommended: Python, for fetching dependencies

Building

git clone [email protected]:google/amber
cd amber
./tools/git-sync-deps
mkdir -p out/Debug
cd out/Debug
cmake -GNinja ../..
ninja

Backends

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.

Using Vulkan as a backend

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

Using Dawn as a backend

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).

Amber Sample

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.

Contributing

Please see the CONTRIBUTING and CODE_OF_CONDUCT files on how to contribute to Amber.

Dawn Talvos Vulkan-Headers VkRunner

amber's People

Contributors

dj2 avatar dneto0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.